commit d762927acf9fb9349b0b86041746049abd11d925 parent 6b72fc19a379e951ce66aec7d0ff4663bb08f4ec Author: Emilio Cobos Álvarez <emilio@crisal.io> Date: Tue, 28 Oct 2025 20:09:44 +0000 Bug 1996318 - Add display-p3-linear color-space to css color(). r=firefox-style-system-reviewers,dshin,supply-chain-reviewers It's display-p3 without gamma encoding. cssparser change will obviously go upstream. Differential Revision: https://phabricator.services.mozilla.com/D270012 Diffstat:
19 files changed, 49 insertions(+), 882 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock @@ -1337,7 +1337,7 @@ dependencies = [ [[package]] name = "cssparser" version = "0.35.0" -source = "git+https://github.com/servo/rust-cssparser?rev=03f982ed70ce1de67bef02de63b2e11e08a9e111#03f982ed70ce1de67bef02de63b2e11e08a9e111" +source = "git+https://github.com/servo/rust-cssparser?rev=03f982ed70ce1de67bef02de63b2e11e08a9e111#71b7cfe6f1cd85427ca905a41be31ca9f6af29a5" dependencies = [ "cssparser-macros", "dtoa-short", @@ -1349,7 +1349,7 @@ dependencies = [ [[package]] name = "cssparser-macros" version = "0.6.1" -source = "git+https://github.com/servo/rust-cssparser?rev=03f982ed70ce1de67bef02de63b2e11e08a9e111#03f982ed70ce1de67bef02de63b2e11e08a9e111" +source = "git+https://github.com/servo/rust-cssparser?rev=03f982ed70ce1de67bef02de63b2e11e08a9e111#71b7cfe6f1cd85427ca905a41be31ca9f6af29a5" dependencies = [ "quote", "syn", diff --git a/servo/components/style/color/convert.rs b/servo/components/style/color/convert.rs @@ -487,6 +487,28 @@ impl ColorSpaceConversion for DisplayP3 { } } +/// The Display-P3-linear color space. This is basically display-p3 without gamma encoding. +pub struct DisplayP3Linear; +impl ColorSpaceConversion for DisplayP3Linear { + const WHITE_POINT: WhitePoint = DisplayP3::WHITE_POINT; + + fn to_linear_light(from: &ColorComponents) -> ColorComponents { + *from + } + + fn to_xyz(from: &ColorComponents) -> ColorComponents { + DisplayP3::to_xyz(from) + } + + fn from_xyz(from: &ColorComponents) -> ColorComponents { + DisplayP3::from_xyz(from) + } + + fn to_gamma_encoded(from: &ColorComponents) -> ColorComponents { + *from + } +} + /// The a98-rgb color space. /// https://drafts.csswg.org/css-color-4/#predefined-a98-rgb pub struct A98Rgb; diff --git a/servo/components/style/color/mod.rs b/servo/components/style/color/mod.rs @@ -103,6 +103,9 @@ pub enum ColorSpace { /// A color specified with the color(..) function and the "display-p3" /// color space, e.g. "color(display-p3 0.84 0.19 0.72)". DisplayP3, + /// A color specified with the color(..) function and the "display-p3-linear" + /// color space. + DisplayP3Linear, /// A color specified with the color(..) function and the "a98-rgb" color /// space, e.g. "color(a98-rgb 0.44091 0.49971 0.37408)". A98Rgb, @@ -143,6 +146,7 @@ impl ColorSpace { Self::Srgb | Self::SrgbLinear | Self::DisplayP3 + | Self::DisplayP3Linear | Self::A98Rgb | Self::ProphotoRgb | Self::Rec2020 @@ -506,6 +510,7 @@ impl AbsoluteColor { }, ColorSpace::SrgbLinear | ColorSpace::DisplayP3 + | ColorSpace::DisplayP3Linear | ColorSpace::A98Rgb | ColorSpace::ProphotoRgb | ColorSpace::Rec2020 => match channel_keyword { @@ -576,6 +581,7 @@ impl AbsoluteColor { Hwb => convert::to_xyz::<convert::Hwb>(&components), SrgbLinear => convert::to_xyz::<convert::SrgbLinear>(&components), DisplayP3 => convert::to_xyz::<convert::DisplayP3>(&components), + DisplayP3Linear => convert::to_xyz::<convert::DisplayP3Linear>(&components), A98Rgb => convert::to_xyz::<convert::A98Rgb>(&components), ProphotoRgb => convert::to_xyz::<convert::ProphotoRgb>(&components), Rec2020 => convert::to_xyz::<convert::Rec2020>(&components), @@ -593,6 +599,9 @@ impl AbsoluteColor { Hwb => convert::from_xyz::<convert::Hwb>(&xyz, white_point), SrgbLinear => convert::from_xyz::<convert::SrgbLinear>(&xyz, white_point), DisplayP3 => convert::from_xyz::<convert::DisplayP3>(&xyz, white_point), + DisplayP3Linear => { + convert::from_xyz::<convert::DisplayP3Linear>(&xyz, white_point) + }, A98Rgb => convert::from_xyz::<convert::A98Rgb>(&xyz, white_point), ProphotoRgb => convert::from_xyz::<convert::ProphotoRgb>(&xyz, white_point), Rec2020 => convert::from_xyz::<convert::Rec2020>(&xyz, white_point), @@ -630,6 +639,7 @@ impl From<PredefinedColorSpace> for ColorSpace { PredefinedColorSpace::Srgb => ColorSpace::Srgb, PredefinedColorSpace::SrgbLinear => ColorSpace::SrgbLinear, PredefinedColorSpace::DisplayP3 => ColorSpace::DisplayP3, + PredefinedColorSpace::DisplayP3Linear => ColorSpace::DisplayP3Linear, PredefinedColorSpace::A98Rgb => ColorSpace::A98Rgb, PredefinedColorSpace::ProphotoRgb => ColorSpace::ProphotoRgb, PredefinedColorSpace::Rec2020 => ColorSpace::Rec2020, diff --git a/servo/components/style/color/to_css.rs b/servo/components/style/color/to_css.rs @@ -128,6 +128,7 @@ impl ToCss for AbsoluteColor { }, ColorSpace::SrgbLinear | ColorSpace::DisplayP3 + | ColorSpace::DisplayP3Linear | ColorSpace::A98Rgb | ColorSpace::ProphotoRgb | ColorSpace::Rec2020 @@ -135,7 +136,12 @@ impl ToCss for AbsoluteColor { | ColorSpace::XyzD65 => { // These color spaces are allowed. }, - _ => { + ColorSpace::Hsl + | ColorSpace::Hwb + | ColorSpace::Lab + | ColorSpace::Oklab + | ColorSpace::Lch + | ColorSpace::Oklch => { unreachable!("other color spaces do not support color() syntax") }, }; @@ -269,6 +275,7 @@ impl AbsoluteColor { }, ColorSpace::SrgbLinear | ColorSpace::DisplayP3 + | ColorSpace::DisplayP3Linear | ColorSpace::A98Rgb | ColorSpace::ProphotoRgb | ColorSpace::Rec2020 diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml @@ -1701,7 +1701,7 @@ notes = "All non-trivial changes authored or reviewed by Mozilla employees." [[audits.cssparser]] who = "Emilio Cobos Álvarez <emilio@crisal.io>" criteria = "safe-to-deploy" -delta = "0.35.0 -> 0.35.0@git:03f982ed70ce1de67bef02de63b2e11e08a9e111" +delta = "0.35.0 -> 0.35.0@git:71b7cfe6f1cd85427ca905a41be31ca9f6af29a5" notes = "Only dependency bumps and one trivial change with no unsafe change." [[audits.cssparser-color]] @@ -1727,7 +1727,7 @@ delta = "0.6.0 -> 0.6.1" [[audits.cssparser-macros]] who = "Emilio Cobos Álvarez <emilio@crisal.io>" criteria = "safe-to-deploy" -delta = "0.6.1 -> 0.6.1@git:03f982ed70ce1de67bef02de63b2e11e08a9e111" +delta = "0.6.1 -> 0.6.1@git:71b7cfe6f1cd85427ca905a41be31ca9f6af29a5" importable = false notes = "Only formatting changes." diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-001.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-001.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-001.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-002.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-002.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-002.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-003.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-003.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-003.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-004.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-004.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-004.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-005.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-005.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-005.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/display-p3-linear-006.html.ini b/testing/web-platform/meta/css/css-color/display-p3-linear-006.html.ini @@ -1,2 +0,0 @@ -[display-p3-linear-006.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-computed-color-function.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-computed-color-function.html.ini @@ -59,143 +59,8 @@ [Property color value 'color(srgb calc(0.5 + (sign(2cqw - 10px) * 0.1)) 0 0 / 0.52)'] expected: FAIL - [Property color value 'color(display-p3-linear 0% 0% 0%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 10% 10% 10%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear .2 .2 25%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0 0 0 / 1)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0% 0 0 / 0.5)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 20% 0 10/0.5)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 20% 0 10/50%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 400% 0 10/50%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 50% -160 160)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 50% -200 200)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0 0 0 / -10%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0 0 0 / 110%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0 0 0 / 300%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 200 200 200)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 200 200 200 / 200)'] - expected: FAIL - - [Property color value 'color(display-p3-linear -200 -200 -200)'] - expected: FAIL - - [Property color value 'color(display-p3-linear -200 -200 -200 / -200)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 200% 200% 200%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 200% 200% 200% / 200%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear -200% -200% -200% / -200%)'] - expected: FAIL - - [Property color value 'color(display-p3-linear calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))'] - expected: FAIL - - [Property color value 'color(display-p3-linear calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))'] - expected: FAIL - - [Property color value 'color(display-p3-linear none none none / none)'] - expected: FAIL - - [Property color value 'color(display-p3-linear none none none)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 10% none none / none)'] - expected: FAIL - - [Property color value 'color(display-p3-linear none none none / 0.5)'] - expected: FAIL - - [Property color value 'color(display-p3-linear 0 0 0 / none)'] - expected: FAIL - - [Property color value 'color(display-p3-linear calc(NaN) 0 0)'] - expected: FAIL - - [Property color value 'color(display-p3-linear calc(0 / 0) 0 0)'] - expected: FAIL - [Property color value 'color(display-p3-linear calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)'] expected: FAIL [Property color value 'color(display-p3-linear 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))'] expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 0.50 0.200)' [Display P3 Linear all numbers\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% 50% 20%)' [Display P3 Linear all percent\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% 0.5 20%)' [Display P3 Linear mixed number and percent\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 50% 0.2)' [Display P3 Linear mixed number and percent 2\]] - expected: FAIL - - [Property color value 'color(display-p3-linear none none none)' [Display P3 Linear all none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 none 0.2)' [Display P3 Linear number and none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% none 20%)' [Display P3 Linear percent and none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% none 0.2)' [Display P3 Linear number, percent and none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 0.50 0.200 / 0.6)' [Display P3 Linear with alpha, all numbers\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% 50% 20% / 60%)' [Display P3 Linear with alpha, all percent\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% 0.5 20% / 0.6)' [Display P3 Linear with alpha, mixed number and percent\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 50% 0.2 / 60%)' [Display P3 Linear with alpha, mixed number and percent 2\]] - expected: FAIL - - [Property color value 'color(display-p3-linear none none none / none)' [Display P3 Linear with alpha, all none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 1.00 none 0.2 / none)' [Display P3 Linear with alpha, number and none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% none 20% / 30%)' [Display P3 Linear with alpha, percent and none\]] - expected: FAIL - - [Property color value 'color(display-p3-linear 100% none 0.2 / 23.7%)' [Display P3 Linear with alpha, number, percent and none\]] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-computed-color-mix-function.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-computed-color-mix-function.html.ini @@ -2,132 +2,6 @@ [Property color value 'color-mix(in srgb, red calc(50% + (sign(100em - 1px) * 10%)), blue)'] expected: FAIL - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 25%, color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, 25% color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7) 25%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), 25% color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 25%, color(display-p3-linear .5 .6 .7) 75%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 30%, color(display-p3-linear .5 .6 .7) 90%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 12.5%, color(display-p3-linear .5 .6 .7) 37.5%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 0%, color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .5), color(display-p3-linear .5 .6 .7 / .8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 25%, color(display-p3-linear .5 .6 .7 / .8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, 25% color(display-p3-linear .1 .2 .3 / .4), color(display-p3-linear .5 .6 .7 / .8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4), color(display-p3-linear .5 .6 .7 / .8) 25%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4), 25% color(display-p3-linear .5 .6 .7 / .8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 25%, color(display-p3-linear .5 .6 .7 / .8) 75%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 30%, color(display-p3-linear .5 .6 .7 / .8) 90%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 12.5%, color(display-p3-linear .5 .6 .7 / .8) 37.5%)'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 0%, color(display-p3-linear .5 .6 .7 / .8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, transparent, color(display-p3-linear 0.3 0.4 0.5))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, transparent 10%, color(display-p3-linear 0.3 0.4 0.5))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear 0.1 0.2 0.3 / 0), color(display-p3-linear 0.3 0.4 0.5))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear 0.1 0.2 0.3 / 0) 10%, color(display-p3-linear 0.3 0.4 0.5))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear 1 1 1), color(display-p3-linear 0 0 1))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear 1 1 1) 10%, color(display-p3-linear 0 0 1))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear 2 3 4 / 5), color(display-p3-linear 4 6 8 / 10))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear -2 -3 -4), color(display-p3-linear -4 -6 -8))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear -2 -3 -4 / -5), color(display-p3-linear -4 -6 -8 / -10))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear none none none), color(display-p3-linear none none none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear none none none), color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear none none none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 none), color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear none .2 .3), color(display-p3-linear .5 none .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / 0.5))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear 0.5 none none / none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear none 0.5 none / none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear none none 0.5 / none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear 0.5 0.5 none / none))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear none none none / 50%))'] - expected: FAIL - - [Property color value 'color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / 25%) 0%, color(display-p3-linear 0.5 none none / 50%))'] - expected: FAIL - [Property color value 'color-mix(oklab(0.1 0.2 0.3), oklab(0.5 0.6 0.7))'] expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-computed-relative-color.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-computed-relative-color.html.ini @@ -1,225 +1,3 @@ [color-computed-relative-color.html] [Property color value 'LCH(from var(--accent) l c calc(h + 180 * sibling-index()))'] expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 0 0)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 0 0 / 0)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 0 b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 0 / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 0)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 0 g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 0 b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 0 / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 0)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0.2 g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 20% g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 0.2 b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 20% b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 0.2 / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 20% / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 0.2)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 20%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 0.2 g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 20% g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 0.2 b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 20% b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 0.2 / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 20% / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 0.2)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 20%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 2 3 4)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 2 3 4 / 5)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -2 -3 -4)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -2 -3 -4 / -5)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 200% 300% 400%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 200% 300% 400% / 500%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -200% -300% -400%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -200% -300% -400% / -500%)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear g b r)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear b alpha r / g)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r r r / r)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear alpha alpha alpha / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear g b r)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear b alpha r / g)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r r r / r)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear alpha alpha alpha / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 1.7 1.5 1.3) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 1.7 1.5 1.3) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 1.7 1.5 1.3 / 140%) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 1.7 1.5 1.3 / 140%) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear -0.7 -0.5 -0.3) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear -0.7 -0.5 -0.3) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear -0.7 -0.5 -0.3 / -40%) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear -0.7 -0.5 -0.3 / -40%) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear calc(r) calc(g) calc(b))'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear calc(r) calc(g) calc(b) / calc(alpha))'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 0.8) display-p3-linear calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear calc(r * 100%) calc(g * 100%) calc(b * 100%) / calc(alpha * 100%))'] - expected: FAIL - - [Property color value 'color(from color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / calc(alpha + 0.5)) display-p3-linear r g b / calc(alpha - 0.5))'] - expected: FAIL - - [Property color value 'color(from color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / calc(alpha - 1.5)) display-p3-linear r g b / calc(alpha + 0.5))'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear none none none)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear none none none / none)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g none)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g none / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / none)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g none / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / none)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear none none none) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear none none none / none) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 none 0.3) display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color(display-p3-linear 0.7 0.5 0.3 / none) display-p3-linear r g b / alpha)'] - expected: FAIL - - [Property background-color value 'color(from currentColor display-p3-linear r g b)'] - expected: FAIL - - [Property color value 'color(from color-mix(in xyz, color(display-p3-linear 0.7 0.5 0.3), color(display-p3-linear 0.7 0.5 0.3)) display-p3-linear r g b / alpha)'] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-valid-color-function.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-valid-color-function.html.ini @@ -134,66 +134,6 @@ [e.style['color'\] = "color(xyz-d65 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value] expected: FAIL - [e.style['color'\] = "color(display-p3-linear 0% 0% 0%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 10% 10% 10%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear .2 .2 25%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 0 0 / 1)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0% 0 0 / 0.5)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 20% 0 10/0.5)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 20% 0 10/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 400% 0 10/50%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 50% -160 160)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 50% -200 200)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 0 0 / -10%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 0 0 / 110%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 0 0 / 300%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 200 200 200)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 200 200 200 / 200)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear -200 -200 -200)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear -200 -200 -200 / -200)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 200% 200% 200%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 200% 200% 200% / 200%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear -200% -200% -200% / -200%)" should set the property value] - expected: FAIL - [e.style['color'\] = "color(display-p3-linear calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value] expected: FAIL @@ -203,33 +143,6 @@ [e.style['color'\] = "color(display-p3-linear calc(50%) 50% 0.5)" should set the property value] expected: FAIL - [e.style['color'\] = "color(display-p3-linear none none none / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear none none none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 10% none none / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear none none none / 0.5)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 0 0 / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 calc(infinity) 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear 0 calc(-infinity) 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear calc(NaN) 0 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(display-p3-linear calc(0 / 0) 0 0)" should set the property value] - expected: FAIL - [e.style['color'\] = "color(display-p3-linear calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value] expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -2,90 +2,6 @@ [e.style['color'\] = "color-mix(in hsl, red calc(50% * sign(100em - 1px)), blue)" should set the property value] expected: FAIL - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, 50% color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), 50% color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 25%, color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7) 25%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 25%, color(display-p3-linear .5 .6 .7) 75%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 30%, color(display-p3-linear .5 .6 .7) 90%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 12.5%, color(display-p3-linear .5 .6 .7) 37.5%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3) 0%, color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .5), color(display-p3-linear .5 .6 .7 / .8))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 25%, color(display-p3-linear .5 .6 .7 / .8))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4), color(display-p3-linear .5 .6 .7 / .8) 25%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 25%, color(display-p3-linear .5 .6 .7 / .8) 75%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 30%, color(display-p3-linear .5 .6 .7 / .8) 90%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 12.5%, color(display-p3-linear .5 .6 .7 / .8) 37.5%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / .4) 0%, color(display-p3-linear .5 .6 .7 / .8))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear 2 3 4 / 5), color(display-p3-linear 4 6 8 / 10))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear -2 -3 -4), color(display-p3-linear -4 -6 -8))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear -2 -3 -4 / -5), color(display-p3-linear -4 -6 -8 / -10))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear none none none), color(display-p3-linear none none none))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear none none none), color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear none none none))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 none), color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 none))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear none .2 .3), color(display-p3-linear .5 none .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / 0.5))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / none))" should set the property value] - expected: FAIL - [e.style['color'\] = "color-mix(hsl(120deg 10% 20%), hsl(30deg 30% 40%))" should set the property value] expected: FAIL diff --git a/testing/web-platform/meta/css/css-color/parsing/color-valid-relative-color.html.ini b/testing/web-platform/meta/css/css-color/parsing/color-valid-relative-color.html.ini @@ -2,215 +2,5 @@ [e.style['color'\] = "oklch(from red calc(1 / l) c h)" should set the property value] expected: [FAIL, PASS] - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 0 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 0 0 / 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0 g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 0 b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 0 / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 0 g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 0 b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 0 / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 0)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 0.2 g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 20% g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 0.2 b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r 20% b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 0.2 / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g 20% / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 0.2)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / 20%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 0.2 g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear 20% g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 0.2 b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r 20% b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 0.2 / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g 20% / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 0.2)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / 20%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 2 3 4)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 2 3 4 / 5)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -2 -3 -4)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -2 -3 -4 / -5)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 200% 300% 400%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear 200% 300% 400% / 500%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -200% -300% -400%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear -200% -300% -400% / -500%)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear g b r)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear b alpha r / g)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r r r / r)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear alpha alpha alpha / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear g b r)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear b alpha r / g)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r r r / r)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear alpha alpha alpha / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 1.7 1.5 1.3) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 1.7 1.5 1.3) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 1.7 1.5 1.3 / 140%) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 1.7 1.5 1.3 / 140%) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear -0.7 -0.5 -0.3) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear -0.7 -0.5 -0.3) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear -0.7 -0.5 -0.3 / -40%) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear -0.7 -0.5 -0.3 / -40%) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear calc(r) calc(g) calc(b))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear calc(r) calc(g) calc(b) / calc(alpha))" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear none none none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear none none none / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g none / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3) display-p3-linear r g b / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g none / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / 40%) display-p3-linear r g b / none)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear none none none) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear none none none / none) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 none 0.3) display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color(display-p3-linear 0.7 0.5 0.3 / none) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from currentColor display-p3-linear r g b)" should set the property value] - expected: FAIL - - [e.style['color'\] = "color(from color-mix(in display-p3-linear, color(display-p3-linear 0.7 0.5 0.3), color(display-p3-linear 0.7 0.5 0.3)) display-p3-linear r g b / alpha)" should set the property value] - expected: FAIL - [e.style['color'\] = "oklab(from color-mix(in oklab, oklab(0.25 0.2 0.5), oklab(0.25 0.2 0.5)) l a b / alpha)" should set the property value] expected: FAIL diff --git a/third_party/rust/cssparser/Cargo.toml b/third_party/rust/cssparser/Cargo.toml @@ -52,7 +52,7 @@ smallvec = "1.0" [dependencies.cssparser-macros] version = "0.6.1" -path = "./macros" +path = "../cssparser-macros" [dependencies.malloc_size_of] version = "0.1" diff --git a/third_party/rust/cssparser/src/color.rs b/third_party/rust/cssparser/src/color.rs @@ -85,6 +85,8 @@ pub enum PredefinedColorSpace { SrgbLinear, /// <https://drafts.csswg.org/css-color-4/#predefined-display-p3> DisplayP3, + /// <https://drafts.csswg.org/css-color-4/#predefined-display-p3-linear> + DisplayP3Linear, /// <https://drafts.csswg.org/css-color-4/#predefined-a98-rgb> A98Rgb, /// <https://drafts.csswg.org/css-color-4/#predefined-prophoto-rgb> @@ -107,6 +109,7 @@ impl PredefinedColorSpace { "srgb" => Self::Srgb, "srgb-linear" => Self::SrgbLinear, "display-p3" => Self::DisplayP3, + "display-p3-linear" => Self::DisplayP3Linear, "a98-rgb" => Self::A98Rgb, "prophoto-rgb" => Self::ProphotoRgb, "rec2020" => Self::Rec2020, @@ -126,6 +129,7 @@ impl ToCss for PredefinedColorSpace { Self::Srgb => "srgb", Self::SrgbLinear => "srgb-linear", Self::DisplayP3 => "display-p3", + Self::DisplayP3Linear => "display-p3-linear", Self::A98Rgb => "a98-rgb", Self::ProphotoRgb => "prophoto-rgb", Self::Rec2020 => "rec2020",