diff --git a/components/style/values/specified/effects.rs b/components/style/values/specified/effects.rs index 7ecb3fce72c..f4f11717f6a 100644 --- a/components/style/values/specified/effects.rs +++ b/components/style/values/specified/effects.rs @@ -205,7 +205,11 @@ impl Parse for Filter { // https://drafts.fxtf.org/filter-effects/#funcdef-filter-grayscale Ok(GenericFilter::Grayscale(Factor::parse_with_clamping_to_one(context, i)?)) }, - "hue-rotate" => Ok(GenericFilter::HueRotate(Angle::parse(context, i)?)), + "hue-rotate" => { + // We allow unitless zero here, see: + // https://github.com/w3c/fxtf-drafts/issues/228 + Ok(GenericFilter::HueRotate(Angle::parse_with_unitless(context, i)?)) + }, "invert" => { // Values of amount over 100% are allowed but UAs must clamp the values to 1. // https://drafts.fxtf.org/filter-effects/#funcdef-filter-invert diff --git a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini index 025b204a267..13a7cbc5517 100644 --- a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini +++ b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini @@ -29,12 +29,6 @@ [Serialization should round-trip after setting e.style['filter'\] = "drop-shadow(1px 2px 3px rgba(4, 5, 6, 0.75))"] expected: FAIL - [e.style['filter'\] = "hue-rotate(0)" should set the property value] - expected: FAIL - - [Serialization should round-trip after setting e.style['filter'\] = "hue-rotate(0)"] - expected: FAIL - [e.style['filter'\] = "url(picture.svg#f)" should set the property value] expected: FAIL