Changeset 276465 in webkit
- Timestamp:
- Apr 22, 2021 3:07:02 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (6 diffs)
-
Source/WebCore/rendering/style/NinePieceImage.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/NinePieceImage.h (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r276450 r276465 1 2021-04-22 Antoine Quint <graouts@webkit.org> 2 3 Add discrete animation support for border-image-repeat 4 https://bugs.webkit.org/show_bug.cgi?id=224923 5 6 Reviewed by Antti Koivisto. 7 8 Mark 10 WPT progressions. 9 10 * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt: 11 * web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt: 12 * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt: 13 1 14 2021-04-22 Chris Lord <clord@igalia.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt
r276376 r276465 45 45 PASS border-collapse: "separate" onto "collapse" 46 46 PASS border-collapse: "collapse" onto "separate" 47 PASS border-image-repeat (type: discrete) has testAccumulation function 48 PASS border-image-repeat: "round space" onto "stretch repeat" 49 PASS border-image-repeat: "stretch repeat" onto "round space" 47 50 PASS border-image-source (type: discrete) has testAccumulation function 48 51 PASS border-image-source: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt
r276376 r276465 45 45 PASS border-collapse: "separate" onto "collapse" 46 46 PASS border-collapse: "collapse" onto "separate" 47 PASS border-image-repeat (type: discrete) has testAddition function 48 PASS border-image-repeat: "round space" onto "stretch repeat" 49 PASS border-image-repeat: "stretch repeat" onto "round space" 47 50 PASS border-image-source (type: discrete) has testAddition function 48 51 PASS border-image-source: "url("http://localhost/test-2")" onto "url("http://localhost/test-1")" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt
r276376 r276465 54 54 PASS border-collapse uses discrete animation when animating between "collapse" and "separate" with effect easing 55 55 PASS border-collapse uses discrete animation when animating between "collapse" and "separate" with keyframe easing 56 PASS border-image-repeat (type: discrete) has testInterpolation function 57 PASS border-image-repeat uses discrete animation when animating between "stretch repeat" and "round space" with linear easing 58 PASS border-image-repeat uses discrete animation when animating between "stretch repeat" and "round space" with effect easing 59 PASS border-image-repeat uses discrete animation when animating between "stretch repeat" and "round space" with keyframe easing 56 60 PASS border-image-source (type: discrete) has testInterpolation function 57 61 FAIL border-image-source 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\")" -
trunk/Source/WebCore/ChangeLog
r276464 r276465 1 2021-04-22 Antoine Quint <graouts@webkit.org> 2 3 Add discrete animation support for border-image-repeat 4 https://bugs.webkit.org/show_bug.cgi?id=224923 5 6 Reviewed by Antti Koivisto. 7 8 * animation/CSSPropertyAnimation.cpp: 9 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 10 * rendering/style/NinePieceImage.cpp: 11 (WebCore::operator<<): 12 * rendering/style/NinePieceImage.h: 13 * rendering/style/RenderStyle.cpp: 14 (WebCore::RenderStyle::setBorderImageHorizontalRule): 15 (WebCore::RenderStyle::setBorderImageVerticalRule): 16 * rendering/style/RenderStyle.h: 17 (WebCore::RenderStyle::borderImageHorizontalRule const): 18 (WebCore::RenderStyle::borderImageVerticalRule const): 19 1 20 2021-04-22 Zalan Bujtas <zalan@apple.com> 2 21 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r276376 r276465 621 621 } 622 622 623 private:624 623 bool equals(const RenderStyle& a, const RenderStyle& b) const override 625 624 { … … 636 635 #endif 637 636 637 private: 638 638 T (RenderStyle::*m_getter)() const; 639 639 }; … … 685 685 } 686 686 687 private:688 bool canInterpolate(const RenderStyle&, const RenderStyle&) const final { return false; }689 690 687 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const final 691 688 { … … 694 691 } 695 692 693 private: 694 bool canInterpolate(const RenderStyle&, const RenderStyle&) const final { return false; } 695 696 696 void (RenderStyle::*m_setter)(T); 697 }; 698 699 class BorderImageRepeatWrapper final : public AnimationPropertyWrapperBase { 700 WTF_MAKE_FAST_ALLOCATED; 701 public: 702 BorderImageRepeatWrapper() 703 : AnimationPropertyWrapperBase(CSSPropertyBorderImageRepeat) 704 , m_horizontalWrapper(DiscretePropertyWrapper<NinePieceImageRule>(CSSPropertyBorderImageRepeat, &RenderStyle::borderImageHorizontalRule, &RenderStyle::setBorderImageHorizontalRule)) 705 , m_verticalWrapper(DiscretePropertyWrapper<NinePieceImageRule>(CSSPropertyBorderImageRepeat, &RenderStyle::borderImageVerticalRule, &RenderStyle::setBorderImageVerticalRule)) 706 { 707 } 708 709 private: 710 bool canInterpolate(const RenderStyle&, const RenderStyle&) const final { return false; } 711 712 bool equals(const RenderStyle& a, const RenderStyle& b) const override 713 { 714 return m_horizontalWrapper.equals(a, b) && m_verticalWrapper.equals(a, b); 715 } 716 717 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const final 718 { 719 m_horizontalWrapper.blend(destination, from, to, context); 720 m_verticalWrapper.blend(destination, from, to, context); 721 } 722 723 #if !LOG_DISABLED 724 void logBlend(const RenderStyle& from, const RenderStyle& to, const RenderStyle& destination, double progress) const final 725 { 726 m_horizontalWrapper.logBlend(from, to, destination, progress); 727 m_verticalWrapper.logBlend(from, to, destination, progress); 728 } 729 #endif 730 731 DiscretePropertyWrapper<NinePieceImageRule> m_horizontalWrapper; 732 DiscretePropertyWrapper<NinePieceImageRule> m_verticalWrapper; 697 733 }; 698 734 … … 2323 2359 2324 2360 // FIXME: The following properties are currently not animatable but should be: 2325 // background-blend-mode, border-image-repeat,clip-rule, color-interpolation,2361 // background-blend-mode, clip-rule, color-interpolation, 2326 2362 // color-interpolation-filters, counter-increment, counter-reset, dominant-baseline, 2327 2363 // fill-rule, font-family, font-feature-settings, font-kerning, font-language-override, … … 2343 2379 new DiscretePropertyWrapper<BorderStyle>(CSSPropertyBorderBottomStyle, &RenderStyle::borderBottomStyle, &RenderStyle::setBorderBottomStyle), 2344 2380 new DiscretePropertyWrapper<BorderCollapse>(CSSPropertyBorderCollapse, &RenderStyle::borderCollapse, &RenderStyle::setBorderCollapse), 2381 new BorderImageRepeatWrapper, 2345 2382 new DiscretePropertyWrapper<BorderStyle>(CSSPropertyBorderLeftStyle, &RenderStyle::borderLeftStyle, &RenderStyle::setBorderLeftStyle), 2346 2383 new DiscretePropertyWrapper<BorderStyle>(CSSPropertyBorderRightStyle, &RenderStyle::borderRightStyle, &RenderStyle::setBorderRightStyle), -
trunk/Source/WebCore/rendering/style/NinePieceImage.cpp
r254841 r276465 291 291 } 292 292 293 } 293 TextStream& operator<<(TextStream& ts, NinePieceImageRule rule) 294 { 295 switch (rule) { 296 case NinePieceImageRule::Stretch: ts << "stretch"; break; 297 case NinePieceImageRule::Round: ts << "round"; break; 298 case NinePieceImageRule::Space: ts << "space"; break; 299 case NinePieceImageRule::Repeat: ts << "repeat"; break; 300 } 301 return ts; 302 } 303 304 } -
trunk/Source/WebCore/rendering/style/NinePieceImage.h
r273882 r276465 216 216 217 217 WTF::TextStream& operator<<(WTF::TextStream&, const NinePieceImage&); 218 WTF::TextStream& operator<<(WTF::TextStream&, NinePieceImageRule); 218 219 219 220 } // namespace WebCore -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r276253 r276465 2350 2350 } 2351 2351 2352 void RenderStyle::setBorderImageHorizontalRule(NinePieceImageRule rule) 2353 { 2354 if (m_surroundData->border.m_image.horizontalRule() == rule) 2355 return; 2356 m_surroundData.access().border.m_image.setHorizontalRule(rule); 2357 } 2358 2359 void RenderStyle::setBorderImageVerticalRule(NinePieceImageRule rule) 2360 { 2361 if (m_surroundData->border.m_image.verticalRule() == rule) 2362 return; 2363 m_surroundData.access().border.m_image.setVerticalRule(rule); 2364 } 2365 2352 2366 void RenderStyle::setColumnStylesFromPaginationMode(const Pagination::Mode& paginationMode) 2353 2367 { -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r276376 r276465 293 293 const LengthBox& borderImageWidth() const { return m_surroundData->border.image().borderSlices(); } 294 294 const LengthBox& borderImageOutset() const { return m_surroundData->border.image().outset(); } 295 NinePieceImageRule borderImageHorizontalRule() const { return m_surroundData->border.image().horizontalRule(); } 296 NinePieceImageRule borderImageVerticalRule() const { return m_surroundData->border.image().verticalRule(); } 295 297 296 298 const LengthSize& borderTopLeftRadius() const { return m_surroundData->border.topLeftRadius(); } … … 903 905 void setBorderImageWidth(LengthBox&&); 904 906 void setBorderImageOutset(LengthBox&&); 907 void setBorderImageHorizontalRule(NinePieceImageRule); 908 void setBorderImageVerticalRule(NinePieceImageRule); 905 909 906 910 void setBorderTopLeftRadius(LengthSize&& size) { SET_VAR(m_surroundData, border.m_topLeftRadius, WTFMove(size)); }
Note: See TracChangeset
for help on using the changeset viewer.