Timothy Flynn
49eeaaf8fe
headless-browser: Store each test's relative path on the Test object
...
Rather than having to compute it each time we want it.
2024-11-30 12:10:12 -05:00
Timothy Flynn
3947c6d4ed
LibWeb: Disable Text/input/wpt-import/css/cssom/serialize-values.html
...
It's currently too slow for sanitized CI runs.
2024-11-30 12:10:12 -05:00
Netanel Haber
d743fcb376
LibWeb: Take namespace into account when matching attribute
2024-11-30 16:47:14 +00:00
Jelle Raaijmakers
033cd9cab3
LibWeb: Add test for document.execCommand("delete")
...
Anchor the minimum functionality for this. WPT has an extensive suite
to test editing functionalities, but they all take a long time to
execute - so let's have a simple regression test in-tree for now.
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
4b0d8cbfad
LibWeb: Implement document.execCommand("styleWithCSS")
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
bb618736e9
LibWeb: Use default paragraph separator in delete command
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
4a64557876
LibWeb: Implement document.execCommand("defaultParagraphSeparator")
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
7bb865052a
LibWeb: Implement document.execCommand("delete")
...
To facilitate the implementation of "delete" and all associated
algorithms, split off this piece of `Document` into a separate
directory.
This sets up the infrastructure for arbitrary commands to be supported.
2024-11-30 17:35:45 +01:00
Jelle Raaijmakers
c87960f8f3
LibWeb: Use GC::Ref<Node> in Range for start/end containers
...
Let's propagate the GC'ness of it all to the users of Range.
2024-11-30 17:35:45 +01:00
Sam Atkins
bf724ba2f6
LibWeb: Bring HTMLHyperlinkElementUtils::hostname() closer to spec
...
Actually reinitialize the URL like we are supposed to, and then check if
it's null. Also add some missing spec links.
2024-11-30 12:07:39 +01:00
Sam Atkins
3ce81512dd
LibWeb/HTML: Make WorkerLocation methods infallible
...
We stopped worrying about tiny OOMs a while ago.
2024-11-30 12:07:39 +01:00
Sam Atkins
900c131178
LibURL: Make URL::serialized_host() infallible
...
This can no longer fail, so update the return type to match.
This makes a few more methods now unable to return errors, but one thing
at a time. 😅
2024-11-30 12:07:39 +01:00
Sam Atkins
70c8535b8a
LibWeb: Update "window open steps" to current spec
...
Corresponds to https://github.com/whatwg/html/pull/10683
As part of this, I noticed we incorrectly were setting the "is popup"
flag on the Navigable instead of the BrowsingContext. I've fixed that
and removed the erroneous flag from Navigable.
2024-11-30 12:07:39 +01:00
Sam Atkins
b83f015c70
LibURL: Implement Site concept
2024-11-30 12:07:39 +01:00
Sam Atkins
2e64e0b836
LibURL: Migrate Origin scheme from ByteString to String
2024-11-30 12:07:39 +01:00
Sam Atkins
7f7f6e490b
LibURL: Implement Host::public_suffix() and registrable_domain()
...
These algorithms are used in following commits.
2024-11-30 12:07:39 +01:00
Sam Atkins
63688148b9
LibURL: Promote Host to a proper class
...
This lets us move a few Host-related functions (like serialization and
checks for what the Host is) into Host instead of having them dotted
around the codebase.
For now, the interface is still very Variant-like, to avoid having to
change quite so much in one go.
2024-11-30 12:07:39 +01:00
Sam Atkins
90e763de4c
LibURL: Replace Host's Empty state with making Url's Host optional
...
A couple of reasons:
- Origin's Host (when in the tuple state) can't be null
- There's an "empty host" concept in the spec which is NOT the same as a
null Host, and that was confusing me.
2024-11-30 12:07:39 +01:00
Sam Atkins
8b984c0c57
LibURL: Clarify whether an Origin is opaque
...
Origins are immutable and we know on construction whether an Origin is
opaque. This also removes an implicit reliance on Host's Empty state.
2024-11-30 12:07:39 +01:00
Sam Atkins
3124dca528
LibURL+LibWebView: Move public suffix data to LibURL
2024-11-30 12:07:39 +01:00
Sam Atkins
edcdcea92d
LibWebView: Simplify string joining in GeneratePublicSuffixData
...
Super minor, but gets rid of a clangd warning about the builder name
already being used.
2024-11-30 12:07:39 +01:00
Shannon Booth
91007eb476
LibWeb: Ensure principal realm returned for nested Shadow Realms
...
Recently reported against the shadow realm proposal after running into
issues with WPT tests.
In a nested shadow realm, the associated realm is a shadow realm, not
the principal realm. One such issue this fixes is a crash when a nested
shadow realm performs an operation which requires the principal settings
object.
2024-11-30 11:55:11 +01:00
Shannon Booth
218ac86b67
LibWeb: Use relevant principal settings for HighResolutionTime
...
Fixes a crash when setting the timestamps when creating a DOM event
within a ShadowRealm.
2024-11-30 11:55:11 +01:00
Shannon Booth
6a668f27c7
LibWeb: Push promise rejection handling onto UniversalGlobalScopeMixin
...
This is needed for shadow realms which don't have a window or worker
global object. Fixes a crash for the attached test.
2024-11-30 11:55:11 +01:00
Shannon Booth
fb17f8ff66
LibWeb: Get document for cookies usage from principal realm
...
Needed for when a shadow realm does an HTTP fetch as part of an import.
2024-11-30 11:55:11 +01:00
Shannon Booth
bc10729af6
LibWeb: Add relevant principal helper abstract operations
...
These were recently added into the shadow realm merge request as
convenience helpers.
2024-11-30 11:55:11 +01:00
Shannon Booth
d5aaff818e
LibWeb: Adjust 'resolve a module specifier' to shadow realm proposal
2024-11-30 11:55:11 +01:00
Shannon Booth
bb10b0e301
LibWeb: Always assert that principal realm returns a principal realm
...
There was a bug in the HTML proposal where a synthetic realm settings
object's principal realm was a shadow realm if there were nested shadow
realms, which this assertion catches more directly (rather than later
down the track, where it is used).
We were meant to also assert for this case, but we were previously
returning early.
2024-11-30 11:55:11 +01:00
Shannon Booth
27f1e3676f
LibWeb: Visit proper base class in SyntheticHostDefined
...
This was a goof of mine from when I added a common HostDefined base
class.
2024-11-30 11:55:11 +01:00
Shannon Booth
b39f4f0b5a
LibWeb: Add stub definition for WorkletGlobalScope
2024-11-30 11:19:35 +01:00
Shannon Booth
286c177896
LibWeb: Support 'Worklet' exposed
2024-11-30 11:19:35 +01:00
Shannon Booth
cc11dcc9a1
LibWeb: Add stubbed implementation for ServiceWorkerGlobalScope
2024-11-30 11:19:35 +01:00
Shannon Booth
4417f63ca0
LibWeb: Move ServiceWorker classes to ServiceWorker namespace
...
These are defined by the ServiceWorker spec, not the HTML one.
2024-11-30 11:19:35 +01:00
Shannon Booth
2918405360
LibWeb: Rename ServiceWorker::ServiceWorker to ServiceWorkerRecord
...
This is to resolve naming conflicts between the ServiceWorker JS exposed
object and the internal representation of a ServiceWorker which is going
to be stored cross process.
2024-11-30 11:19:35 +01:00
Shannon Booth
04508841e9
LibWeb: Fix indent of the IDL generator using namespace hack
2024-11-30 11:19:35 +01:00
Timothy Flynn
53a507303c
LibJS: Prevent extensions of TypedArray exotic objects
...
This is a normative change in the ECMA-262 spec. See:
c1040ff
2024-11-30 11:18:26 +01:00
devgianlu
c6e684791f
LibWeb: Remove useless bytes conversion in ECDH.exportKey
...
Using `generate_public_key_point` instead of `generate_public_key`
removes a bit of redundant code.
2024-11-30 11:17:44 +01:00
devgianlu
399b3d2430
LibCrypto+LibWeb: Parse EC public key in parse_subject_public_key_info
...
Replicate what we are doing with RSA and parse both the private and
public key when parsing the ASN1.
The only thing that changed in the tests is the error message.
2024-11-30 11:17:44 +01:00
devgianlu
1f7586ce14
LibCrypto: Use ASN1 macros for RSA key parsing
...
Improve error handling in `RSA::parse_rsa_key` by using ASN1 macros and
generalizing the parsing to both private and public keys.
2024-11-30 11:17:44 +01:00
devgianlu
ee50a8c0f7
LibCrypto: Do not parse PKCS#8 in RSA::parse_rsa_key
...
The decoding inside `RSA::parse_rsa_key` is quite complex because it
tries to understand if it's decoding PKCS#8 or PKCS#1. Simplify the code
by moving the burden to the PEM decoder.
2024-11-30 11:17:44 +01:00
devgianlu
57ecd72256
LibCrypto: Return PEM type when decoding and sanity check footer
...
Improve PEM decoding by parsing the header and returning it along the
data. Also verify if the header is equal to the footer.
2024-11-30 11:17:44 +01:00
devgianlu
0280838944
LibCrypto: Use ASN1 macros for EC key parsing
...
Improve error handling in `EC::parse_ec_key` by using ASN1 macros and
generalizing the parsing to both private and public keys.
2024-11-30 11:17:44 +01:00
devgianlu
40f17d9260
LibCrypto: Move ASN1 macros to Crypto::ASN1
...
Makes more sense to have them in `Crypto::ASN1` rather than in
`Crypto::Certificate`.
2024-11-30 11:17:44 +01:00
devgianlu
51f69be51f
LibCrypto: Move ASN1 constants to Crypto::ASN1
...
Makes more sense to have them in `Crypto::ASN1` rather than in
`Crypto::Certificate`.
2024-11-30 11:17:44 +01:00
devgianlu
ab2960e49f
LibCrypto+LibWeb: Reorganize OID ASN1 constants
...
I have divided ANS1 constants by length so that they don't have
trailing zeros that need to be removed.
Also moved OIDs lists to the only place they are used for clarity.
Fixed a couple of WPT tests by adding SECP521r1 to the list of known
curves.
2024-11-30 11:17:44 +01:00
Tim Ledbetter
b39fdcfec2
LibWeb: Implement the HTMLInputElement.height
attribute
...
This allows the height of an image button input to be set and queried.
2024-11-30 11:01:33 +01:00
Tim Ledbetter
45a2823e08
LibWeb: Implement the HTMLInputElement.width
attribute
...
This allows the width of an image button input to be set and queried.
2024-11-30 11:01:33 +01:00
Sam Atkins
8e3adbe082
LibWeb: Serialize text-decoration closer to spec
...
This gets us 32 WPT subtest passes that I'm aware of. :^)
2024-11-30 11:01:12 +01:00
Sam Atkins
c405c4bcf1
LibWeb: Allow calling property_initial_value() without a Realm
...
In this situation we're only able to get initial values that have
already been parsed. It's a little sketchy but doesn't seem to break
anything.
2024-11-30 11:01:12 +01:00
Sam Atkins
671d3e8a48
LibWeb/CSS: Sort text-decoration-line values in spec order
...
This wins us 49 WPT subtest passes! :^)
2024-11-30 11:01:12 +01:00