mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-22 17:29:01 +00:00
LibWeb/CSS: Support the xyz-d65
colorspace in the color()
function
This also adds support for `xyz` as it defaults to `xyz-d65`. We now pass the following WPT tests: - css/css-color/xyz-001.html - css/css-color/xyz-002.html - css/css-color/xyz-004.html - css/css-color/xyz-d65-001.html - css/css-color/xyz-d65-002.html - css/css-color/xyz-d65-004.html
This commit is contained in:
parent
ff6102430e
commit
10dc7ff042
Notes:
github-actions[bot]
2024-11-09 14:16:30 +00:00
Author: https://github.com/LucasChollet
Commit: 10dc7ff042
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2029
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/tcl3
8 changed files with 70 additions and 3 deletions
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/xyz-001.html
Normal file
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/xyz-001.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Color 4: xyz</title>
|
||||
<link rel="author" title="Sam Weinig" href="mailto:weinig@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-color-4/#valdef-color-xyz">
|
||||
<link rel="match" href="../../../../expected/wpt-import/css/css-color/greensquare-ref.html">
|
||||
<meta name="assert" content="xyz with no alpha">
|
||||
<style>
|
||||
.test { background-color: red; width: 12em; height: 12em; }
|
||||
.test { background-color: color(xyz 0.07719 0.15438 0.02573); } /* green (sRGB #008000) converted to xyz */
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if you see a green square, and no red.</p>
|
||||
<div class="test"></div>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Color 4: xyz</title>
|
||||
<link rel="author" title="Sam Weinig" href="mailto:weinig@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-color-4/#valdef-color-xyz">
|
||||
<link rel="match" href="../../../../expected/wpt-import/css/css-color/greensquare-ref.html">
|
||||
<meta name="assert" content="xyz-d65 with no alpha">
|
||||
<style>
|
||||
.test { background-color: red; width: 12em; height: 12em; }
|
||||
.test { background-color: color(xyz-d65 0.07719 0.15438 0.02573); } /* green (sRGB #008000) converted to xyz-d65 */
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if you see a green square, and no red.</p>
|
||||
<div class="test"></div>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue