Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291159 => 291160)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-11 14:08:29 UTC (rev 291160)
@@ -1,5 +1,16 @@
2022-03-11 Antoine Quint <grao...@webkit.org>
+ [web-animations] mask-mode should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237770
+
+ Reviewed by Antti Koivisto.
+
+ * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
+ * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
+
+2022-03-11 Antoine Quint <grao...@webkit.org>
+
[web-animations] mask-composite should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237769
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt (291159 => 291160)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt 2022-03-11 14:08:29 UTC (rev 291160)
@@ -43,6 +43,9 @@
PASS mask-image (type: discrete) has testAccumulation function
PASS mask-image: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS mask-image: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
+PASS mask-mode (type: discrete) has testAccumulation function
+PASS mask-mode: "luminance" onto "alpha"
+PASS mask-mode: "alpha" onto "luminance"
PASS mask-origin (type: discrete) has testAccumulation function
PASS mask-origin: "border-box" onto "content-box"
PASS mask-origin: "content-box" onto "border-box"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt (291159 => 291160)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt 2022-03-11 14:08:29 UTC (rev 291160)
@@ -43,6 +43,9 @@
PASS mask-image (type: discrete) has testAddition function
PASS mask-image: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS mask-image: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
+PASS mask-mode (type: discrete) has testAddition function
+PASS mask-mode: "luminance" onto "alpha"
+PASS mask-mode: "alpha" onto "luminance"
PASS mask-origin (type: discrete) has testAddition function
PASS mask-origin: "border-box" onto "content-box"
PASS mask-origin: "content-box" onto "border-box"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt (291159 => 291160)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt 2022-03-11 14:08:29 UTC (rev 291160)
@@ -54,6 +54,10 @@
FAIL mask-image uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with linear easing assert_equals: The value should be url("http://localhost/test-1") at 499ms expected "url(\"http://localhost/test-1\")" but got "url(\"http://localhost/test-2\")"
FAIL mask-image uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with effect easing assert_equals: The value should be url("http://localhost/test-1") at 940ms expected "url(\"http://localhost/test-1\")" but got "url(\"http://localhost/test-2\")"
FAIL mask-image uses discrete animation when animating between "url("http://localhost/test-1")" and "url("http://localhost/test-2")" with keyframe easing assert_equals: The value should be url("http://localhost/test-1") at 940ms expected "url(\"http://localhost/test-1\")" but got "url(\"http://localhost/test-2\")"
+PASS mask-mode (type: discrete) has testInterpolation function
+PASS mask-mode uses discrete animation when animating between "alpha" and "luminance" with linear easing
+PASS mask-mode uses discrete animation when animating between "alpha" and "luminance" with effect easing
+PASS mask-mode uses discrete animation when animating between "alpha" and "luminance" with keyframe easing
PASS mask-origin (type: discrete) has testInterpolation function
PASS mask-origin uses discrete animation when animating between "content-box" and "border-box" with linear easing
PASS mask-origin uses discrete animation when animating between "content-box" and "border-box" with effect easing
Modified: trunk/Source/WebCore/ChangeLog (291159 => 291160)
--- trunk/Source/WebCore/ChangeLog 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/Source/WebCore/ChangeLog 2022-03-11 14:08:29 UTC (rev 291160)
@@ -1,5 +1,15 @@
2022-03-11 Antoine Quint <grao...@webkit.org>
+ [web-animations] mask-mode should support discrete animation
+ https://bugs.webkit.org/show_bug.cgi?id=237770
+
+ Reviewed by Antti Koivisto.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+
+2022-03-11 Antoine Quint <grao...@webkit.org>
+
[web-animations] mask-composite should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237769
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (291159 => 291160)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-11 14:05:02 UTC (rev 291159)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-11 14:08:29 UTC (rev 291160)
@@ -1976,6 +1976,9 @@
case CSSPropertyMaskComposite:
m_fillLayerPropertyWrapper = makeUnique<DiscreteFillLayerPropertyWrapper<CompositeOperator>>(property, &FillLayer::composite, &FillLayer::setComposite);
break;
+ case CSSPropertyMaskMode:
+ m_fillLayerPropertyWrapper = makeUnique<DiscreteFillLayerPropertyWrapper<MaskMode>>(property, &FillLayer::maskMode, &FillLayer::setMaskMode);
+ break;
default:
break;
}
@@ -3014,6 +3017,7 @@
new FillLayersPropertyWrapper(CSSPropertyMaskClip, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),
new FillLayersPropertyWrapper(CSSPropertyMaskComposite, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),
+ new FillLayersPropertyWrapper(CSSPropertyMaskMode, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),
new FillLayersPropertyWrapper(CSSPropertyMaskOrigin, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),
new FillLayersPropertyWrapper(CSSPropertyWebkitMaskPositionX, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),
new FillLayersPropertyWrapper(CSSPropertyWebkitMaskPositionY, &RenderStyle::maskLayers, &RenderStyle::ensureMaskLayers),