RESOLVED FIXED 182836
[Web Animations] Ensure that changing the timing model updates styles synchronously
https://bugs.webkit.org/show_bug.cgi?id=182836
Summary [Web Animations] Ensure that changing the timing model updates styles synchro...
Antoine Quint
Reported 2018-02-15 12:56:26 PST
[Web Animations] Ensure that changing the timing model updates styles synchronously
Attachments
Patch (44.36 KB, patch)
2018-02-15 13:23 PST, Antoine Quint
no flags
Patch for landing (44.30 KB, patch)
2018-02-15 14:06 PST, Antoine Quint
no flags
Antoine Quint
Comment 1 2018-02-15 13:23:16 PST
Dean Jackson
Comment 2 2018-02-15 14:04:09 PST
Comment on attachment 333936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=333936&action=review > Source/WebCore/animation/AnimationEffectReadOnly.cpp:47 > + m_timing->setEffect(nullptr); Won't m_timing go away and stop referencing the effect anyway? > Source/WebCore/animation/AnimationEffectTimingReadOnly.cpp:114 > - m_iterationStart = iterationStart; > + if (m_iterationStart != iterationStart) { > + m_iterationStart = iterationStart; > + propertyDidChange(); > + } > + While it is more core, we usually write it as an early return: if (m_iterationStart == iterationStart) return { }; m_iterationStart = iterationStart; propertyDidChange(); return { }; > Source/WebCore/animation/AnimationEffectTimingReadOnly.cpp:127 > + m_iterations = iterations; DItto
Antoine Quint
Comment 3 2018-02-15 14:05:26 PST
(In reply to Dean Jackson from comment #2) > Comment on attachment 333936 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=333936&action=review > > > Source/WebCore/animation/AnimationEffectReadOnly.cpp:47 > > + m_timing->setEffect(nullptr); > > Won't m_timing go away and stop referencing the effect anyway? Since both effect and timing objects can be referenced from JS, the timing may outlive the effect. > > Source/WebCore/animation/AnimationEffectTimingReadOnly.cpp:114 > > - m_iterationStart = iterationStart; > > + if (m_iterationStart != iterationStart) { > > + m_iterationStart = iterationStart; > > + propertyDidChange(); > > + } > > + > > While it is more core, we usually write it as an early return: > > if (m_iterationStart == iterationStart) > return { }; > > m_iterationStart = iterationStart; > propertyDidChange(); > > return { }; I wanted to avoid the double returns, but I'll adopt that style. > > Source/WebCore/animation/AnimationEffectTimingReadOnly.cpp:127 > > + m_iterations = iterations; > > DItto OK.
Antoine Quint
Comment 4 2018-02-15 14:06:29 PST
Created attachment 333940 [details] Patch for landing
Antoine Quint
Comment 5 2018-02-15 15:33:49 PST
Radar WebKit Bug Importer
Comment 6 2018-02-15 15:34:47 PST
Note You need to log in before you can comment on or make changes to this bug.