AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Apr 2015 00:11:07 +0000 (00:11 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Apr 2015 00:11:07 +0000 (00:11 +0000)
commitd951888671d29b42c9d5978830074edf5b033e8d
tree6ad171af2bef2d948165bd5afceff412675fd1dc
parent377e90bbe53662bd86ec35a1e9e895b1cfba24f4
AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
https://bugs.webkit.org/show_bug.cgi?id=144173
<rdar://problem/20526168>

Reviewed by Simon Fraser.

Keep a list of Animations that care about scroll updates, and only
run the animation update if the list is not empty.

Covered by existing tests.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
if this is an animation that depends on scrolling.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
new removeFromAnimationsDependentOnScroll as this animation is deleted.
(WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
there are animations that care.
(WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
value to FrameView.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::wantsScrollUpdates):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/page/animation/AnimationController.cpp
Source/WebCore/page/animation/AnimationController.h
Source/WebCore/page/animation/AnimationControllerPrivate.h