Skip to content

Commit

Permalink
[WPT] Resync css/css-color
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258923
rdar://111844595

Reviewed by Tim Nguyen.

WPT @ 159c9d1

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-nested-for-color-property-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-nested-for-color-property-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-nested-for-color-property.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lab-l-over-100-1.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lab-l-over-100-2.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lch-l-over-100-1.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/lch-l-over-100-2.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-009-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklab-009.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklch-011-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/oklch-011.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-function-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/gamut-mapping-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/gamut-mapping.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/w3c-import.log:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/ios-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/265814@main
  • Loading branch information
mdubet committed Jul 6, 2023
1 parent 8e07bf0 commit 32806c9
Show file tree
Hide file tree
Showing 29 changed files with 617 additions and 520 deletions.
6 changes: 0 additions & 6 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4668,9 +4668,6 @@ webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sam
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-014.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-015.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-016.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-017.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-018.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-019.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-020.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-021.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/deprecated-sameas-022.html [ ImageOnlyFailure ]
Expand All @@ -4679,9 +4676,6 @@ webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-009.html [
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-009.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-010.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/system-color-compute.html [ Failure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/system-color-consistency.html [ Failure ]

webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-visited-link-initial.html [ ImageOnlyFailure ]
webkit.org/b/214455 imported/w3c/web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-table-border-currentcolor-responsive.html [ ImageOnlyFailure ]

Expand Down
1 change: 1 addition & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@
"web-platform-tests/css/css-color/color-mix-currentcolor-001-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-002-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html",
"web-platform-tests/css/css-color/color-mix-currentcolor-nested-for-color-property-ref.html",
"web-platform-tests/css/css-color/color-mix-non-srgb-001-ref.html",
"web-platform-tests/css/css-color/color-mix-percents-01-ref.html",
"web-platform-tests/css/css-color/composited-filters-under-opacity-ref.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Reference: currentColor is inherited correctly with a nested color-mix() for the color attribute</title>
<style>
div {
color: color(srgb 0.5 0.75 0.75);
}
</style>
<div>
<div>This text should be a light blue-green</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Reference: currentColor is inherited correctly with a nested color-mix() for the color attribute</title>
<style>
div {
color: color(srgb 0.5 0.75 0.75);
}
</style>
<div>
<div>This text should be a light blue-green</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="match" href="color-mix-currentcolor-nested-for-color-property-ref.html">
<title>currentColor is inherited correctly with a nested color-mix() for the color attribute</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<link rel="author" title="Aaron Krajeski" href="https://github.com/mysterydate">
<style>
body {
color: color(srgb 0 0 1);
}
div {
color: color-mix(in srgb, color-mix(in srgb, currentColor 50%, color(srgb 0 1 0)), white);
}
div > div {
color: inherit;
}
</style>
<div>
<div>This text should be a light blue-green</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title>
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#ok-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100">
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0% to 100%</title>
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#ok-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab">
<link rel="match" href="lab-l-over-100-ref.html">
<meta name="assert" content="lab() with lightness greater than 100%">
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in LCH is always clamped to a value between 0 to 100</title>
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#cie-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab">
<link rel="match" href="lch-l-over-100-ref.html">
<meta name="assert" content="lch() with lightness greater than 100">
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Verify lightness in LCH is always clamped to a value between 0% to 100%</title>
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#cie-lab">
<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab">
<link rel="match" href="lch-l-over-100-ref.html">
<meta name="assert" content="lch() with lightness graeter than 100%">
<style>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Green square reference</title>
<style>
.test { background-color: #008000; width: 12em; height: 12em;}
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: OKLab and OKLCH</title>
<link rel="author" title="James Stuckey Weber" href="mailto:james@jamessw.com">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#predefined-to-lab-oklab">
<link rel="match" href="greensquare-ref.html">
<meta name="assert" content="oklab() specifying a and b with percentages">
<style>
.test { background-color: red; width: 12em; height: 12em; }
.test { background-color: oklab(51.975% -35.075% 26.92%); } /* green (sRGB #008000) converted to OKLab */
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Green square reference</title>
<style>
.test { background-color: #008000; width: 12em; height: 12em;}
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: OKLab and OKLCH</title>
<link rel="author" title="James Stuckey Weber" href="mailto:james@jamessw.com">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#predefined-to-lab-oklab">
<link rel="match" href="greensquare-ref.html">
<meta name="assert" content="oklch() specifying C with percentage">
<style>
.test { background-color: red; width: 12em; height: 12em; }
.test { background-color: oklch(51.975% 44.215% 142.495); } /* green (sRGB #008000) converted to OKLCH */
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>
Loading

0 comments on commit 32806c9

Please sign in to comment.