[Web Animations] Use a keyframe effect stack to resolve animations on an element
Created attachment 383140 [details] Patch
Comment on attachment 383140 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383140&action=review > Source/WebCore/animation/KeyframeEffect.cpp:1009 > + bool animationChanged = animation != this->animation(); > + AnimationEffect::setAnimation(animation); > + if (m_target && animationChanged) { Would it read better as this? { AnimationEffect::setAnimation(animation); if (m_target && animation != this->animation()) {... I'm not sure.
(In reply to Dean Jackson from comment #2) > Comment on attachment 383140 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=383140&action=review > > > Source/WebCore/animation/KeyframeEffect.cpp:1009 > > + bool animationChanged = animation != this->animation(); > > + AnimationEffect::setAnimation(animation); > > + if (m_target && animationChanged) { > > Would it read better as this? > { > AnimationEffect::setAnimation(animation); > if (m_target && animation != this->animation()) {... > > I'm not sure. Once AnimationEffect::setAnimation(animation) is called, `animation` and `this->animation()` are guaranteed to return the same thing. That's why it's required to determine whether the value changed before calling the superclass's implementation.
Committed r252253: <https://trac.webkit.org/changeset/252253>
<rdar://problem/57031112>