Changeset 285728 in webkit
- Timestamp:
- Nov 12, 2021, 9:40:47 AM (5 years ago)
- Location:
- trunk
- 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
-
trunk/LayoutTests/ChangeLog
r285727 r285728 1 2021-11-12 Antoine Quint <graouts@webkit.org> 2 3 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 4 https://bugs.webkit.org/show_bug.cgi?id=233041 5 <rdar://problem/85236241> 6 7 Reviewed by Dean Jackson. 8 9 Add a new test that runs a forward-filling animation for `transform`, waits for its completion, 10 then runs another `transform` animation with an implicit initial keyframe, ensuring that the 11 result of the first forward-filling animation is accounted for when computing the initial 12 keyframe. 13 14 This test would fail prior to this patch. 15 16 * webanimations/accelerated-animation-after-forward-filling-animation-expected.html: Added. 17 * webanimations/accelerated-animation-after-forward-filling-animation.html: Added. 18 1 19 2021-11-12 Patrick Angle <pangle@apple.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r285725 r285728 1 2021-11-12 Antoine Quint <graouts@webkit.org> 2 3 [Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations 4 https://bugs.webkit.org/show_bug.cgi?id=233041 5 <rdar://problem/85236241> 6 7 Reviewed by Dean Jackson. 8 9 Test: webanimations/accelerated-animation-after-forward-filling-animation.html 10 11 When starting an accelerated animation, we would fill any implicit keyframes based on the unanimated style. 12 We now also apply all animations below this animation in the target's effect stack such that a previous 13 forward-filling animation is accounted for. 14 15 * animation/KeyframeEffect.cpp: 16 (WebCore::KeyframeEffect::applyPendingAcceleratedActions): 17 1 18 2021-11-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 19 -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r285397 r285728 1789 1789 ASSERT(lastStyleChangeEventStyle); 1790 1790 1791 // We need to resolve all animations up to this point to ensure any forward-filling 1792 // effect is accounted for when computing the "from" value for the accelerated animation. 1793 auto underlyingStyle = RenderStyle::clonePtr(*lastStyleChangeEventStyle); 1794 auto* effectStack = m_target->keyframeEffectStack(m_pseudoId); 1795 ASSERT(effectStack); 1796 1797 for (const auto& effect : effectStack->sortedEffects()) { 1798 if (this == effect.get()) 1799 break; 1800 if (auto progress = effect->getComputedTiming().progress) 1801 effect->setAnimatedPropertiesInStyle(*underlyingStyle, *progress); 1802 } 1803 1791 1804 KeyframeList explicitKeyframes(m_blendingKeyframes.animationName()); 1792 1805 explicitKeyframes.copyKeyframes(m_blendingKeyframes); 1793 explicitKeyframes.fillImplicitKeyframes(*m_target, m_target->styleResolver(), lastStyleChangeEventStyle, nullptr);1806 explicitKeyframes.fillImplicitKeyframes(*m_target, m_target->styleResolver(), underlyingStyle.get(), nullptr); 1794 1807 return renderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer(), explicitKeyframes) ? RunningAccelerated::Yes : RunningAccelerated::No; 1795 1808 };
Note:
See TracChangeset
for help on using the changeset viewer.