Use WebIDL::set_prototype_from_new_target() in the handwritten Audio,
Image, and Option legacy factory constructors so subclassed
construction uses the correct prototype.
This corresponds to step 1.6 of:
https://webidl.spec.whatwg.org/#legacy-factory-functions
Per https://webidl.spec.whatwg.org/#interface-prototype-object any
global platform object should reject prototype changes (besides
from ShadowRealmGlobalScope), and interface prototype objects on
global prototype chains must be immutable.
We already handled parts of this on the globals themselves, but not
the full chain.
Also align some spec comments to the latest WebIDL spec.
Import the css-flexbox abspos position-absolute-013 test from WPT so we
can track its current behavior locally.
The imported baseline currently has 432 subtests total, with 228
passing and 204 still failing.
Import flex percentage-heights-004 through -010 and -014 (ref tests),
and grid-percentage-rows-indefinite-height-001 and -002 (testharness).
The flex tests all pass. The grid indefinite-height tests have many
failures (16/120 pass and 0/4 pass respectively), reflecting known
gaps in our grid percentage row handling.
This cannot happen inside the Make Active algorithm, since that gets
called during document creation, which commonly happens before the
document's navigable is created.
Aligns us with a recent spec change and rids us of some AD_HOC
behavior.
We now ignore all animation properties from `css-animations-1` declared
within keyframes, except `animation-timing-function`, which is treated
specially.
Refresh the imported wrapKey_unwrapKey WPT to the current upstream
version and treat the raw-secret and other raw* formats like raw
when wrap_key() and unwrap_key() serialize wrapped key bytes.
The updated test covers ChaCha20-Poly1305 wrapping with the
raw-secret format. Accepting the full set of byte-oriented raw
formats lets those keys round-trip through wrapKey and unwrapKey.
Refresh imported WebCryptoAPI WPT files to current upstream versions,
including the shared fixtures and helper scripts they rely on.
This keeps the in-tree imported coverage up to date and rebaselines the
expectations for the refreshed tests that continue to match Ladybird's
current behavior. The wrapKey_unwrapKey update is handled separately,
since the newer upstream test exercises raw-secret key formats that
needed an engine fix first.
Import ref and text tests from css/CSS2/floats,
css/CSS2/floats-clear, css/CSS2/margin-padding-clear, and
css/CSS2/visuren.
These cover float placement, clear behavior, clearance calculations,
and margin collapsing with floats.
Make some local file edits to get-host-info.sub.js such that
get_host_info() refers to the echo server through localhost,
and the cross origin server through 127.0.0.1.
This allows many imported WPT tests using this function work
correctly (if loaded from the echo HTTP server).
The form submit event was previously not tagged as trusted. This commit
properly tags the event so that we match the behaviour implemented by
other browsers and expected by WPT.
This code was treating the parameter to the JS::Array as if it was a
capacity, but that causes JS to see more databases than are actually
accessible if a database was being created in an aborted transaction.
To allow these to be reverted, we store mutation logs per object store
in the scope of a readwrite transaction to track the modifications that
were made by it. If a revert is needed, the log is played in reverse to
bring us back to the original state.
Implement the accessKeyLabel IDL attribute per the HTML spec.
We mimic Chromium's behavior and treat the accesskey attribute value as
a single key rather than splitting on whitespace, since no browser
besides IE/Edge implemented the spec's splitting approach.
See https://github.com/whatwg/html/issues/3769
execResult may contain additional captures from nested groups
in user-provided regexp parts, exceeding the number of
URLPattern groups.
Fixes a crash in the updated WPT test.
See: https://github.com/whatwg/urlpattern/commit/203d435c32
[Unscopable] members should only affect the interface prototype’s
@@unscopables object. The bindings generator was also creating an empty
@@unscopables object in define_unforgeable_attributes(), installing it
as an own property on instances.
Matching the behaviour of the other big three browser engines,
also tested by WPT, but does not appear to be explicitly specified.
I also noticed when investigating that browser engines disagree
about whether a child mutation should trigger script execution.
For this, I've just gone with the behaviour of Webkit/Chromium of
not running script.
Instead of immediately firing fullscreenchange, defer that until
WebContent's client has confirmed that it is in fullscreen for the
content. The fullscreenchange is fired by the viewport change, so in
cases where the fullscreen transition is instantaneous (i.e. the
fullscreen state is entered at the exact moment the viewport expands),
the resize event should precede the fullscreenchange event, as the spec
requires.
This fixes the WPT element-request-fullscreen-timing.html test, which
was previously succeeding by accident because we were immediately
fullscreenchange upon requestFullscreen() being called, instead of
following spec and doing the viewport (window) resize in parallel. The
WPT test was actually initially intended to assert that the
fullscreenchange event follows the resize event, but the WPT runner
didn't actually have a different resolution for normal vs fullscreen
viewports, so the resize event doesn't actually fire in their setup. In
our headless mode, the default viewport is 800x600, and the fullscreen
viewport is 1920x1080, so we do fire a resize event when entering
fullscreen. Therefore, that imported test is reverted to assert that
the resize precedes the fullscreenchange.