Skip to content

Commit

Permalink
Sync WPT css-color/color-mix tests.
Browse files Browse the repository at this point in the history
Reviewed by Tim Nguyen.

From WPT revision 6c984bf.

* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-basic-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-001-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-001.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-002-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-002.html: Added.

Canonical link: https://commits.webkit.org/254191@main
  • Loading branch information
mdubet authored and Brent Fulgham committed Sep 6, 2022
1 parent 0599c10 commit ed799eb
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 1 deletion.
2 changes: 2 additions & 0 deletions LayoutTests/TestExpectations
Expand Up @@ -5034,6 +5034,8 @@ webkit.org/b/234690 imported/w3c/web-platform-tests/css/css-color/inline-opacity

# color-mix() doesn't work with currentcolor
webkit.org/b/234691 imported/w3c/web-platform-tests/css/css-color/color-mix-basic-001.html [ ImageOnlyFailure ]
webkit.org/b/234691 imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-001.html [ ImageOnlyFailure ]
webkit.org/b/234691 imported/w3c/web-platform-tests/css/css-color/color-mix-currentcolor-002.html [ ImageOnlyFailure ]

# display-p3 canvas and ImageData are Cocoa only for now.
fast/canvas/canvas-color-space-display-p3-ImageData.html [ Failure ]
Expand Down
Expand Up @@ -3,7 +3,7 @@
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1695376">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<link rel="match" href="./color-mix-basic-01-ref.html">
<link rel="match" href="color-mix-basic-001-ref.html">
<style>
div { color: black; }
.test { background-color: red; width: 14em; height: 1em; margin-top: 0; margin-bottom: 0; }
Expand Down
@@ -0,0 +1,11 @@
<!doctype html>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
color: red;
background-color: green;
}
</style>
<div></div>
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset=utf-8>
<link rel="match" href="color-mix-currentcolor-001-ref.html">
<title>currentColor is inherited correctly in color-mix()</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<style>
div {
width: 100px;
height: 100px;
background-color: red;
color: red;
background-color: color-mix(in srgb, currentColor 50%, green);
}
div div {
color: green;
background-color: inherit;
}
</style>
<div>
<div></div>
</div>
@@ -0,0 +1,11 @@
<!doctype html>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
color: red;
background-color: color-mix(in lch, green 50%, blue);
}
</style>
<div></div>
@@ -0,0 +1,22 @@
<!doctype html>
<link rel="match" href="color-mix-currentcolor-002-ref.html">
<title>currentColor is mixed with the correct color-space in color-mix()</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="author" href="https://mozilla.org" title="Mozilla">
<style>
div {
width: 100px;
height: 100px;
background-color: red;
color: red;
background-color: color-mix(in lch, currentColor 50%, blue);
}
div div {
color: green;
background-color: inherit;
}
</style>
<div>
<div></div>
</div>

0 comments on commit ed799eb

Please sign in to comment.