Changeset 276552 in webkit
- Timestamp:
- Apr 24, 2021, 12:33:21 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r276551 r276552 1 2021-04-24 Antoine Quint <graouts@webkit.org> 2 3 Fix interpolation of the clip CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=225017 5 6 Reviewed by Dean Jackson. 7 8 Mark 13 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 * web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt: 14 1 15 2021-04-24 Antoine Quint <graouts@webkit.org> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt
r276465 r276552 115 115 PASS clip (type: discrete) has testAccumulation function 116 116 PASS clip: "auto" onto "rect(10px, 10px, 10px, 10px)" 117 FAIL clip: "rect(10px, 10px, 10px, 10px)" onto "auto" assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got"auto"118 FAIL clip: "rect(10px, 10px, 10px, auto)" onto "rect(10px, 10px, 10px, 10px)" assert_equals: The value should be rect(10px, 10px, 10px, auto) at 0ms expected "rect(10px, 10px, 10px, auto)" but got "auto"119 FAIL clip: "rect(10px, 10px, 10px, 10px)" onto "rect(10px, 10px, 10px, auto)" assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto"117 PASS clip: "rect(10px, 10px, 10px, 10px)" onto "auto" 118 PASS clip: "rect(10px, 10px, 10px, auto)" onto "rect(10px, 10px, 10px, 10px)" 119 PASS clip: "rect(10px, 10px, 10px, 10px)" onto "rect(10px, 10px, 10px, auto)" 120 120 PASS color (type: color) has testAccumulation function 121 121 FAIL 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)" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt
r276465 r276552 115 115 PASS clip (type: discrete) has testAddition function 116 116 PASS clip: "auto" onto "rect(10px, 10px, 10px, 10px)" 117 FAIL clip: "rect(10px, 10px, 10px, 10px)" onto "auto" assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got"auto"118 FAIL clip: "rect(10px, 10px, 10px, auto)" onto "rect(10px, 10px, 10px, 10px)" assert_equals: The value should be rect(10px, 10px, 10px, auto) at 0ms expected "rect(10px, 10px, 10px, auto)" but got "auto"119 FAIL clip: "rect(10px, 10px, 10px, 10px)" onto "rect(10px, 10px, 10px, auto)" assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto"117 PASS clip: "rect(10px, 10px, 10px, 10px)" onto "auto" 118 PASS clip: "rect(10px, 10px, 10px, auto)" onto "rect(10px, 10px, 10px, 10px)" 119 PASS clip: "rect(10px, 10px, 10px, 10px)" onto "rect(10px, 10px, 10px, auto)" 120 120 PASS color (type: color) has testAddition function 121 121 FAIL 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)" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt
r276465 r276552 135 135 PASS clear uses discrete animation when animating between "left" and "right" with keyframe easing 136 136 PASS clip (type: rect) has testInterpolation function 137 FAIL clip supports animating as a rect assert_equals: The value should be rect(30px, 30px, 30px, 30px) at 500ms expected "rect(30px, 30px, 30px, 30px)" but got "auto" 137 PASS clip supports animating as a rect 138 138 PASS clip (type: discrete) has testInterpolation function 139 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with linear easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 140 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with effect easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 141 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with keyframe easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 142 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with linear easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 143 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with effect easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 144 FAIL clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with keyframe easing assert_equals: The value should be rect(10px, 10px, 10px, 10px) at 0ms expected "rect(10px, 10px, 10px, 10px)" but got "auto" 139 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with linear easing 140 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with effect easing 141 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "auto" with keyframe easing 142 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with linear easing 143 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with effect easing 144 PASS clip uses discrete animation when animating between "rect(10px, 10px, 10px, 10px)" and "rect(10px, 10px, 10px, auto)" with keyframe easing 145 145 PASS color (type: color) has testInterpolation function 146 146 PASS color supports animating as color of rgb() -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt
r270801 r276552 6 6 FAIL iteration composition of <color> type animation that green component is decreasing assert_equals: Animated color style at 0s of the third iteration expected "rgb(120, 240, 120)" but got "rgb(0, 120, 0)" 7 7 FAIL iteration composition of <number> type animation assert_equals: Animated flex-grow style at 0s of the third iteration expected "20" but got "0" 8 FAIL iteration composition of <shape> type animation assert_equals: Animated clip style at 50s of the first iteration expected "rect(5px, 5px, 5px, 5px)" but got "auto"8 FAIL iteration composition of <shape> type animation assert_equals: Animated clip style at 0s of the third iteration expected "rect(20px, 20px, 20px, 20px)" but got "rect(0px, 0px, 0px, 0px)" 9 9 FAIL iteration composition of <calc()> value animation assert_equals: Animated calc width style at 0s of the third iteration expected "20px" but got "0px" 10 10 FAIL iteration composition of <calc()> value animation that the values can'tbe reduced assert_equals: Animated calc width style at 0s of the third iteration expected "40px" but got "0px" -
trunk/Source/WebCore/ChangeLog
r276551 r276552 1 2021-04-24 Antoine Quint <graouts@webkit.org> 2 3 Fix interpolation of the clip CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=225017 5 6 Reviewed by Dean Jackson. 7 8 While we interpolated the clip value correctly, we wouldn't set the RenderStyle bit that 9 indicates that there is a non-auto value in the first place. With a new dedicated wrapper, 10 we can ensure we set the bit correctly as we blend, and that we use discrete interpolation 11 if both the from and to values aren't auto. 12 13 * animation/CSSPropertyAnimation.cpp: 14 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 15 1 16 2021-04-24 Antoine Quint <graouts@webkit.org> 2 17 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r276550 r276552 858 858 }; 859 859 860 class LengthBoxPropertyWrapper final: public PropertyWrapperGetter<const LengthBox&> {860 class LengthBoxPropertyWrapper : public PropertyWrapperGetter<const LengthBox&> { 861 861 WTF_MAKE_FAST_ALLOCATED; 862 862 public: … … 873 873 } 874 874 875 private: 876 bool canInterpolate(const RenderStyle& from, const RenderStyle& to) const final 875 bool canInterpolate(const RenderStyle& from, const RenderStyle& to) const override 877 876 { 878 877 if (m_flags.contains(Flags::UsesFillKeyword) && from.borderImage().fill() != to.borderImage().fill()) … … 888 887 } 889 888 890 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const final889 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const override 891 890 { 892 891 if (m_flags.contains(Flags::UsesFillKeyword)) … … 905 904 void (RenderStyle::*m_setter)(LengthBox&&); 906 905 OptionSet<Flags> m_flags; 906 }; 907 908 class ClipWrapper final : public LengthBoxPropertyWrapper { 909 WTF_MAKE_FAST_ALLOCATED; 910 public: 911 ClipWrapper() 912 : LengthBoxPropertyWrapper(CSSPropertyClip, &RenderStyle::clip, &RenderStyle::setClip, { LengthBoxPropertyWrapper::Flags::AllowsNegativeValues }) 913 { 914 } 915 916 private: 917 bool canInterpolate(const RenderStyle& from, const RenderStyle& to) const final 918 { 919 return from.hasClip() && to.hasClip() && LengthBoxPropertyWrapper::canInterpolate(from, to); 920 } 921 922 void blend(RenderStyle& destination, const RenderStyle& from, const RenderStyle& to, const CSSPropertyBlendingContext& context) const final 923 { 924 LengthBoxPropertyWrapper::blend(destination, from, to, context); 925 destination.setHasClip(true); 926 } 907 927 }; 908 928 … … 2279 2299 new PropertyWrapper<float>(CSSPropertyZoom, &RenderStyle::zoom, &RenderStyle::setZoomWithoutReturnValue), 2280 2300 2281 new LengthBoxPropertyWrapper(CSSPropertyClip, &RenderStyle::clip, &RenderStyle::setClip, { LengthBoxPropertyWrapper::Flags::AllowsNegativeValues }),2301 new ClipWrapper, 2282 2302 2283 2303 new AcceleratedPropertyWrapper<float>(CSSPropertyOpacity, &RenderStyle::opacity, &RenderStyle::setOpacity),
Note:
See TracChangeset
for help on using the changeset viewer.