Changeset 285834 in webkit
- Timestamp:
- Nov 15, 2021, 2:16:34 PM (5 years ago)
- Location:
- branches/safari-612.3.6.1-branch
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation-expected.html (added)
-
LayoutTests/webanimations/accelerated-animation-after-forward-filling-animation.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/KeyframeEffect.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.3.6.1-branch/LayoutTests/ChangeLog
r285693 r285834 1 2021-11-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r285728. rdar://problem/85236241 4 5 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 6 https://bugs.webkit.org/show_bug.cgi?id=233041 7 <rdar://problem/85236241> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 Test: webanimations/accelerated-animation-after-forward-filling-animation.html 14 15 When starting an accelerated animation, we would fill any implicit keyframes based on the unanimated style. 16 We now also apply all animations below this animation in the target's effect stack such that a previous 17 forward-filling animation is accounted for. 18 19 * animation/KeyframeEffect.cpp: 20 (WebCore::KeyframeEffect::applyPendingAcceleratedActions): 21 22 LayoutTests: 23 24 Add a new test that runs a forward-filling animation for `transform`, waits for its completion, 25 then runs another `transform` animation with an implicit initial keyframe, ensuring that the 26 result of the first forward-filling animation is accounted for when computing the initial 27 keyframe. 28 29 This test would fail prior to this patch. 30 31 * webanimations/accelerated-animation-after-forward-filling-animation-expected.html: Added. 32 * webanimations/accelerated-animation-after-forward-filling-animation.html: Added. 33 34 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285728 268f45cc-cd09-0410-ab3c-d52691b4dbfc 35 36 2021-11-12 Antoine Quint <graouts@webkit.org> 37 38 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 39 https://bugs.webkit.org/show_bug.cgi?id=233041 40 <rdar://problem/85236241> 41 42 Reviewed by Dean Jackson. 43 44 Add a new test that runs a forward-filling animation for `transform`, waits for its completion, 45 then runs another `transform` animation with an implicit initial keyframe, ensuring that the 46 result of the first forward-filling animation is accounted for when computing the initial 47 keyframe. 48 49 This test would fail prior to this patch. 50 51 * webanimations/accelerated-animation-after-forward-filling-animation-expected.html: Added. 52 * webanimations/accelerated-animation-after-forward-filling-animation.html: Added. 53 1 54 2021-11-11 Alan Coon <alancoon@apple.com> 2 55 -
branches/safari-612.3.6.1-branch/Source/WebCore/ChangeLog
r285755 r285834 1 2021-11-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r285728. rdar://problem/85236241 4 5 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 6 https://bugs.webkit.org/show_bug.cgi?id=233041 7 <rdar://problem/85236241> 8 9 Reviewed by Dean Jackson. 10 11 Source/WebCore: 12 13 Test: webanimations/accelerated-animation-after-forward-filling-animation.html 14 15 When starting an accelerated animation, we would fill any implicit keyframes based on the unanimated style. 16 We now also apply all animations below this animation in the target's effect stack such that a previous 17 forward-filling animation is accounted for. 18 19 * animation/KeyframeEffect.cpp: 20 (WebCore::KeyframeEffect::applyPendingAcceleratedActions): 21 22 LayoutTests: 23 24 Add a new test that runs a forward-filling animation for `transform`, waits for its completion, 25 then runs another `transform` animation with an implicit initial keyframe, ensuring that the 26 result of the first forward-filling animation is accounted for when computing the initial 27 keyframe. 28 29 This test would fail prior to this patch. 30 31 * webanimations/accelerated-animation-after-forward-filling-animation-expected.html: Added. 32 * webanimations/accelerated-animation-after-forward-filling-animation.html: Added. 33 34 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285728 268f45cc-cd09-0410-ab3c-d52691b4dbfc 35 36 2021-11-12 Antoine Quint <graouts@webkit.org> 37 38 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 39 https://bugs.webkit.org/show_bug.cgi?id=233041 40 <rdar://problem/85236241> 41 42 Reviewed by Dean Jackson. 43 44 Test: webanimations/accelerated-animation-after-forward-filling-animation.html 45 46 When starting an accelerated animation, we would fill any implicit keyframes based on the unanimated style. 47 We now also apply all animations below this animation in the target's effect stack such that a previous 48 forward-filling animation is accounted for. 49 50 * animation/KeyframeEffect.cpp: 51 (WebCore::KeyframeEffect::applyPendingAcceleratedActions): 52 1 53 2021-11-12 Russell Epstein <repstein@apple.com> 2 54 -
branches/safari-612.3.6.1-branch/Source/WebCore/animation/KeyframeEffect.cpp
r278610 r285834 1746 1746 ASSERT(lastStyleChangeEventStyle); 1747 1747 1748 // We need to resolve all animations up to this point to ensure any forward-filling 1749 // effect is accounted for when computing the "from" value for the accelerated animation. 1750 auto underlyingStyle = RenderStyle::clonePtr(*lastStyleChangeEventStyle); 1751 auto* effectStack = m_target->keyframeEffectStack(m_pseudoId); 1752 ASSERT(effectStack); 1753 1754 for (const auto& effect : effectStack->sortedEffects()) { 1755 if (this == effect.get()) 1756 break; 1757 if (auto progress = effect->getComputedTiming().progress) 1758 effect->setAnimatedPropertiesInStyle(*underlyingStyle, *progress); 1759 } 1760 1748 1761 KeyframeList explicitKeyframes(m_blendingKeyframes.animationName()); 1749 1762 explicitKeyframes.copyKeyframes(m_blendingKeyframes); 1750 explicitKeyframes.fillImplicitKeyframes(*m_target, m_target->styleResolver(), lastStyleChangeEventStyle, nullptr);1763 explicitKeyframes.fillImplicitKeyframes(*m_target, m_target->styleResolver(), underlyingStyle.get(), nullptr); 1751 1764 return renderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer(), explicitKeyframes) ? RunningAccelerated::Yes : RunningAccelerated::No; 1752 1765 };
Note:
See TracChangeset
for help on using the changeset viewer.