This resolves a bug where if you opened a link in a new tab and quickly
went back to the original, the navigation buttons would update for the
new page shortly after.
This method puts the given node and all of its sub-tree into a
normalized form. A normalized sub-tree has no empty text nodes and no
adjacent text nodes.
Because `nan:arithmetic` and `nan:canonical` aren't bound to a single
bit pattern, we cannot check against a float-containing SIMD vector
against a single value in the tests. Now, we represent `v128`s as
`TypedArray`s in `testjs` (as opposed to using `BigInt`s), allowing us
to properly check `NaN` bit patterns.
Some spec-tests check the bit pattern of a returned `NaN` (i.e.
`nan:canonical`, `nan:arithmetic`, or something like `nan:0x200000`).
Previously, we just accepted any `NaN`.
These methods were overriding properties specified by the EventInit
property bags in the constructor for WheelEvent and MouseEvent.
They appear to be legacy code and no longer relevant, as they would have
been used for ensuring natively dispatched events had the correct
properties --- This is now done in separate create methods, such as
MouseEvent::create_from_platform_event.
This fixes a couple WPT failures (e.g. in
/dom/events/Event-subclasses-constructors.html)
`linking.wast` has an unusual pattern for invoke commands, which is now
accounted-for. Also, special unicode characters are now properly
serialized in JavaScript as string literals (this is only relevant for
`names.wast`).
Previously the input element was displayed with value 0, when no value
was set in the HTML. Now it uses `value_sanitization_algorithm()`, which
will calculate the default value.
In `value_sanitization_algorithm()` there was a logical mistake/typo.
The comment from the spec says "unless the maximum is less than the
minimum".
The added layout test would fail without the code changes.
Fixes#520
When the min option is given the read will only be fulfilled when there
are min or more elements available in the readable byte stream.
When the min option is not given the default value for min is 1.
This change makes find-in-page ignore content that’s been added to the
document using CSS ::after or ::before pseudo-elements. Ignoring such
pseudo-element content for find-in-page matches the behavior in Chrome
and Safari (though not in Firefox).
Otherwise, without this change, find-in-page doesn’t ignore the
pseudo-element content, and we instead crash in
DOM::Range::common_ancestor_container after hitting an assert, due to
the start container and end container for the matched range not having a
common ancestor.
Fixes https://github.com/LadybirdBrowser/ladybird/issues/514
On PowerPC 64 pointers can use all 64 bits, however by convention on
Linux user-space addresses use only the lower 43 bits.
I'm not 100% certain that the masking off of the 16 high bits is the
proper solution, but it matches the rest of the LibJS code which assumes
pointers only use the lower 48 bits.
https://www.kernel.org/doc/ols/2001/ppc64.pdf
Skia does not have built-in support for gradient transition hints. So
instead of adding custom gradient painting, now we do the same thing as
other engines and preprocess color stops by replacing transition hints
with a bunch of points lying between adjacent color stops and calculated
using non-linear formula from the spec. As a result we get visually
close enough rendering we would get by applying spec-formula
individually to each point of a gradient.