mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 10:06:03 +00:00
LibWeb: Use correct angle type when serializing hue-rotate filter values
At some point `hue-rotate` was changed to use `AngleOrCalculated` rather than `Angle`, but `Angle` was still being used in a `visit`, which otherwise defaulted to zero. This caused all `hue-rotate` angles to serialize to zero.
This commit is contained in:
parent
d38fac7518
commit
854d48f973
Notes:
github-actions[bot]
2025-07-21 22:54:40 +00:00
Author: https://github.com/tcl3
Commit: 854d48f973
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5516
3 changed files with 8 additions and 8 deletions
|
@ -67,10 +67,10 @@ String FilterValueListStyleValue::to_string(SerializationMode) const
|
||||||
[&](FilterOperation::HueRotate const& hue_rotate) {
|
[&](FilterOperation::HueRotate const& hue_rotate) {
|
||||||
builder.append("hue-rotate("sv);
|
builder.append("hue-rotate("sv);
|
||||||
hue_rotate.angle.visit(
|
hue_rotate.angle.visit(
|
||||||
[&](Angle const& angle) {
|
[&](AngleOrCalculated const& angle) {
|
||||||
builder.append(angle.to_string());
|
builder.append(angle.to_string());
|
||||||
},
|
},
|
||||||
[&](auto&) {
|
[&](FilterOperation::HueRotate::Zero const&) {
|
||||||
builder.append("0deg"sv);
|
builder.append("0deg"sv);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
||||||
|
|
||||||
Found 34 tests
|
Found 34 tests
|
||||||
|
|
||||||
22 Pass
|
23 Pass
|
||||||
12 Fail
|
11 Fail
|
||||||
Pass Property filter value 'none'
|
Pass Property filter value 'none'
|
||||||
Pass Property filter value 'blur(100px)'
|
Pass Property filter value 'blur(100px)'
|
||||||
Pass Property filter value 'blur()'
|
Pass Property filter value 'blur()'
|
||||||
|
@ -20,7 +20,7 @@ Fail Property filter value 'grayscale(calc(50%))'
|
||||||
Pass Property filter value 'grayscale(2)'
|
Pass Property filter value 'grayscale(2)'
|
||||||
Fail Property filter value 'grayscale(calc(2))'
|
Fail Property filter value 'grayscale(calc(2))'
|
||||||
Pass Property filter value 'grayscale()'
|
Pass Property filter value 'grayscale()'
|
||||||
Fail Property filter value 'hue-rotate(90deg)'
|
Pass Property filter value 'hue-rotate(90deg)'
|
||||||
Pass Property filter value 'hue-rotate()'
|
Pass Property filter value 'hue-rotate()'
|
||||||
Pass Property filter value 'invert(0)'
|
Pass Property filter value 'invert(0)'
|
||||||
Fail Property filter value 'invert(100%)'
|
Fail Property filter value 'invert(100%)'
|
||||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
||||||
|
|
||||||
Found 39 tests
|
Found 39 tests
|
||||||
|
|
||||||
35 Pass
|
36 Pass
|
||||||
4 Fail
|
3 Fail
|
||||||
Pass e.style['filter'] = "none" should set the property value
|
Pass e.style['filter'] = "none" should set the property value
|
||||||
Pass e.style['filter'] = "blur(100px)" should set the property value
|
Pass e.style['filter'] = "blur(100px)" should set the property value
|
||||||
Pass e.style['filter'] = "blur(0)" should set the property value
|
Pass e.style['filter'] = "blur(0)" should set the property value
|
||||||
|
@ -25,7 +25,7 @@ Pass e.style['filter'] = "grayscale(300%)" should set the property value
|
||||||
Pass e.style['filter'] = "grayscale(calc(300%))" should set the property value
|
Pass e.style['filter'] = "grayscale(calc(300%))" should set the property value
|
||||||
Pass e.style['filter'] = "grayscale(calc(101% * sign(1em - 1px)))" should set the property value
|
Pass e.style['filter'] = "grayscale(calc(101% * sign(1em - 1px)))" should set the property value
|
||||||
Pass e.style['filter'] = "grayscale()" should set the property value
|
Pass e.style['filter'] = "grayscale()" should set the property value
|
||||||
Fail e.style['filter'] = "hue-rotate(90deg)" should set the property value
|
Pass e.style['filter'] = "hue-rotate(90deg)" should set the property value
|
||||||
Pass e.style['filter'] = "hue-rotate(0)" should set the property value
|
Pass e.style['filter'] = "hue-rotate(0)" should set the property value
|
||||||
Pass e.style['filter'] = "hue-rotate()" should set the property value
|
Pass e.style['filter'] = "hue-rotate()" should set the property value
|
||||||
Pass e.style['filter'] = "invert(0)" should set the property value
|
Pass e.style['filter'] = "invert(0)" should set the property value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue