Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291099 => 291100)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-10 11:38:43 UTC (rev 291100)
@@ -1,3 +1,14 @@
+2022-03-09 Antoine Quint <[email protected]>
+
+ [web-animations] fill-rule should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237648
+
+ Reviewed by Antti Koivisto.
+
+ * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
+
2022-03-10 Antoine Quint <[email protected]>
[web-animations] counter-reset should support discrete animation
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt (291099 => 291100)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2022-03-10 11:38:43 UTC (rev 291100)
@@ -193,6 +193,9 @@
PASS fill-opacity (type: opacity) has testAccumulation function
PASS fill-opacity: [0, 1] number
PASS fill-opacity: [0, 1] number (clamped)
+PASS fill-rule (type: discrete) has testAccumulation function
+PASS fill-rule: "nonzero" onto "evenodd"
+PASS fill-rule: "evenodd" onto "nonzero"
PASS filter (type: filterList) has testAccumulation function
FAIL filter: same ordered filter functions assert_equals: The value should be blur(30px) brightness(0) at 0ms expected "blur(30px) brightness(0)" but got "blur(30px) brightness(0.4)"
PASS filter: mismatched ordered filter functions
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt (291099 => 291100)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2022-03-10 11:38:43 UTC (rev 291100)
@@ -193,6 +193,9 @@
PASS fill-opacity (type: opacity) has testAddition function
PASS fill-opacity: [0, 1] number
PASS fill-opacity: [0, 1] number (clamped)
+PASS fill-rule (type: discrete) has testAddition function
+PASS fill-rule: "nonzero" onto "evenodd"
+PASS fill-rule: "evenodd" onto "nonzero"
PASS filter (type: filterList) has testAddition function
FAIL filter: blur on blur assert_equals: The value should be blur(10px) blur(20px) at 0ms expected "blur(10px) blur(20px)" but got "blur(30px)"
FAIL filter: different filter functions assert_equals: The value should be blur(10px) brightness(0.8) at 0ms expected "blur(10px) brightness(0.8)" but got "brightness(0.8)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt (291099 => 291100)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2022-03-10 11:38:43 UTC (rev 291100)
@@ -233,6 +233,10 @@
PASS empty-cells uses discrete animation when animating between "show" and "hide" with keyframe easing
PASS fill-opacity (type: opacity) has testInterpolation function
PASS fill-opacity supports animating as a [0, 1] number
+PASS fill-rule (type: discrete) has testInterpolation function
+PASS fill-rule uses discrete animation when animating between "evenodd" and "nonzero" with linear easing
+PASS fill-rule uses discrete animation when animating between "evenodd" and "nonzero" with effect easing
+PASS fill-rule uses discrete animation when animating between "evenodd" and "nonzero" with keyframe easing
PASS filter (type: filterList) has testInterpolation function
PASS filter: blur function
PASS filter: hue-rotate function with same unit(deg)
Modified: trunk/Source/WebCore/ChangeLog (291099 => 291100)
--- trunk/Source/WebCore/ChangeLog 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/Source/WebCore/ChangeLog 2022-03-10 11:38:43 UTC (rev 291100)
@@ -1,3 +1,16 @@
+2022-03-09 Antoine Quint <[email protected]>
+
+ [web-animations] fill-rule should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237648
+
+ Reviewed by Antti Koivisto.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::fillRule const):
+ (WebCore::RenderStyle::setFillRule):
+
2022-03-10 Antoine Quint <[email protected]>
[web-animations] counter-reset should support discrete animation
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (291099 => 291100)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-10 11:38:43 UTC (rev 291100)
@@ -2925,7 +2925,8 @@
new DiscretePropertyWrapper<ColorInterpolation>(CSSPropertyColorInterpolationFilters, &RenderStyle::colorInterpolationFilters, &RenderStyle::setColorInterpolationFilters),
new DiscretePropertyWrapper<DominantBaseline>(CSSPropertyDominantBaseline, &RenderStyle::dominantBaseline, &RenderStyle::setDominantBaseline),
new CounterWrapper(CSSPropertyCounterIncrement),
- new CounterWrapper(CSSPropertyCounterReset)
+ new CounterWrapper(CSSPropertyCounterReset),
+ new DiscretePropertyWrapper<WindRule>(CSSPropertyFillRule, &RenderStyle::fillRule, &RenderStyle::setFillRule)
};
const unsigned animatableLonghandPropertiesCount = WTF_ARRAY_LENGTH(animatableLonghandPropertyWrappers);
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (291099 => 291100)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2022-03-10 11:16:02 UTC (rev 291099)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2022-03-10 11:38:43 UTC (rev 291100)
@@ -1440,6 +1440,9 @@
DominantBaseline dominantBaseline() const { return svgStyle().dominantBaseline(); }
void setDominantBaseline(DominantBaseline dominantBaseline) { return accessSVGStyle().setDominantBaseline(dominantBaseline); }
+ WindRule fillRule() const { return svgStyle().fillRule(); }
+ void setFillRule(WindRule fillRule) { accessSVGStyle().setFillRule(fillRule); }
+
SVGPaintType fillPaintType() const { return svgStyle().fillPaintType(); }
Color fillPaintColor() const { return svgStyle().fillPaintColor(); }
void setFillPaintColor(const Color& color) { accessSVGStyle().setFillPaint(SVGPaintType::RGBColor, color, emptyString()); }