mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Allow parsing unitless zero angles in hue-rotate().
Per https://github.com/w3c/fxtf-drafts/issues/228
This commit is contained in:
parent
25ae329156
commit
55439e6222
2 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue