Returns one Utf8View at a time, using a callback function to identify
code points to split on.
(cherry picked from commit 3f10a5701d9634e47111203b837283bdfc2d8b18)
Before this change, a StringView with a character-data pointer would
never compare as equal to one with a null pointer, even if they were
both length 0. This could happen for example if one is
default-initialized, and the other is created as a substring.
(cherry picked from commit ec5101a1d3cc7bc9068fa4863e16aa482536929a)
(cherry picked from commit 229b64a4b723a391c21f247d72d78cd575ace6ff;
minorly amended to fix conflict in image.cpp due to serenity in the
meantime adding webp writing support, and due to changes in Android and
Vulkan-related files that serenity doesn't have)
This means that an `<input type=password>` will show the correct number
of *s in it when non-ASCII characters are entered.
We also don't need to perform text-transform on these as that doesn't
affect the output length, so I've moved it earlier.
(cherry picked from commit c747b1c6b56156b5797fad0d8d95164f415c8b25;
amended to slightly adjust some BlockContainer and PaintableWithLines
widths, since serenity does not use harfbuzz for text shaping)
First, this isn't actually helpful, as we no longer store 32-bit values
in JsonValue. They are stored as 64-bit values anyways.
But more imporatantly, there was a bug here when trying to coerce an i64
to an i32. All negative values were cast to an i32, without checking if
the value is below NumericLimits<i32>::min.
(cherry picked from commit 7b3b608cafbed8049ac7a34104c66622c1445ffc)
This exposes BaseAudioContext.listener, which is a container for
parameters related to the configuration of an actual "listener" in 3D
space.
(cherry picked from commit 2a98f2a12d5069a2189fa38b4a7e158d84ee03ec)
Before, the new title element got appended instead of prepended, as
nullptr was passed as the "child" argument to the insert_before()
function.
This change makes two WPT tests pass in:
http://wpt.live/html/dom/documents/dom-tree-accessors/document.title-09.html
(cherry picked from commit 3ff613712132bd3d03f44f27986f7ca5aaea8eb5)
DedicatedWorkerGlobalScope is an object with a Global extended
attribute, but does not define any named property getters. This needs to
be handled by setting the prototype chain to:
DedicatedWorkerGlobalScope
^ DedicatedWorkerGlobalScopePrototype
^ WorkerGlobalScopePrototype
(This is different from something like Window, where there is an
intermediate WindowProperties object for named properties.)
Previously, we treated the GlobalMixin object as if it was a simple
prototype object, accidentally setting DedicatedWorkerGlobalScope's
prototype to WorkerGlobalScopePrototype. This caused the expression
self instanceof DedicatedWorkerGlobalScope
to return false inside workers.
This makes us pass many more of the "/xhr/idlharness.any.worker" WPT
tests than before, rather than failing early.
(cherry picked from commit d5948709cd499ef0e7bfa3c24e8c03befed115fe)
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)
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)
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)
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)
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)
We were generating click events always using the primary mouse button
instead of the provided button, and with the buttons field set to that
provided button.
(cherry picked from commit dd5a0361f2307b280a910d219fbc2dfd0072409f)
Gets fib(30) from 380ms to 340ms.
(cherry picked from commit a58704296cd36d3080dbf8f1be49300de2c25ea9;
amended to comment out two dbgln_if()s that no longer compile after
this change if WASM_TRACE_DEBUG is defined to 1 -- see comments on
LadybirdBrowser/ladybird#960. Likewise, one dbgln_if() in Wasi.cpp
got commented out as well)
This should fix (at least) the last two remaining WPT test failures in
FileAPI/unicode.html.
(cherry picked from commit 55f0dc823ff266aeb29fd6f7d47d5e7f89a50ee6)
The main culprit for the following WPT test failure is that we
weren't using the HTML namespace for XHTML docs unless one was
explicitly provided.
(cherry picked from commit 6a5bca1302161a84d95313bef1481d9a8a56702c)