[Web Animations] Ensure we don't update an animation's finished state twice when...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2018 17:49:55 +0000 (17:49 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2018 17:49:55 +0000 (17:49 +0000)
commitb034cafd864af3cf19b16de69bef4b55cf990a4d
tree99fdd11934239ba5ef30deee7ad329b9547e4fb3
parent9b099e3fc5ae43f95d57d1284c245a4568fa8931
[Web Animations] Ensure we don't update an animation's finished state twice when updating animations
https://bugs.webkit.org/show_bug.cgi?id=192757

Reviewed by Dean Jackson.

When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state
twice since we'd do it once when calling tick() and once again when calling resolve() in the ensuing style invalidation. We now keep track of
whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate
next call to resolve(), unless any of the timing properties have changed in the meantime.

No new test since there is no user-observable change.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::timingDidChange):
(WebCore::WebAnimation::tick):
(WebCore::WebAnimation::resolve):
* animation/WebAnimation.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h