This save() call did not have matching restore(). For mask application
it's display list builder responsibility to emit save() and restore()
so mask is applied only to relevant portion.
Progress on https://www.jetbrains.com/
The `[[GetOwnProperty]]` internal method invocation in
`OrdinarySetWithOwnDescriptor` was being invocated again with the same
parameters in the `[[DefineOwnProperty]]` internal method that is also
later called in `OrdinarySetWithOwnDescriptor`.
The `PlatformObject.[[DefineOwnProperty]]` has similair logic.
This change adds an optional parameter to the `[[DefineOwnProperty]]`
internal method so the results of the previous `[[GetOwnProperty]]`
internal method invocation can be re-used.
We have to handle user prompts during the exection of most WebDriver
endpoints. Of the ~50 endpoints which call this AO, ~20 are currently
currently async and handled here.
There are approximately 1000 WPT subtests that rely on the handling of
user prompts being completely asynchronous. It will take a bit of elbow
grease to make all of our WebDriver endpoints comply with this. So for
now, we will deprecate the currently synchronous implementation, and a
future patch will implement an asynchronous version that already-async
endpoints can use.
Some WebDriver hooks will need to inform the client that execution has
completed, but without any knowledge of what endpoint was running. Since
there can only ever be a single WebDriver endpoint executing at once, we
can replace the completion callbacks with a single callback.
If a dialog is opened while a script is executing, we must give control
back to the WebDriver client. The script must also continue executing
though, so once it completes, we ignore its result.
This allows the script to end with a comment, which is tested by WPT.
Otherwise, an ending comment would create a function of the form:
function() { return 1; // comment }
And the script would fail to parse.
This allows you to get the module map for any realm, whether it is a
principal or synthetic realm. We don't yet have the concept of a
synethetic realm, but this puts the groundwork in place for it.
When mime essence matching, the spec only asks for a string comparison
ignoring ascii case. The whitespace trimming and parsing of the mime
produces unexpected and wrong results.
Fixes tests on WPT html/semantics/scripting-1/the-script-element :^)
This change implements the “is a descendant of a native host language
text alternative element” condition in the “F: Name From Content” step
at https://w3c.github.io/accname/#step2F in the “Accessible Name and
Description Computation” spec — to ensure that all descendant nodes get
included as expected in computations for accessible names for elements.
Otherwise, without this change, Ladybird unexpectedly skips descendant
element nodes when computing accessible names — which can result in the
wrong accessible name being returned.
This is a bit of a chonkier commit as it results in both:
clean_up_after_running_callback and prepare_to_run_callback being
changed to accept a realm instead of an environment settings object,
which has a bunch of fallout, particuarly for IDL abstract operations.
Instead of a settings object. This matches updates to the HTML spec as
part of the shadow realm proposal, and begins the refactor of running
scripts on a realm instead of a settings environment object.
Some of the spec steps are slightly messy here (such as in
MainThreadVM.cpp) as this partially implements the ShadowRealm changes
but not other pieces which we have not implemented yet, such as
preparing to run a script also being based on a realm instead of an
environment. But this will be addressed in further commits.
In terms of the 'current principal realm' definition.
No functional impact, as we still need to implement current principal
realm once the surrounding infrastructure is in place. But it is one
less place which needs to be updated when that is all in place :^)
Aligning the name with the the PR implementing the javascript
shadow realm proposal into the web platform. This commit
simply performs the rename before implementing the behaviour
change.
The actual change to the behaviour of the AO is not implemented in this
commit to support 'synthetic' shadow realms as the surrounding
infrastructure is not in place yet.
Not all specs have a MR open to align with this proposed change to the
HTML standard. But in this case we can just apply the same mechanical
change everywhere.
At some point we must have broken the ability of running XHTML test
cases, so the whitespace expectation changes have not been rebaselined
for this test case.