Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276375 => 276376)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-21 18:15:10 UTC (rev 276376)
@@ -1,3 +1,16 @@
+2021-04-21 Antoine Quint <[email protected]>
+
+ Add discrete animation support for several background CSS properties
+ https://bugs.webkit.org/show_bug.cgi?id=224871
+
+ Reviewed by Antti Koivisto.
+
+ Mark 30 WPT progressions.
+
+ * 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:
+
2021-04-21 Chris Lord <[email protected]>
DOMException should be Serializable
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt (276375 => 276376)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt 2021-04-21 18:15:10 UTC (rev 276376)
@@ -9,6 +9,9 @@
PASS align-self (type: discrete) has testAccumulation function
PASS align-self: "flex-end" onto "flex-start"
PASS align-self: "flex-start" onto "flex-end"
+PASS background-attachment (type: discrete) has testAccumulation function
+PASS background-attachment: "local" onto "fixed"
+PASS background-attachment: "fixed" onto "local"
PASS background-color (type: color) has testAccumulation function
FAIL background-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
FAIL background-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
@@ -16,9 +19,15 @@
FAIL background-color supports animating as color of #RGBa assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
FAIL background-color supports animating as color of rgba() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
FAIL background-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
+PASS background-clip (type: discrete) has testAccumulation function
+PASS background-clip: "content-box" onto "padding-box"
+PASS background-clip: "padding-box" onto "content-box"
PASS background-image (type: discrete) has testAccumulation function
PASS background-image: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS background-image: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
+PASS background-origin (type: discrete) has testAccumulation function
+PASS background-origin: "content-box" onto "padding-box"
+PASS background-origin: "padding-box" onto "content-box"
PASS border-bottom-color (type: color) has testAccumulation function
FAIL border-bottom-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
FAIL border-bottom-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt (276375 => 276376)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt 2021-04-21 18:15:10 UTC (rev 276376)
@@ -9,6 +9,9 @@
PASS align-self (type: discrete) has testAddition function
PASS align-self: "flex-end" onto "flex-start"
PASS align-self: "flex-start" onto "flex-end"
+PASS background-attachment (type: discrete) has testAddition function
+PASS background-attachment: "local" onto "fixed"
+PASS background-attachment: "fixed" onto "local"
PASS background-color (type: color) has testAddition function
FAIL background-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
FAIL background-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
@@ -16,9 +19,15 @@
FAIL background-color supports animating as color of #RGBa assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
FAIL background-color supports animating as color of rgba() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
FAIL background-color supports animating as color of hsla() assert_equals: The value should be rgb(230, 128, 128) at 0ms expected "rgb(230, 128, 128)" but got "rgba(255, 0, 0, 0.4)"
+PASS background-clip (type: discrete) has testAddition function
+PASS background-clip: "content-box" onto "padding-box"
+PASS background-clip: "padding-box" onto "content-box"
PASS background-image (type: discrete) has testAddition function
PASS background-image: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")"
PASS background-image: "url("http://localhost/test-1")" onto "url("http://localhost/test-2")"
+PASS background-origin (type: discrete) has testAddition function
+PASS background-origin: "content-box" onto "padding-box"
+PASS background-origin: "padding-box" onto "content-box"
PASS border-bottom-color (type: color) has testAddition function
FAIL border-bottom-color supports animating as color of rgb() with overflowed from and to values assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
FAIL border-bottom-color supports animating as color of #RGB assert_equals: The value should be rgb(255, 128, 128) at 0ms expected "rgb(255, 128, 128)" but got "rgb(255, 0, 0)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt (276375 => 276376)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt 2021-04-21 18:15:10 UTC (rev 276376)
@@ -12,6 +12,10 @@
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with linear easing
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with effect easing
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with keyframe easing
+PASS background-attachment (type: discrete) has testInterpolation function
+PASS background-attachment uses discrete animation when animating between "fixed" and "local" with linear easing
+PASS background-attachment uses discrete animation when animating between "fixed" and "local" with effect easing
+PASS background-attachment uses discrete animation when animating between "fixed" and "local" with keyframe easing
PASS background-color (type: color) has testInterpolation function
PASS background-color supports animating as color of rgb()
PASS background-color supports animating as color of #RGB
@@ -19,10 +23,18 @@
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-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
+PASS background-clip uses discrete animation when animating between "padding-box" and "content-box" with keyframe easing
PASS background-image (type: discrete) has testInterpolation function
FAIL background-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 background-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 background-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 background-origin (type: discrete) has testInterpolation function
+PASS background-origin uses discrete animation when animating between "padding-box" and "content-box" with linear easing
+PASS background-origin uses discrete animation when animating between "padding-box" and "content-box" with effect easing
+PASS background-origin uses discrete animation when animating between "padding-box" and "content-box" with keyframe easing
PASS border-bottom-color (type: color) has testInterpolation function
PASS border-bottom-color supports animating as color of rgb()
PASS border-bottom-color supports animating as color of #RGB
Modified: trunk/Source/WebCore/ChangeLog (276375 => 276376)
--- trunk/Source/WebCore/ChangeLog 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/Source/WebCore/ChangeLog 2021-04-21 18:15:10 UTC (rev 276376)
@@ -1,3 +1,22 @@
+2021-04-21 Antoine Quint <[email protected]>
+
+ Add discrete animation support for several background CSS properties
+ https://bugs.webkit.org/show_bug.cgi?id=224871
+
+ Reviewed by Antti Koivisto.
+
+ We now support animation of background-attachment, background-clip, background-origin
+ and background-repeat.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::setBackgroundAttachment):
+ (WebCore::RenderStyle::setBackgroundClip):
+ (WebCore::RenderStyle::setBackgroundOrigin):
+ (WebCore::RenderStyle::setBackgroundRepeatX):
+ (WebCore::RenderStyle::setBackgroundRepeatY):
+
2021-04-21 Zalan Bujtas <[email protected]>
Enable mid-layout render tree dump with floating boxes
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (276375 => 276376)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2021-04-21 18:15:10 UTC (rev 276376)
@@ -2322,8 +2322,7 @@
new TabSizePropertyWrapper,
// FIXME: The following properties are currently not animatable but should be:
- // background-attachment, background-blend-mode,background-clip, background-origin,
- // background-repeat, border-image-repeat, clip-rule, color-interpolation,
+ // background-blend-mode, border-image-repeat, clip-rule, color-interpolation,
// color-interpolation-filters, counter-increment, counter-reset, dominant-baseline,
// fill-rule, font-family, font-feature-settings, font-kerning, font-language-override,
// font-synthesis, font-variant-alternates, font-variant-caps, font-variant-east-asian,
@@ -2336,6 +2335,11 @@
new DiscretePropertyWrapper<const StyleSelfAlignmentData&>(CSSPropertyAlignItems, &RenderStyle::alignItems, &RenderStyle::setAlignItems),
new DiscretePropertyWrapper<const StyleSelfAlignmentData&>(CSSPropertyAlignSelf, &RenderStyle::alignSelf, &RenderStyle::setAlignSelf),
new DiscretePropertyWrapper<BackfaceVisibility>(CSSPropertyWebkitBackfaceVisibility, &RenderStyle::backfaceVisibility, &RenderStyle::setBackfaceVisibility),
+ new DiscretePropertyWrapper<FillAttachment>(CSSPropertyBackgroundAttachment, &RenderStyle::backgroundAttachment, &RenderStyle::setBackgroundAttachment),
+ new DiscretePropertyWrapper<FillBox>(CSSPropertyBackgroundClip, &RenderStyle::backgroundClip, &RenderStyle::setBackgroundClip),
+ new DiscretePropertyWrapper<FillBox>(CSSPropertyBackgroundOrigin, &RenderStyle::backgroundOrigin, &RenderStyle::setBackgroundOrigin),
+ new DiscretePropertyWrapper<FillRepeat>(CSSPropertyBackgroundRepeatX, &RenderStyle::backgroundRepeatX, &RenderStyle::setBackgroundRepeatX),
+ new DiscretePropertyWrapper<FillRepeat>(CSSPropertyBackgroundRepeatY, &RenderStyle::backgroundRepeatY, &RenderStyle::setBackgroundRepeatY),
new DiscretePropertyWrapper<BorderStyle>(CSSPropertyBorderBottomStyle, &RenderStyle::borderBottomStyle, &RenderStyle::setBorderBottomStyle),
new DiscretePropertyWrapper<BorderCollapse>(CSSPropertyBorderCollapse, &RenderStyle::borderCollapse, &RenderStyle::setBorderCollapse),
new DiscretePropertyWrapper<BorderStyle>(CSSPropertyBorderLeftStyle, &RenderStyle::borderLeftStyle, &RenderStyle::setBorderLeftStyle),
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (276375 => 276376)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-04-21 18:06:09 UTC (rev 276375)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-04-21 18:15:10 UTC (rev 276376)
@@ -890,7 +890,12 @@
void setBackgroundYPosition(Length&& length) { SET_NESTED_VAR(m_backgroundData, background, m_yPosition, WTFMove(length)); }
void setBackgroundSize(FillSizeType b) { SET_NESTED_VAR(m_backgroundData, background, m_sizeType, static_cast<unsigned>(b)); }
void setBackgroundSizeLength(LengthSize&& size) { SET_NESTED_VAR(m_backgroundData, background, m_sizeLength, WTFMove(size)); }
-
+ void setBackgroundAttachment(FillAttachment attachment) { SET_NESTED_VAR(m_backgroundData, background, m_attachment, static_cast<unsigned>(attachment)); SET_NESTED_VAR(m_backgroundData, background, m_attachmentSet, true); }
+ void setBackgroundClip(FillBox fillBox) { SET_NESTED_VAR(m_backgroundData, background, m_clip, static_cast<unsigned>(fillBox)); SET_NESTED_VAR(m_backgroundData, background, m_clipSet, true); }
+ 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 setBorderImage(const NinePieceImage& b) { SET_VAR(m_surroundData, border.m_image, b); }
void setBorderImageSource(RefPtr<StyleImage>&&);
void setBorderImageSliceFill(bool);