Just the boilerplate :^)
(cherry picked from commit 35043702813117d22e841e1b1d887d1726d4ed2d;
amended to fix conflict in idl_files.gni due to ladybird being worse
than serenity at having that file sorted alphabetically)
A recently imported WPT test has a subtest that effectively does the
following:
const mql = window.matchMedia("");
mql.removeListener(null);
(cherry picked from commit 3e5476c9e09055104fc64d294da39aa1bfccac09)
The insertion steps for iframes were following an old version of the
spec, where it was checking if the iframe was "in a document tree",
which doesn't cross shadow root boundaries. The spec has since been
updated to check the shadow including root instead.
This is now needed for Cloudflare Turnstile iframe widgets to appear,
as they are now inserted into a shadow root.
(cherry picked from commit 4dd14d812f73377cb1efa5a8e8a114912a90b5af)
Previously, the inclusive descendant, which is the node that
for_each_shadow_including_inclusive_descendant was called on, would not
have it's shadow root traversed if it had one.
This is because the shadow root traversal was in the `for` loop, which
begins with the node's first child. The fix here is to move the shadow
root traversal outside of the loop, and check if the current node is an
element instead.
(cherry picked from commit 6df4e5f5e75d7d6d439d1365ed7bed4fd2a8a1da)
Move the pending promises list from AudioContext to BaseAudioContext and
deal with all remaining FIXMEs.
(cherry picked from commit 2df3488840ccf8e8c560bde4826897c2023dbe29)
While traversing the DOM tree, looking for nodes that need a style
update, we were recomputing style for every node visited along the way,
even nodes that didn't themselves need a style update (but one of their
descendants did).
This avoids a bunch of completely unnecessary style recomputation on
basically every website.
(cherry picked from commit 5431db8c1c9d366d0a27959cfbf0f146bf4be20d)
The current shadow realm constructor implementation was based off a
merge request to the shadow realm proposal for integration into the
web platform. However, this merge request had a bug which we had
applied a workaround for by popping off the execution stack.
Since then, the spec has had an update of:
https://github.com/tc39/proposal-shadowrealm/commit/28b0cc
Which closer aligned the mainline spec to the proposed merge request.
Now, the original shadow realm proposal merge request has been closed
and a new one has been reopened with a much more minimal set of changes
that merely adds extra arguments to HostInitializeShadowRealm, which
this commit aligns with.
(cherry picked from commit 424a0cda936e018a9881f3e5898beb79d2212caa)
Noone needs to use this any more :^)
This is somewhat AD-HOC in the constructor as it is based on an open
shadow realm merge request, but applies the intent of the change without
any change in behaviour.
(cherry picked from commit b927d7f65870c94d0c7ead3f6bdd8e6f6f0ac887)
This is a new AO introduced in the spec which allows the
[[ExecutionContext]] slot of the ShadowRealm object to be removed.
(cherry picked from commit 3f24008b31d36c41c3bb841312914019073fac33)
The use of extract_parameter_arguments_and_body() here is to make things
a little less awkward. If we were to exactly follow spec there would be
an awkward handling of the case that no arguments were provided and we
needed to provide an empty string.
To do this, we would need to either:
- Provide an Optional<Value> for bodyString to CreateDynamicFunction
- Create a new empty PrimitiveString wrapped in a JS Value.
Either case is somewhat awkward. Instead, just refactor this logic
outside of CreateDynamicFunction and make the caller do it.
Otherwise, this commit prepares for the new definition of
HostEnsureCanCompileStrings.
(cherry picked from commit 6da0ac3aa71c991e18e96d721b1843c417cdab78)
That helps to pass WPT tests
under /webaudio/the-audio-api/the-gainnode-interface/ctor-gain.html
(cherry picked from commit 4998385c7aeae21939f4ea24bb4f8c6eb477840b)
Although we aren't using this hint (we always create tabs), we do need
to validate the payload.
(cherry picked from commit ebe89a32073a1b838f2d1e04d2146f2dfae6b6f7)
We were hard-coding "about:blank" as the document URL for parsed HTML
documents, which was definitely not correct.
This fixes a bunch of WPT tests under /domparsing/ :^)
(cherry picked from commit 55f58eea99c0429dcc39cd0430fafa60eecf5542)
On any `display: list-item` Node a CSS pseudo element (`::marker`) needs
to be created. This commit allows the ::maker pseudo element to be
nested within other pseudo elements (e. g. ::before or ::after).
This fixes this WPT test:
http://wpt.live/css/CSS2/generated-content/after-content-display-003.xht
(cherry picked from commit 15d2857a01b5bda90ace3d02cf9e1bc8ce279d38)
This resolves all WPT timeouts in html/canvas/element/manual/imagebitmap
We can now run an additional 6 tests and 126 subtests :)
This also adds regression tests for this behavior.
(cherry picked from commit 0c04bd66764dfbe8f6da515d09b076683c61e93c)
Selectors and at-rules both made assumptions about their indentation
level, which made it difficult to read the dump output. It'll become
even worse once rules can be further nested within each other, so let's
fix it now. :^)
(cherry picked from commit aeed4921c4ec6ebcce487812d2fdfe7d415affd2)
This reverts 6d25bf3aac
Invalidating the style here means that transitions can cause an element
to leave style computation with its "needs style update" flag set to
true. This then causes a VERIFY to fail in the TreeBuilder.
This invalidation does not otherwise seem to have any effect. The
original commit suggests this was to fix a bug, but it's not clear what
bug that was. If it reappears, we can try to solve the issue in a
different way.
(cherry picked from commit 81596b41457d250bac28db37c1390fa46e6532de;
amended test with leading whitespace since we don't have
LadybirdBrowser/ladybird#1603 yet)
We need these steps to be available for the yet to be implemented
`BaseAudioContext.decodeAudioData()`.
(cherry picked from commit 177e5210e09ee4b5906e5d7db34154fae4ec76c6)
This opens up the code path for the `ArrayBuffer` type, which can now be
used as a method argument.
(cherry picked from commit 0b9d55b6761b85b3b80a459d6231841e72a26c51)
Prior to funcref, a partial chunk of an invalid module was never needed,
but funcref allows a partially instantiated module to modify imported
tables with references to its own functions, which means we need to keep
the second module alive while that function reference is present within
the imported table.
This was tested by the spectests, but very rarely caught as our GC does
not behave particularly predictably, making it so the offending module
remains in memory just long enough to let the tests pass.
This commit makes it so all function references keep their respective
modules alive.
(cherry picked from commit a60ecea16abe62aae988ba877fdb98466d2919d3)