devgianlu
df05cc8478
LibCrypto: Make PKSystem
methods return ErrorOr
...
Make `encrypt`, `decrypt`, `sign` and `verify` return `ErrorOr` for
better error propagation.
2025-01-12 01:13:19 +01:00
devgianlu
6ba627b047
LibCrypto: Remove default key size for RSA::generate_key_pair
...
The current default is unsafe, but determining a safe value is not easy.
Leave it up to the caller to decide.
2025-01-12 01:13:19 +01:00
devgianlu
9e08f71fd9
LibCrypto: Make RSA::generate_key_pair
return ErrorOr
...
Not currently needed as it cannot fail, but useful for future commits.
2025-01-12 01:13:19 +01:00
Timothy Flynn
d5e3a557fd
LibWebView: Avoid replication of the HTML namespace string
...
Now that we can use these string constants, let's avoid the replication.
2025-01-12 00:35:58 +01:00
Timothy Flynn
a4324ee6e9
LibWeb: Remove the initialize_strings methods
...
We added these methods to propagate OOM errors at process startup, but
we longer fret about these tiny OOM failures. Requiring that these init
methods be called prohibits using these strings in processes that have
not set up a MainThreadVM. So let's just remove them and initialize the
strings in a sane manner.
In doing so, this also standardizes how we initialize strings whose C++
variable name differs from their string value. Instead of special-casing
these strings, we just include their string value in the x-macro list.
2025-01-12 00:35:58 +01:00
Timothy Flynn
ed726b6af0
LibWeb: Remove outdated FIXME about missing HTML event names
...
The drag-and-drop event names are already included, and the app cache
event names no longer exist (and the spec link here 404s).
2025-01-12 00:35:58 +01:00
Psychpsyo
19f97472eb
LibWeb: Verify element namespace in DOM::create_element()
2025-01-11 23:29:17 +01:00
Tim Ledbetter
00ed797627
Meta/CMake: Use simple string match to find relevant vcpkg triplets
...
Previously, the build would fail if the CMake source directory
contained regex special characters.
2025-01-11 23:18:16 +01:00
Tim Ledbetter
1e9e2b6564
LibWeb: Clone all attribute properties when cloning a single node
...
Previously, the namespace of the attributes on the cloned element was
not being set.
2025-01-11 23:10:09 +01:00
Tim Ledbetter
a467005855
LibWeb: Make node cloning methods const
2025-01-11 23:10:09 +01:00
Psychpsyo
31b20e38ee
LibWebView: Fix capitalization in devtools
2025-01-11 16:28:51 -05:00
Shannon Booth
64eeda6450
LibWeb: Return a representation of an 'Agent' in 'relevant agent'
...
This makes it more convenient to use the 'relvant agent' concept,
instead of the awkward dynamic casts we needed to do for every call
site.
mutation_observers is also changed to hold a GC::Root instead of raw
GC::Ptr. Somehow this was not causing problems before, but trips up CI
after these changes.
2025-01-11 10:39:48 -05:00
Shannon Booth
5bed8f4055
LibURL+LibWeb: Make URL::basic_parse return an Optional<URL>
...
URL::basic_parse has a subtle bug where the resulting URL is not set
to valid when StateOveride is provided and the URL parser early returns
a valid URL.
This has not surfaced as a problem so far, as the only users of the
state override API provide an already valid URL buffer and also ignore
the result of basic parsing with a state override.
However, this bug surfaces implementing the URL pattern spec, which as
part of URL canonicalization:
* Provides a dummy URL record
* Basic URL parses that URL with state override
* Checks the result of the URL parser to validate the URL
While we could set URL validity on every early return of the URL parser
during state override, it has been a long standing FIXME around the code
to try and remove the awkward validity state of the URL class. So this
commit makes the first stage of this change by migrating the basic
parser API to return Optional, which also happens to make this subtle
issue not a problem any more.
2025-01-11 10:08:29 -05:00
Tim Ledbetter
b6ec055bf9
IDLGenerators: Set Iterator @@toStringTag
with correct descriptor
2025-01-11 10:02:48 -05:00
Tim Ledbetter
5b6f2bb23a
LibWeb: Set dirty checkedness flag when setting checked
IDL attribute
...
This matches the behavior of other browsers, which always set the dirty
checkedness flag when setting checkedness, except when setting the
`checked` content attribute.
2025-01-11 11:13:32 +01:00
Tim Ledbetter
c87bc78d5d
LibWeb: Preserve indeterminate
value when cloning HTMLInputElement
2025-01-11 11:13:32 +01:00
devgianlu
b9ba1b3f72
LibWeb: Add Ed448 support in WebCryptoAPI
...
Add full support for Ed448 and import relevant tests.
2025-01-11 11:13:06 +01:00
devgianlu
c23765c8f2
LibCrypto: Add Ed448 OID to know algorithm identifiers
2025-01-11 11:13:06 +01:00
devgianlu
27b4bae78b
LibCrypto: Implement Ed448
...
Implement the Ed448 curve for signing and verifying using OpenSSL.
The methods could be all made static, but all other curves are not.
I think this is material for further refactoring.
2025-01-11 11:13:06 +01:00
devgianlu
4817ca489f
LibCrypto: Add useful macros and classes for working with OpenSSL
...
Add a couple of macros to aid error handling with OpenSSL and some RAII
classes that manage the lifetime of some OpenSSL objects.
2025-01-11 11:13:06 +01:00
Tim Ledbetter
e03fec2a15
LibWeb: Use DocumentLoadTimingInfo values in PerformanceTiming interface
2025-01-11 11:11:52 +01:00
Tim Ledbetter
f8b8c9c4a4
LibWeb: Wait until ReadyState is complete before detaching HTML parser
...
Previously, the DOM complete time was never being set, as the HTML
parser was detached before `DocumentReadyState` was set to complete.
2025-01-11 11:11:52 +01:00
Sam Atkins
03024765e9
LibWeb/HTML: Halt navigation if navigate event returns false
2025-01-11 11:10:43 +01:00
Sam Atkins
f11347739a
LibWeb/HTML: Stop observing lazy-loaded iframes when navigating
2025-01-11 11:10:43 +01:00
Sam Atkins
0957c59c26
LibWeb/HTML: Update Navigable::navigate spec steps
...
No code changes.
2025-01-11 11:10:43 +01:00
Sam Atkins
97616fa108
LibWeb/DOM: Move "stop intersection observing..." code into a method
...
We'll need to call it from elsewhere.
Also add a missing step 5 from where we previously called it.
2025-01-11 11:10:43 +01:00
Sam Atkins
c6a18f795d
LibWeb/HTML: Pass user_involvement through navigables code
...
This corresponds to part of https://github.com/whatwg/html/pull/10818
2025-01-11 11:10:43 +01:00
Tim Ledbetter
8b5e9c2a1d
LibWeb: Emit comment token for unterminated bogus comments on EOF
2025-01-11 11:09:47 +01:00
Shannon Booth
627b7dd936
LibWeb/Bindings: Define constructor properties in the correct order
2025-01-11 01:43:31 +00:00
Tim Ledbetter
3261f873c5
LibWeb: Validate parameters for source node start() and stop() methods
2025-01-10 23:35:20 +01:00
Jelle Raaijmakers
98ec1825de
LibWeb: Implement the "useCSS" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
70af48c18b
LibWeb: Implement the "selectAll" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
03bcfb9b8c
LibWeb: Implement the "outdent" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
fbc0d40d2c
LibWeb: Implement the "justifyCenter/Full/Left/Right" editing commands
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
1c3251e2d5
LibWeb: Implement the "insertUnorderedList" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
26cadf06d2
LibWeb: Implement the "insertText" editing command
...
Minus the autolinking algorithm.
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
199eaf0d3e
LibWeb: Implement the "insertOrderedList" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
01ce9cb151
LibWeb: Implement the "insertImage" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
20fb7b1a49
LibWeb: Implement the "insertHTML" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
cb05ab6515
LibWeb: Implement the "insertHorizontalRule" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
c6cde85534
LibWeb: Implement the "indent" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
a12d887eb4
LibWeb: Implement the "formatBlock" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
e686328cbd
LibWeb: Implement the "unlink" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
043a28baeb
LibWeb: Implement the "underline" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
679fbb5eda
LibWeb: Implement the "superscript" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
ef8af01e1d
LibWeb: Implement the "subscript" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
8c51d6863f
LibWeb: Implement the "strikethrough" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
aee8a75c40
LibWeb: Implement the "removeFormat" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
ae12f7036b
LibWeb: Implement the "italic" editing command
2025-01-10 23:33:35 +01:00
Jelle Raaijmakers
228c66f2e1
LibWeb: Implement the "foreColor" editing command
2025-01-10 23:33:35 +01:00