Bug 204010

Summary: [Web Animations] Use a keyframe effect stack to resolve animations on an element
Product: WebKit Reporter: Antoine Quint <graouts>
Component: New BugsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, dbates, dino, esprehn+autocc, ews-watchlist, kangil.han, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=204009
Attachments:
Description Flags
Patch dino: review+

Antoine Quint
Reported 2019-11-08 10:01:53 PST
[Web Animations] Use a keyframe effect stack to resolve animations on an element
Attachments
Patch (34.67 KB, patch)
2019-11-08 10:19 PST, Antoine Quint
dino: review+
Antoine Quint
Comment 1 2019-11-08 10:19:06 PST
Dean Jackson
Comment 2 2019-11-08 10:24:33 PST
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.
Antoine Quint
Comment 3 2019-11-08 12:32:49 PST
(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.
Antoine Quint
Comment 4 2019-11-08 12:41:07 PST
Radar WebKit Bug Importer
Comment 5 2019-11-08 12:42:15 PST
Note You need to log in before you can comment on or make changes to this bug.