Changeset 273738 in webkit
- Timestamp:
- Mar 2, 2021, 11:09:56 AM (6 years ago)
- Location:
- branches/safari-611.1.21.0-branch
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webanimations/transform-transition-with-delay-on-forced-layer-with-transform-expected.html (added)
-
LayoutTests/webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-611.1.21.0-branch/LayoutTests/ChangeLog
r273671 r273738 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273656. rdar://problem/74883345 4 5 REGRESSION(r272004): transform transition with delay doesn't behave correctly 6 https://bugs.webkit.org/show_bug.cgi?id=222545 7 <rdar://problem/74865413> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 To support accelerated animations of individual transform properties, we introduced the notion of 14 non-interpolating animations to apply the underlying value for a given property before applying 15 the actual animations for this property with additivity set to true. 16 17 These non-interpolating animations were meant to last between the time at which animations were 18 committed and the effective start of the first animation for that property, accounting for any 19 delay. 20 21 However, we neglected to handle the case where that first animation had a fill mode that would 22 make it fill backwards, such as CSS Transitions. In that situation, the animation would have 23 its first keyframe applied on top of the underlying value, effectively applying the underlying 24 value twice with additivity. 25 26 We now only add these non-interpolating animations if the first animation has a delay and does 27 not fill backwards. 28 29 Test: webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html 30 31 * platform/graphics/ca/GraphicsLayerCA.cpp: 32 (WebCore::GraphicsLayerCA::updateAnimations): 33 34 LayoutTests: 35 36 Add a new test where an element with a non-identity transform starts a transform transition with a 37 long delay. Prior to this patch, this test failed because, while in the delay phase, the transition 38 would mean the underlying transform was applied twice: once by the non-interpolating animation 39 generated for the underlying "transform" value, and once by the first keyframe of the transition 40 since it fills backwards. 41 42 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform-expected.html: Added. 43 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html: Added. 44 45 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273656 268f45cc-cd09-0410-ab3c-d52691b4dbfc 46 47 2021-03-01 Antoine Quint <graouts@webkit.org> 48 49 REGRESSION(r272004): transform transition with delay doesn't behave correctly 50 https://bugs.webkit.org/show_bug.cgi?id=222545 51 <rdar://problem/74865413> 52 53 Reviewed by Dean Jackson. 54 55 Add a new test where an element with a non-identity transform starts a transform transition with a 56 long delay. Prior to this patch, this test failed because, while in the delay phase, the transition 57 would mean the underlying transform was applied twice: once by the non-interpolating animation 58 generated for the underlying "transform" value, and once by the first keyframe of the transition 59 since it fills backwards. 60 61 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform-expected.html: Added. 62 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html: Added. 63 1 64 2021-03-01 Alan Coon <alancoon@apple.com> 2 65 -
branches/safari-611.1.21.0-branch/Source/WebCore/ChangeLog
r273686 r273738 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273656. rdar://problem/74883345 4 5 REGRESSION(r272004): transform transition with delay doesn't behave correctly 6 https://bugs.webkit.org/show_bug.cgi?id=222545 7 <rdar://problem/74865413> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 To support accelerated animations of individual transform properties, we introduced the notion of 14 non-interpolating animations to apply the underlying value for a given property before applying 15 the actual animations for this property with additivity set to true. 16 17 These non-interpolating animations were meant to last between the time at which animations were 18 committed and the effective start of the first animation for that property, accounting for any 19 delay. 20 21 However, we neglected to handle the case where that first animation had a fill mode that would 22 make it fill backwards, such as CSS Transitions. In that situation, the animation would have 23 its first keyframe applied on top of the underlying value, effectively applying the underlying 24 value twice with additivity. 25 26 We now only add these non-interpolating animations if the first animation has a delay and does 27 not fill backwards. 28 29 Test: webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html 30 31 * platform/graphics/ca/GraphicsLayerCA.cpp: 32 (WebCore::GraphicsLayerCA::updateAnimations): 33 34 LayoutTests: 35 36 Add a new test where an element with a non-identity transform starts a transform transition with a 37 long delay. Prior to this patch, this test failed because, while in the delay phase, the transition 38 would mean the underlying transform was applied twice: once by the non-interpolating animation 39 generated for the underlying "transform" value, and once by the first keyframe of the transition 40 since it fills backwards. 41 42 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform-expected.html: Added. 43 * webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html: Added. 44 45 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273656 268f45cc-cd09-0410-ab3c-d52691b4dbfc 46 47 2021-03-01 Antoine Quint <graouts@webkit.org> 48 49 REGRESSION(r272004): transform transition with delay doesn't behave correctly 50 https://bugs.webkit.org/show_bug.cgi?id=222545 51 <rdar://problem/74865413> 52 53 Reviewed by Dean Jackson. 54 55 To support accelerated animations of individual transform properties, we introduced the notion of 56 non-interpolating animations to apply the underlying value for a given property before applying 57 the actual animations for this property with additivity set to true. 58 59 These non-interpolating animations were meant to last between the time at which animations were 60 committed and the effective start of the first animation for that property, accounting for any 61 delay. 62 63 However, we neglected to handle the case where that first animation had a fill mode that would 64 make it fill backwards, such as CSS Transitions. In that situation, the animation would have 65 its first keyframe applied on top of the underlying value, effectively applying the underlying 66 value twice with additivity. 67 68 We now only add these non-interpolating animations if the first animation has a delay and does 69 not fill backwards. 70 71 Test: webanimations/transform-transition-with-delay-on-forced-layer-with-transform.html 72 73 * platform/graphics/ca/GraphicsLayerCA.cpp: 74 (WebCore::GraphicsLayerCA::updateAnimations): 75 1 76 2021-03-01 Alan Coon <alancoon@apple.com> 2 77 -
branches/safari-611.1.21.0-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r272528 r273738 3041 3041 } 3042 3042 3043 Seconds earliestBeginTime = 0_s;3043 LayerPropertyAnimation* earliestAnimation = nullptr; 3044 3044 for (auto* animation : animations) { 3045 3045 if (auto beginTime = animation->computedBeginTime()) { 3046 if (!earliest BeginTime || earliestBeginTime> *beginTime)3047 earliest BeginTime = *beginTime;3046 if (!earliestAnimation || *earliestAnimation->computedBeginTime() > *beginTime) 3047 earliestAnimation = animation; 3048 3048 } 3049 3049 } 3050 3050 3051 if (earliestBeginTime)3052 earliestBeginTime += animationGroupBeginTime;3053 3054 3051 Vector<RefPtr<PlatformCAAnimation>> caAnimations; 3055 if (earliestBeginTime > currentTime) { 3056 if (auto* baseValueTransformAnimation = makeBaseValueTransformAnimation(property, TransformationMatrixSource::AskClient, earliestBeginTime)) { 3057 prepareAnimationForAddition(*baseValueTransformAnimation); 3058 caAnimations.append(baseValueTransformAnimation->m_animation); 3052 3053 // If we have an animation with an explicit begin time that does not fill backwards and starts with a delay, 3054 // we must create a non-interpolating animation to set the current value for this transform-related property 3055 // until that animation begins. 3056 if (earliestAnimation) { 3057 auto fillMode = earliestAnimation->m_animation->fillMode(); 3058 if (fillMode != PlatformCAAnimation::Backwards && fillMode != PlatformCAAnimation::Both) { 3059 Seconds earliestBeginTime = *earliestAnimation->computedBeginTime() + animationGroupBeginTime; 3060 if (earliestBeginTime > currentTime) { 3061 if (auto* baseValueTransformAnimation = makeBaseValueTransformAnimation(property, TransformationMatrixSource::AskClient, earliestBeginTime)) { 3062 prepareAnimationForAddition(*baseValueTransformAnimation); 3063 caAnimations.append(baseValueTransformAnimation->m_animation); 3064 } 3065 } 3059 3066 } 3060 3067 } … … 3079 3086 } 3080 3087 3081 Seconds earliestBeginTime = 0_s;3088 LayerPropertyAnimation* earliestAnimation = nullptr; 3082 3089 Vector<RefPtr<PlatformCAAnimation>> caAnimations; 3083 3090 for (auto* animation : WTF::makeReversedRange(animations)) { 3084 3091 if (auto beginTime = animation->computedBeginTime()) { 3085 if (!earliest BeginTime || earliestBeginTime> *beginTime)3086 earliest BeginTime = *beginTime;3092 if (!earliestAnimation || *earliestAnimation->computedBeginTime() > *beginTime) 3093 earliestAnimation = animation; 3087 3094 } 3088 3095 prepareAnimationForAddition(*animation); … … 3090 3097 } 3091 3098 3092 if (earliestBeginTime) 3093 earliestBeginTime += animationGroupBeginTime; 3094 3095 if (earliestBeginTime > currentTime) { 3096 if (auto* baseValueTransformAnimation = makeBaseValueTransformAnimation(property, TransformationMatrixSource::AskClient, earliestBeginTime)) { 3097 prepareAnimationForAddition(*baseValueTransformAnimation); 3098 caAnimations.append(baseValueTransformAnimation->m_animation); 3099 // If we have an animation with an explicit begin time that does not fill backwards and starts with a delay, 3100 // we must create a non-interpolating animation to set the current value for this transform-related property 3101 // until that animation begins. 3102 if (earliestAnimation) { 3103 auto fillMode = earliestAnimation->m_animation->fillMode(); 3104 if (fillMode != PlatformCAAnimation::Backwards && fillMode != PlatformCAAnimation::Both) { 3105 Seconds earliestBeginTime = *earliestAnimation->computedBeginTime() + animationGroupBeginTime; 3106 if (earliestBeginTime > currentTime) { 3107 if (auto* baseValueTransformAnimation = makeBaseValueTransformAnimation(property, TransformationMatrixSource::AskClient, earliestBeginTime)) { 3108 prepareAnimationForAddition(*baseValueTransformAnimation); 3109 caAnimations.append(baseValueTransformAnimation->m_animation); 3110 } 3111 } 3099 3112 } 3100 3113 }
Note:
See TracChangeset
for help on using the changeset viewer.