Title: [291041] trunk
Revision
291041
Author
grao...@webkit.org
Date
2022-03-09 04:55:11 -0800 (Wed, 09 Mar 2022)

Log Message

[web-animations] background-blend-mode should support discrete animation
https://bugs.webkit.org/show_bug.cgi?id=237607

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

* 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:

Source/WebCore:

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::backgroundBlendMode const):
(WebCore::RenderStyle::setBackgroundBlendMode):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (291040 => 291041)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-03-09 12:55:11 UTC (rev 291041)
@@ -1,5 +1,16 @@
 2022-03-08  Antoine Quint  <grao...@webkit.org>
 
+        [web-animations] background-blend-mode should support discrete animation
+        https://bugs.webkit.org/show_bug.cgi?id=237607
+
+        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-08  Antoine Quint  <grao...@webkit.org>
+
         [web-animations] font-family should support discrete animation
         https://bugs.webkit.org/show_bug.cgi?id=237591
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt (291040 => 291041)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt	2022-03-09 12:55:11 UTC (rev 291041)
@@ -22,6 +22,9 @@
 PASS background-color supports animating as color of #RGBa
 PASS background-color supports animating as color of rgba()
 PASS background-color supports animating as color of hsla()
+PASS background-blend-mode (type: discrete) has testAccumulation function
+PASS background-blend-mode: "screen" onto "multiply"
+PASS background-blend-mode: "multiply" onto "screen"
 PASS background-clip (type: discrete) has testAccumulation function
 PASS background-clip: "content-box" onto "padding-box"
 PASS background-clip: "padding-box" onto "content-box"

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt (291040 => 291041)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt	2022-03-09 12:55:11 UTC (rev 291041)
@@ -22,6 +22,9 @@
 PASS background-color supports animating as color of #RGBa
 PASS background-color supports animating as color of rgba()
 PASS background-color supports animating as color of hsla()
+PASS background-blend-mode (type: discrete) has testAddition function
+PASS background-blend-mode: "screen" onto "multiply"
+PASS background-blend-mode: "multiply" onto "screen"
 PASS background-clip (type: discrete) has testAddition function
 PASS background-clip: "content-box" onto "padding-box"
 PASS background-clip: "padding-box" onto "content-box"

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt (291040 => 291041)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt	2022-03-09 12:55:11 UTC (rev 291041)
@@ -27,6 +27,10 @@
 PASS background-color supports animating as color of #RGBa
 PASS background-color supports animating as color of rgba()
 PASS background-color supports animating as color of hsla()
+PASS background-blend-mode (type: discrete) has testInterpolation function
+PASS background-blend-mode uses discrete animation when animating between "multiply" and "screen" with linear easing
+PASS background-blend-mode uses discrete animation when animating between "multiply" and "screen" with effect easing
+PASS background-blend-mode uses discrete animation when animating between "multiply" and "screen" with keyframe easing
 PASS background-clip (type: discrete) has testInterpolation function
 PASS background-clip uses discrete animation when animating between "padding-box" and "content-box" with linear easing
 PASS background-clip uses discrete animation when animating between "padding-box" and "content-box" with effect easing

Modified: trunk/Source/WebCore/ChangeLog (291040 => 291041)


--- trunk/Source/WebCore/ChangeLog	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/Source/WebCore/ChangeLog	2022-03-09 12:55:11 UTC (rev 291041)
@@ -1,5 +1,18 @@
 2022-03-08  Antoine Quint  <grao...@webkit.org>
 
+        [web-animations] background-blend-mode should support discrete animation
+        https://bugs.webkit.org/show_bug.cgi?id=237607
+
+        Reviewed by Antti Koivisto.
+
+        * animation/CSSPropertyAnimation.cpp:
+        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::backgroundBlendMode const):
+        (WebCore::RenderStyle::setBackgroundBlendMode):
+
+2022-03-08  Antoine Quint  <grao...@webkit.org>
+
         [web-animations] font-family should support discrete animation
         https://bugs.webkit.org/show_bug.cgi?id=237591
 

Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (291040 => 291041)


--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp	2022-03-09 12:55:11 UTC (rev 291041)
@@ -2826,6 +2826,7 @@
 #if ENABLE(CSS_COMPOSITING)
         new DiscretePropertyWrapper<Isolation>(CSSPropertyIsolation, &RenderStyle::isolation, &RenderStyle::setIsolation),
         new DiscretePropertyWrapper<BlendMode>(CSSPropertyMixBlendMode, &RenderStyle::blendMode, &RenderStyle::setBlendMode),
+        new DiscretePropertyWrapper<BlendMode>(CSSPropertyBackgroundBlendMode, &RenderStyle::backgroundBlendMode, &RenderStyle::setBackgroundBlendMode),
 #endif
         new PropertyWrapperAspectRatio,
         new DiscretePropertyWrapper<FontPalette>(CSSPropertyFontPalette, &RenderStyle::fontPalette, &RenderStyle::setFontPalette),

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (291040 => 291041)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2022-03-09 12:52:33 UTC (rev 291040)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2022-03-09 12:55:11 UTC (rev 291041)
@@ -431,6 +431,7 @@
     const LengthSize& backgroundSizeLength() const { return m_backgroundData->background->sizeLength(); }
     FillLayer& ensureBackgroundLayers() { return m_backgroundData.access().background.access(); }
     const FillLayer& backgroundLayers() const { return m_backgroundData->background; }
+    BlendMode backgroundBlendMode() const { return static_cast<BlendMode>(m_backgroundData->background->blendMode()); }
 
     StyleImage* maskImage() const { return m_rareNonInheritedData->mask->image(); }
     FillRepeat maskRepeatX() const { return static_cast<FillRepeat>(m_rareNonInheritedData->mask->repeatX()); }
@@ -918,6 +919,7 @@
     void setBackgroundOrigin(FillBox fillBox) { SET_NESTED_VAR(m_backgroundData, background, m_origin, static_cast<unsigned>(fillBox)); SET_NESTED_VAR(m_backgroundData, background, m_originSet, true); }
     void setBackgroundRepeatX(FillRepeat fillRepeat) { SET_NESTED_VAR(m_backgroundData, background, m_repeatX, static_cast<unsigned>(fillRepeat)); SET_NESTED_VAR(m_backgroundData, background, m_repeatXSet, true); }
     void setBackgroundRepeatY(FillRepeat fillRepeat) { SET_NESTED_VAR(m_backgroundData, background, m_repeatY, static_cast<unsigned>(fillRepeat)); SET_NESTED_VAR(m_backgroundData, background, m_repeatYSet, true); }
+    void setBackgroundBlendMode(BlendMode blendMode) { SET_NESTED_VAR(m_backgroundData, background, m_blendMode, static_cast<unsigned>(blendMode)); SET_NESTED_VAR(m_backgroundData, background, m_blendModeSet, true); }
 
     void setBorderImage(const NinePieceImage& b) { SET_VAR(m_surroundData, border.m_image, b); }
     void setBorderImageSource(RefPtr<StyleImage>&&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to