This just updates our copied spec steps - new steps are not implemented
here. This is mostly just to highlight new steps we are missing around
MessagePorts.
No behavior change, but this does resolve an outstanding FIXME around
spec step ordering.
(cherry picked from commit 83be2606dba7ac430bab4d61a70e926d12d452ee)
This largely reduces the number of files needed to be compiled when we
change the MessagePort header.
(cherry picked from commit 32a22c49e3e999e681e2d1de1ebabd092a7f9b47)
This removes a long-standing source of flakiness seen for example in
WPT's /referrer-policy/ tests.
(cherry picked from commit 063cd68bf472061ec35cf9b8970aa6e614632c9b)
This is required by mini Cloudflare invisible challenges, as it will
only run if the readyState is not "loading". If it is "loading", then
it waits for readystatechange to check that it's not "loading" anymore.
Initial about:blank iframes do not go through the full navigation and
thus don't go through HTMLParser::the_end, which sets the ready state
to something other than "loading". Therefore, the challenge would never
run, as readyState would never change.
Seen on https://discord.com/login
(cherry picked from commit f638f84185938c74a47f5691e8d7c5e1d4dca07c)
We build KERNEL without floats, so that context switches don't have
to save float registers. As a side effect of that, _Float16 results
in a "_Float16 is not supported on this target" diagnostic.
Having IsFloatingPoint<> be false for the upcoming f16 type but
true for other floating point types seems strange, so just stop
having these concepts in kernel code altogether.
Introduce the `writing-mode` property, as specified in
https://drafts.csswg.org/css-writing-modes/#block-flow
(cherry picked from commit c3f3e93b7e46e2f366fbc904852763af546d3913;
amended to fix conflict on `height:` in expectation)
We were not discarding enough whitespace to actually get to the radius
and color values.
(cherry picked from commit c99fad77e1cfc8789f2a8d33e958d7b5bcf35ea9)
This shares its implementation with `backdrop-filter`.
(cherry picked from commit 29974de852fb14eef78a18232bd36d5c8955a214;
amended to resolve conflict on `height:` in expectations file, and to
remove change to DisplayListPlayerSkia.cpp which serenity doesn't have;
also updated FilterPainting.{h,cpp} for changes since serenity does not
have LadybirdBrowser/ladybird#736 and LadybirdBrowser/ladybird#886)
This is really bare bone as we only support the `xyz-d50` color space
for the moment.
It makes us pass the following WPT tests:
- css/css-color/predefined-016.html
- css/css-color/xyz-d50-001.html
- css/css-color/xyz-d50-002.html
(cherry picked from commit 48bbebc636598eca905b8eef984ee2cba548ff64)
These don't have to worry about the input not being valid UTF-8 and
so can be infallible (and can even return self if no changes needed.)
We use this instead of Infra::to_ascii_{upper,lower}_case in LibWeb.
(cherry picked from commit 073bcfd3866852a4c4bcca2bd131bd65ae53541f)
This fixes a rendering issue where the first line of the prompt
overwrites a line with "% ...", which leaves the "%" in the terminal
if the prompt starts with "\n".
This is because toggling the checkbox is committing the value.
(cherry picked from commit 3856dd946b94b61be2ddac80c8cf60278fcc56ab;
amended to add spaces to expected output due to serenity not yet
having LadybirdBrowser/ladybird#1603, and to add a trailing newline
to the test input file)
This avoids a crash in the fully static distribution build, due to
static init order fiasco.
(cherry picked from commit c898ee90cf2bb64794a583871687e0b08f49ee4b)
These are created when a style rule has properties listed after another
rule. For example:
```css
.test {
--a: 1;
--b: 1;
--c: 1;
.thing {
/* ... */
}
/* These are after a rule (.thing) so they're wrapped in a
CSSNestedDeclarations: */
--d: 1;
--e: 1;
--f: 1;
}
```
They're treated like a nested style rule with the exact same selectors
as their containing style rule.
(cherry picked from commit e4245dc39e68d9376dfb2344c78119a938533319)
For example, this:
```css
.foo {
color: red;
&:hover {
color: green;
}
}
```
now has the same effect as this:
```css
.foo {
color: red;
}
.foo:hover {
color: green;
}
```
CSSStyleRule now has "absolutized selectors", which are its selectors
with any `&`s resolved. We use these instead of the "real" selectors
when matching them, meaning the style computer doesn't have to know or
care about where the selector appears in the CSS document.
(cherry picked from commit 53f99e51f8382a20cec7752480d505957a2680b1)
Through the CSSOM, rules can be moved around, and so anything cached
(for now just the qualified layer name) needs to be recalculated when
that happens. This method is virtual so that other rules will be able
to clear their cached data too.
(cherry picked from commit d935a00413cbfc0d292406a1b97a327715882078)
Nested lists of declarations become CSSNestedDeclarations; at-rules are
allowed as long as they are CSSGroupingRules.
(cherry picked from commit 36afff97d18b6c67e718894f2fc9742c3f9d0122)
This is basically a list of properties, without a block around it. It'll
be part of CSSStyleRules' contents.
(cherry picked from commit 9c66ab356ac96602e5c1dc23906288fa187e9f01)
The support in LibWeb is quite easy as the previous commits introduced
helpers to support lab-like colors.
Now for the methods in Color:
- The formulas in `from_lab()` are derived from the CIEXYZ to CIELAB
formulas the "Colorimetry" paper published by the CIE.
- The conversion in `from_xyz50()` can be decomposed in multiple steps
XYZ D50 -> XYZ D65 -> Linear sRGB -> sRGB. The two first conversion
are done with a singular matrix operation. This matrix was generated
with a Python script [1].
This commit makes us pass all the `css/css-color/lab-00*.html` WPT
tests (0 to 7 at the time of writing).
[1] Python script used to generate the XYZ D50 -> Linear sRGB
conversion:
```python
import numpy as np
m_a = np.array([
[0.8951000, 0.2664000, -0.1614000],
[-0.7502000, 1.7135000, 0.0367000],
[0.0389000, -0.0685000, 1.0296000]
])
chromaticities_source = np.array([0.96422, 1, 0.82521])
chromaticities_destination = np.array([0.9505, 1, 1.0890])
cone_response_source = m_a @ chromaticities_source
cone_response_destination = m_a @ chromaticities_destination
cone_response_ratio = cone_response_destination / cone_response_source
m = np.linalg.inv(m_a) @ np.diagflat(cone_response_ratio) @ m_a
D50_to_D65 = m
xyz_65_to_srgb = np.array([
[3.2406, - 1.5372, - 0.4986],
[-0.9689, + 1.8758, 0.0415],
[0.0557, - 0.2040, 1.0570]
])
xyz_50_to_srgb = xyz_65_to_srgb @ D50_to_D65
print(xyz_50_to_srgb)
```
(cherry picked from commit 3406b69614e27dcb6036a6d2e5ca62833070c0a1;
amended to fix -Wdouble-promotion warnings)
This class provides the common base for both CSSOKLab and the future
CSSLab classes.
(cherry picked from commit 8efa046e0c56d970cabe5644e0e8b4eef85013c3)
This is currently only used for `oklab()` but will soon be also used for
`lab()` as well.
(cherry picked from commit 707bcaf6045b1eb36887bbf3af107b87d3def302)