This aligns with an update to the HTML specification which instead
stores these promises on the global object instead of the settings
object.
It also makes progress towards implementing the ShadowRealm proposal
as these promises are not present in the 'synthetic' realm for that
proposal.
This allows us to align our implementation in the same order as the
specification.
No functional change with the current implementation of this AO.
However, this change is required in order to correctly implement a
proposed update of the shadow realm proposal for integration with
the HTML spec host bindings in order to give the ShadowRealm
object the correct 'intrinsic' realm.
This is due to that proposed change adding a step which manipulates the
currently executing Javascript execution context, making the ordering
important.
When we check whether navigationParams is null, we should check if it is
`NullWithError`, since `NullWithError` is equivalent to `Empty`, but is
used for error messages.
This ensures we cannot set or get cookies on non-HTTP(S) origins. Since
this would prevent our ability to test cookies during LibWeb tests, this
also adds an internals API to allow cookie access on file:// URLs.
Bring together the docs on running tests, with the ones on writing them
which were hidden in Browser/Patterns.md
I've made a few adjustments while I was at it, because RunningTests.md
was a bit outdated and didn't mention `Meta/ladybird.sh test`. It's
possible they're still outdated and wrong, but I'm not familiar enough
with that area to know.
Handling tabs during text shaping caused issues because we tried to
index 'input_glyph_info' whilst iterating until 'glyph_count' and these
can be different sizes.
The difference is due to when one or more characters get
merged into the same glyph when calling 'input_glyph_info' (see
https://lazka.github.io/pgi-docs/HarfBuzz-0.0/classes/glyph_info_t.html).
We don't want to render tabs as they come up as tofu characters so
instead let's strip them out of the text chunk before starting text
shaping.
Platforms such as X11 will typically send repeated keyRelease/keyup
events as a result of auto-repeating:
* KeyPress (initial)
* KeyRelease (repeat)
* KeyPress (repeat)
* KeyRelease (repeat)
* ad infinitum
Make our EventHandler more spec-compliant by ignoring all repeated keyup
events. This fixes long-pressing the arrow keys on
https://playbiolab.com/.
When a platform key press or release event is repeated, we now pass
along a `repeat` flag to indicate that auto-repeating is happening. This
flag eventually ends up in `KeyboardEvent.repeat`.
We need this, because https://www.slatejs.org/ that is used by Discord
checks this function to decide whether a browser has "beforeinput" event
support.
We have more work to do before we can run WPT headlessly by default
(i.e. handling alerts). But for now, we can run it headlessly locally
with the --headless flag.
We previously only supported enabling headless mode on a per-session
basis via the capabilities record. We don't have the ability to mutate
this record from WPT, so this adds a flag to set the default mode.
Previously, tests would intermittently fail because the current session
wasn't yet aware of a newly created window handle.
Co-authored-by: Timothy Flynn <trflynn89@pm.me>
With 6a549f6270 we need to check if
optional scrollable overflow exists for paintable box, because it's not
computed for inline nodes.
Fixes crashing after navigating into direct messages screen on Discord.
The reason we were keeping track of the pre-shaping buffer was to know
where we had tab characters in the input. This is a very strange way of
doing that, but since it broke the web, let's patch it up quickly.
Follow-up to #1870 which broke text layout on many web pages.
This fixes a browser crash as experienced on Wikipedia when encountering
the ≠ entity. As a side-effect, this also affects some tab-align and
-wrap tests.