LibWeb: Store CSS color name in CSSRGB

When serializing an sRGB color value that originated from a named color,
it should return the color name converted to ASCII lowercase. This
requires storing the color name (if it has one).

This change also requires explicitly removing the color names when
computing style, because computed color values do not retain their name.
It also requires removing a caching optimization in create_from_color(),
because adding the name means that the cached value might be wrong.

This fixes some WPT subtests, and also required updating some of our own
tests.
This commit is contained in:
Milo van der Tier
2024-11-24 18:47:15 +01:00
committed by Andreas Kling
parent ff311c1560
commit 6bb8bf189f
Notes: github-actions[bot] 2024-11-25 10:52:53 +00:00
16 changed files with 133 additions and 69 deletions

View File

@@ -6,19 +6,19 @@ Rerun
Found 13 tests
1 Pass
12 Fail
11 Pass
2 Fail
Details
Result Test Name MessageFail CSSStyleRule is a CSSGroupingRule
Fail Simple CSSOM manipulation of subrules
Fail Simple CSSOM manipulation of subrules 1
Fail Simple CSSOM manipulation of subrules 2
Fail Simple CSSOM manipulation of subrules 3
Fail Simple CSSOM manipulation of subrules 4
Fail Simple CSSOM manipulation of subrules 5
Fail Simple CSSOM manipulation of subrules 6
Fail Simple CSSOM manipulation of subrules 7
Pass Simple CSSOM manipulation of subrules
Pass Simple CSSOM manipulation of subrules 1
Pass Simple CSSOM manipulation of subrules 2
Pass Simple CSSOM manipulation of subrules 3
Pass Simple CSSOM manipulation of subrules 4
Pass Simple CSSOM manipulation of subrules 5
Pass Simple CSSOM manipulation of subrules 6
Pass Simple CSSOM manipulation of subrules 7
Fail Simple CSSOM manipulation of subrules 8
Fail Simple CSSOM manipulation of subrules 9
Fail Simple CSSOM manipulation of subrules 10
Pass Simple CSSOM manipulation of subrules 9
Pass Simple CSSOM manipulation of subrules 10
Pass Mutating the selectorText of outer rule invalidates inner rules