This change ensures that the value sanitization algorithm is run and
the text cursor is set to the correct position when the type attribute
of an input is changed.
(cherry picked from commit 1b74104c17726018788034f2ad66201889ce6225)
The DOM spec gets overridden by both the SVG2 and MathML core specs in
that unknown elements should not inherit DOM::Element, but
SVG::SVGElement and MathML::MathMLElement respectively.
(cherry picked from commit 76e638b4ca10a91983877d6f6e7f037c1a720965)
When aspect-ratio is degenerate (e.g. 0/1 or 1/0) we should
fallback to the same behaviour as `aspect-ratio: auto` according to spec
This commit explicitly handles this case and fixes five WPT test in
css/css-sizing/aspect-ratio (zero-or-infinity-[006-010])
(cherry picked from commit c6f77f4818a03411c14d9e60b743a7541a8280f6)
This fixes a crash in WPT:
WebCryptoAPI/import_export/rsa_importKey.https.any
This allows us to pass 240 tests!
(cherry picked from commit 124bd115a1342d9b4a7536fa62acedee279a12c9)
This change completes handling for all ARIA properties defined in the
current ARIA spec — by adding handling for the following properties:
- aria-braillelabel
- aria-brailleroledescription
- aria-colindextext
- aria-description
- aria-rowindextext
(cherry picked from commit ede6924db8e4440ef3bdb0fbb34d31226568e55a)
For example, if the shadow root was detached from the document in some
manner, its host will be null.
(cherry picked from commit 8fb2cc2be1d7a63eba7b1ae5c93e3db181ca393f)
Otherwise, it looks a bit awkward where the cursor position does not
update while the selection is elsewhere.
Note that this requires passing along the raw selection positions from
`set the selection range` to the elements. Otherwise, consider what will
happen if we set the selection start and end to the same value. By going
through the API accessor, we hit the case where the start and end are
the same value, and return the document cursor position. This would mean
the cursor position would not be updated.
The test changes here more closely match what Firefox produces now. It
is not a 100% match; the `select event fired` test case isn't right. The
problem is the event fires for the input element, but we most recently
focused the textarea element. Thus, when we retrieve the selection from
the input element, we return the document's cursor position, which is
actually in the textarea element. The fix will ultimately be to fully
implement the following:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-textarea/input-cursor
That is, each input / textarea element should separately track its own
text cursor position.
(cherry picked from commit fd289deb44e0fc26f54a133c637c136bf0716cd5)
Also updates a LibWeb text test that used to report the wrong line
number.
(cherry picked from commit 02b50d463b174e5d525c7ab8ce8dd173d550de28;
amended to exclude LineTrackingLexer from KERNEL, since that now use
make<>)
We should only block the escape key from being sent to the web page if
the CloseWatcherManager actually closed something.
We use the escape key in the Inspector to cancel editing a DOM field.
This unconditional early return broke this feature.
(cherry picked from commit 099956a7cd2bec55e7e0376d54525f8a3f7b1955)
That helps to pass more WPT tests
under /webaudio/the-audio-api/the-dynamicscompressornode-interface/ctor-dynamicscompressor.html
(cherry picked from commit f2ed59879f7781019152a18740fc5743cc513016)
If we don't reject the Promise, it lasts forever,
so rejecting non implemented Promises is essential,
to not timeout in e.g. WPT tests
(cherry picked from commit aab5a9e944f8b1c1a9de321047556bbcaa282a56)
This fixes an issue where https://hey.com/ was horizontally scrollable
even though it shouldn't be.
(cherry picked from commit 94721385ceb17e20428b94a946d39828bdd5b74e)
https://www.w3.org/TR/event-timing/#sec-performance-event-timing
Add idl, header and stubs for PerformanceEventTiming interface.
Two missing `PerformanceEntry` types that have come up in issues
are the `first-input` and the `event` entryTypes. Those are both
this.
Also, because both of those are this same interface, the static
methods from the parent class are difficult to implement because
of instance-specific details. Might either need subclasses or to
edit the parent and also everything that inherits from it :/
(cherry picked from commit d30ae92b82d997bc4db407c563c88f90d8260093)
Aligning with a spec update, fixing 195 tests for:
https://wpt.live/url/failure.html
(cherry picked from commit ea971792b5da5f10cadb4f88f49c9722d88b32f6)
Replaced the ad-hoc implementation with a spec compliant one.
This change fixes 36 WPT tests.
(cherry picked from commit 50f642613de54c73473c216fdc4d7e607e712679)
This ensures the HTML parser completes running if it previously stopped
at an insertion point during a call to `document.write`.
(cherry picked from commit 230314238655204b89dd0736da4537b475eb252a)
The spec moved/added the xml and html checks to the beginning and
removed sniffing resource feeds.
(cherry picked from commit b8a5e18a016dc32ba065417a4d6d32bbc03f101d)
The HTML tokenizer specification says that we're supposed to do this
when leaving the Attribute name or when emitting the token, as
appropriate.
Hopefully 'as appropriate' can mean only when emitting the token, as
that's the easiest place to insert this logic without complicating the
tokenizer any more.
(cherry picked from commit 7aa0165fe75bb94b79bc847484c7913d249ce263)
This is what the spec tells us to do:
The root element’s display type is always blockified,
and its principal box always establishes an independent
formatting context.
Additionally, a display of contents computes to block
on the root element.
Spec link: https://drafts.csswg.org/css-display/#rootFixes#1562
(cherry picked from commit f1be662f683155705f851bcf440fe30d0e606a87)
We now use the "report an exception" AO when a script has an execution
error. This has mostly replaced the older "report the exception" AO in
various specifications. Using this newer AO ensures that
`window.onerror` is invoked when a script has an execution error.
(cherry picked from commit 579a289d3db849657987c3310e7b1d71d290b566)
`revert` is supposed to revert to the previous cascade origin, but we
previously had it reverting to the previous layer. To support both,
track them separately during the cascade.
As part of this, we make `set_property_expanding_shorthands()` fall back
to `initial` if it can't find a previous value to revert to. Previously
we would just shrug and do nothing if that happened, which only works
if the value you want to revert to is whatever is currently in `style`.
That's no longer the case, because `revert` should skip over any layer
styles that have been applied since the previous origin.
(cherry picked from commit bea47a25545adfb96d83a16a3e4f4435bae05e39)