<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[211741] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/211741">211741</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-02-06 11:21:45 -0800 (Mon, 06 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename AnimationController to CSSAnimationController
https://bugs.webkit.org/show_bug.cgi?id=167829
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-02-06
Reviewed by Simon Fraser.
Source/WebCore:
AnimationController is a very generic name. The current function of this
class is CSS animation.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* dom/Document.cpp:
* history/CachedFrame.cpp:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
(WebCore::Frame::animation):
* page/FrameView.cpp:
* page/Page.cpp:
* page/animation/AnimationBase.cpp:
* page/animation/CSSAnimationController.cpp: Renamed from Source/WebCore/page/animation/AnimationController.cpp.
(WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
(WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
(WebCore::CSSAnimationControllerPrivate::CSSAnimationControllerPrivate):
(WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):
(WebCore::CSSAnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::CSSAnimationControllerPrivate::clear):
(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
(WebCore::CSSAnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
(WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::CSSAnimationControllerPrivate::startUpdateStyleIfNeededDispatcher):
(WebCore::CSSAnimationControllerPrivate::addEventToDispatch):
(WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::CSSAnimationControllerPrivate::animationFrameCallbackFired):
(WebCore::CSSAnimationControllerPrivate::animationTimerFired):
(WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::CSSAnimationControllerPrivate::suspendAnimations):
(WebCore::CSSAnimationControllerPrivate::resumeAnimations):
(WebCore::CSSAnimationControllerPrivate::animationsAreSuspendedForDocument):
(WebCore::CSSAnimationControllerPrivate::detachFromDocument):
(WebCore::CSSAnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::CSSAnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::CSSAnimationControllerPrivate::startAnimationsIfNotSuspended):
(WebCore::CSSAnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::beginAnimationUpdate):
(WebCore::CSSAnimationControllerPrivate::endAnimationUpdate):
(WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation):
(WebCore::CSSAnimationControllerPrivate::numberOfActiveAnimations):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle):
(WebCore::CSSAnimationControllerPrivate::styleAvailable):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse):
(WebCore::CSSAnimationControllerPrivate::startTimeResponse):
(WebCore::CSSAnimationControllerPrivate::animationWillBeRemoved):
(WebCore::CSSAnimationControllerPrivate::addToAnimationsDependentOnScroll):
(WebCore::CSSAnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
(WebCore::CSSAnimationControllerPrivate::scrollWasUpdated):
(WebCore::CSSAnimationController::CSSAnimationController):
(WebCore::CSSAnimationController::~CSSAnimationController):
(WebCore::CSSAnimationController::cancelAnimations):
(WebCore::CSSAnimationController::updateAnimations):
(WebCore::CSSAnimationController::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationController::computeExtentOfAnimation):
(WebCore::CSSAnimationController::notifyAnimationStarted):
(WebCore::CSSAnimationController::pauseAnimationAtTime):
(WebCore::CSSAnimationController::numberOfActiveAnimations):
(WebCore::CSSAnimationController::pauseTransitionAtTime):
(WebCore::CSSAnimationController::isRunningAnimationOnRenderer):
(WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer):
(WebCore::CSSAnimationController::isSuspended):
(WebCore::CSSAnimationController::suspendAnimations):
(WebCore::CSSAnimationController::resumeAnimations):
(WebCore::CSSAnimationController::allowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationController::setAllowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationController::serviceAnimations):
(WebCore::CSSAnimationController::animationsAreSuspendedForDocument):
(WebCore::CSSAnimationController::detachFromDocument):
(WebCore::CSSAnimationController::suspendAnimationsForDocument):
(WebCore::CSSAnimationController::resumeAnimationsForDocument):
(WebCore::CSSAnimationController::startAnimationsIfNotSuspended):
(WebCore::CSSAnimationController::beginAnimationUpdate):
(WebCore::CSSAnimationController::endAnimationUpdate):
(WebCore::CSSAnimationController::supportsAcceleratedAnimationOfProperty):
(WebCore::CSSAnimationController::wantsScrollUpdates):
(WebCore::CSSAnimationController::scrollWasUpdated):
(WebCore::CSSAnimationController::hasAnimations):
* page/animation/CSSAnimationController.h: Renamed from Source/WebCore/page/animation/AnimationController.h.
(WebCore::AnimationUpdateBlock::AnimationUpdateBlock):
(WebCore::AnimationUpdateBlock::~AnimationUpdateBlock):
* page/animation/CSSAnimationControllerPrivate.h: Renamed from Source/WebCore/page/animation/AnimationControllerPrivate.h.
(WebCore::CSSAnimationControllerPrivate::hasAnimations):
(WebCore::CSSAnimationControllerPrivate::isSuspended):
(WebCore::CSSAnimationControllerPrivate::setBeginAnimationUpdateTime):
(WebCore::CSSAnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
(WebCore::CSSAnimationControllerPrivate::wantsScrollUpdates):
(WebCore::CSSAnimationControllerPrivate::scrollPosition):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::singleton):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation):
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::create):
(WebCore::CompositeAnimation::animationController):
* page/animation/ImplicitAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* page/ios/FrameIOS.mm:
* platform/graphics/GraphicsLayer.h:
* rendering/RenderElement.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
(WebCore::RenderObject::animation):
* testing/Internals.cpp:
Source/WebKit/mac:
* WebView/WebFrame.mm:
* WebView/WebView.mm:
Source/WebKit/win:
* WebFrame.cpp:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryCachedFramecpp">trunk/Source/WebCore/history/CachedFrame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameh">trunk/Source/WebCore/page/Frame.h</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationBasecpp">trunk/Source/WebCore/page/animation/AnimationBase.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCompositeAnimationcpp">trunk/Source/WebCore/page/animation/CompositeAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCompositeAnimationh">trunk/Source/WebCore/page/animation/CompositeAnimation.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationImplicitAnimationcpp">trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationKeyframeAnimationcpp">trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepageiosFrameIOSmm">trunk/Source/WebCore/page/ios/FrameIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementh">trunk/Source/WebCore/rendering/RenderElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebFramecpp">trunk/Source/WebKit/win/WebFrame.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageanimationCSSAnimationControllercpp">trunk/Source/WebCore/page/animation/CSSAnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSAnimationControllerh">trunk/Source/WebCore/page/animation/CSSAnimationController.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSAnimationControllerPrivateh">trunk/Source/WebCore/page/animation/CSSAnimationControllerPrivate.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllercpp">trunk/Source/WebCore/page/animation/AnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllerh">trunk/Source/WebCore/page/animation/AnimationController.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllerPrivateh">trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -2028,7 +2028,7 @@
</span><span class="cx"> page/WorkerNavigator.cpp
</span><span class="cx">
</span><span class="cx"> page/animation/AnimationBase.cpp
</span><del>- page/animation/AnimationController.cpp
</del><ins>+ page/animation/CSSAnimationController.cpp
</ins><span class="cx"> page/animation/CSSPropertyAnimation.cpp
</span><span class="cx"> page/animation/CompositeAnimation.cpp
</span><span class="cx"> page/animation/ImplicitAnimation.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/ChangeLog        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,3 +1,132 @@
</span><ins>+2017-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ Rename AnimationController to CSSAnimationController
+ https://bugs.webkit.org/show_bug.cgi?id=167829
+
+ Reviewed by Simon Fraser.
+
+ AnimationController is a very generic name. The current function of this
+ class is CSS animation.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::computeRenderStyleForProperty):
+ * dom/Document.cpp:
+ * history/CachedFrame.cpp:
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ * page/Frame.h:
+ (WebCore::Frame::animation):
+ * page/FrameView.cpp:
+ * page/Page.cpp:
+ * page/animation/AnimationBase.cpp:
+ * page/animation/CSSAnimationController.cpp: Renamed from Source/WebCore/page/animation/AnimationController.cpp.
+ (WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
+ (WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
+ (WebCore::CSSAnimationControllerPrivate::CSSAnimationControllerPrivate):
+ (WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):
+ (WebCore::CSSAnimationControllerPrivate::ensureCompositeAnimation):
+ (WebCore::CSSAnimationControllerPrivate::clear):
+ (WebCore::CSSAnimationControllerPrivate::updateAnimations):
+ (WebCore::CSSAnimationControllerPrivate::updateAnimationTimerForRenderer):
+ (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
+ (WebCore::CSSAnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
+ (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):
+ (WebCore::CSSAnimationControllerPrivate::startUpdateStyleIfNeededDispatcher):
+ (WebCore::CSSAnimationControllerPrivate::addEventToDispatch):
+ (WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
+ (WebCore::CSSAnimationControllerPrivate::animationFrameCallbackFired):
+ (WebCore::CSSAnimationControllerPrivate::animationTimerFired):
+ (WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer):
+ (WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
+ (WebCore::CSSAnimationControllerPrivate::suspendAnimations):
+ (WebCore::CSSAnimationControllerPrivate::resumeAnimations):
+ (WebCore::CSSAnimationControllerPrivate::animationsAreSuspendedForDocument):
+ (WebCore::CSSAnimationControllerPrivate::detachFromDocument):
+ (WebCore::CSSAnimationControllerPrivate::suspendAnimationsForDocument):
+ (WebCore::CSSAnimationControllerPrivate::resumeAnimationsForDocument):
+ (WebCore::CSSAnimationControllerPrivate::startAnimationsIfNotSuspended):
+ (WebCore::CSSAnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended):
+ (WebCore::CSSAnimationControllerPrivate::pauseAnimationAtTime):
+ (WebCore::CSSAnimationControllerPrivate::pauseTransitionAtTime):
+ (WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
+ (WebCore::CSSAnimationControllerPrivate::beginAnimationUpdate):
+ (WebCore::CSSAnimationControllerPrivate::endAnimationUpdate):
+ (WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
+ (WebCore::CSSAnimationControllerPrivate::getAnimatedStyleForRenderer):
+ (WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation):
+ (WebCore::CSSAnimationControllerPrivate::numberOfActiveAnimations):
+ (WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle):
+ (WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle):
+ (WebCore::CSSAnimationControllerPrivate::styleAvailable):
+ (WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
+ (WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse):
+ (WebCore::CSSAnimationControllerPrivate::startTimeResponse):
+ (WebCore::CSSAnimationControllerPrivate::animationWillBeRemoved):
+ (WebCore::CSSAnimationControllerPrivate::addToAnimationsDependentOnScroll):
+ (WebCore::CSSAnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
+ (WebCore::CSSAnimationControllerPrivate::scrollWasUpdated):
+ (WebCore::CSSAnimationController::CSSAnimationController):
+ (WebCore::CSSAnimationController::~CSSAnimationController):
+ (WebCore::CSSAnimationController::cancelAnimations):
+ (WebCore::CSSAnimationController::updateAnimations):
+ (WebCore::CSSAnimationController::getAnimatedStyleForRenderer):
+ (WebCore::CSSAnimationController::computeExtentOfAnimation):
+ (WebCore::CSSAnimationController::notifyAnimationStarted):
+ (WebCore::CSSAnimationController::pauseAnimationAtTime):
+ (WebCore::CSSAnimationController::numberOfActiveAnimations):
+ (WebCore::CSSAnimationController::pauseTransitionAtTime):
+ (WebCore::CSSAnimationController::isRunningAnimationOnRenderer):
+ (WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer):
+ (WebCore::CSSAnimationController::isSuspended):
+ (WebCore::CSSAnimationController::suspendAnimations):
+ (WebCore::CSSAnimationController::resumeAnimations):
+ (WebCore::CSSAnimationController::allowsNewAnimationsWhileSuspended):
+ (WebCore::CSSAnimationController::setAllowsNewAnimationsWhileSuspended):
+ (WebCore::CSSAnimationController::serviceAnimations):
+ (WebCore::CSSAnimationController::animationsAreSuspendedForDocument):
+ (WebCore::CSSAnimationController::detachFromDocument):
+ (WebCore::CSSAnimationController::suspendAnimationsForDocument):
+ (WebCore::CSSAnimationController::resumeAnimationsForDocument):
+ (WebCore::CSSAnimationController::startAnimationsIfNotSuspended):
+ (WebCore::CSSAnimationController::beginAnimationUpdate):
+ (WebCore::CSSAnimationController::endAnimationUpdate):
+ (WebCore::CSSAnimationController::supportsAcceleratedAnimationOfProperty):
+ (WebCore::CSSAnimationController::wantsScrollUpdates):
+ (WebCore::CSSAnimationController::scrollWasUpdated):
+ (WebCore::CSSAnimationController::hasAnimations):
+ * page/animation/CSSAnimationController.h: Renamed from Source/WebCore/page/animation/AnimationController.h.
+ (WebCore::AnimationUpdateBlock::AnimationUpdateBlock):
+ (WebCore::AnimationUpdateBlock::~AnimationUpdateBlock):
+ * page/animation/CSSAnimationControllerPrivate.h: Renamed from Source/WebCore/page/animation/AnimationControllerPrivate.h.
+ (WebCore::CSSAnimationControllerPrivate::hasAnimations):
+ (WebCore::CSSAnimationControllerPrivate::isSuspended):
+ (WebCore::CSSAnimationControllerPrivate::setBeginAnimationUpdateTime):
+ (WebCore::CSSAnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
+ (WebCore::CSSAnimationControllerPrivate::wantsScrollUpdates):
+ (WebCore::CSSAnimationControllerPrivate::scrollPosition):
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::singleton):
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::CompositeAnimation):
+ * page/animation/CompositeAnimation.h:
+ (WebCore::CompositeAnimation::create):
+ (WebCore::CompositeAnimation::animationController):
+ * page/animation/ImplicitAnimation.cpp:
+ * page/animation/KeyframeAnimation.cpp:
+ * page/ios/FrameIOS.mm:
+ * platform/graphics/GraphicsLayer.h:
+ * rendering/RenderElement.h:
+ * rendering/RenderLayer.cpp:
+ * rendering/RenderLayerBacking.cpp:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
+ * rendering/RenderObject.cpp:
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::animation):
+ * testing/Internals.cpp:
+
</ins><span class="cx"> 2017-02-06 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Simple line layout: Use simplified text measuring when possible.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">                 0F11A54F0F39233100C37884 /* RenderSelectionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F11A54E0F39233100C37884 /* RenderSelectionInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F13164016ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm */; };
</span><del>-                0F15DA8A0F3AAEE70000CE47 /* AnimationControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */; };
</del><ins>+                0F15DA8A0F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15DA890F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h */; };
</ins><span class="cx">                 0F15ED5B1B7EC7C500EDDFEB /* WillChangeData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F15ED591B7EC7C500EDDFEB /* WillChangeData.cpp */; };
</span><span class="cx">                 0F15ED5C1B7EC7C500EDDFEB /* WillChangeData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F1774801378B772009DA76A /* ScrollAnimatorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */; };
</span><span class="lines">@@ -1358,8 +1358,8 @@
</span><span class="cx">                 316FE0740E6CCBEE00BF6088 /* JSCSSKeyframesRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE0700E6CCBEE00BF6088 /* JSCSSKeyframesRule.h */; };
</span><span class="cx">                 316FE1110E6E1DA700BF6088 /* AnimationBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE1070E6E1DA700BF6088 /* AnimationBase.cpp */; };
</span><span class="cx">                 316FE1120E6E1DA700BF6088 /* AnimationBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE1080E6E1DA700BF6088 /* AnimationBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                316FE1130E6E1DA700BF6088 /* AnimationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE1090E6E1DA700BF6088 /* AnimationController.cpp */; };
-                316FE1140E6E1DA700BF6088 /* AnimationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE10A0E6E1DA700BF6088 /* AnimationController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                316FE1130E6E1DA700BF6088 /* CSSAnimationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE1090E6E1DA700BF6088 /* CSSAnimationController.cpp */; };
+                316FE1140E6E1DA700BF6088 /* CSSAnimationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE10A0E6E1DA700BF6088 /* CSSAnimationController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 316FE1150E6E1DA700BF6088 /* CompositeAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE10B0E6E1DA700BF6088 /* CompositeAnimation.cpp */; };
</span><span class="cx">                 316FE1160E6E1DA700BF6088 /* CompositeAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE10C0E6E1DA700BF6088 /* CompositeAnimation.h */; };
</span><span class="cx">                 316FE1170E6E1DA700BF6088 /* ImplicitAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE10D0E6E1DA700BF6088 /* ImplicitAnimation.cpp */; };
</span><span class="lines">@@ -7495,7 +7495,7 @@
</span><span class="cx">                 0F11A54E0F39233100C37884 /* RenderSelectionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSelectionInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F13163D16ED0CC80035CC04 /* PlatformCAFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCAFilters.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCAFiltersCocoa.mm; sourceTree = "<group>"; };
</span><del>-                0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationControllerPrivate.h; sourceTree = "<group>"; };
</del><ins>+                0F15DA890F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAnimationControllerPrivate.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F15ED591B7EC7C500EDDFEB /* WillChangeData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillChangeData.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F15ED5A1B7EC7C500EDDFEB /* WillChangeData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WillChangeData.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimatorIOS.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -8584,8 +8584,8 @@
</span><span class="cx">                 316FE0920E6CCD7F00BF6088 /* CSSKeyframesRule.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CSSKeyframesRule.idl; sourceTree = "<group>"; };
</span><span class="cx">                 316FE1070E6E1DA700BF6088 /* AnimationBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationBase.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 316FE1080E6E1DA700BF6088 /* AnimationBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationBase.h; sourceTree = "<group>"; };
</span><del>-                316FE1090E6E1DA700BF6088 /* AnimationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationController.cpp; sourceTree = "<group>"; };
-                316FE10A0E6E1DA700BF6088 /* AnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationController.h; sourceTree = "<group>"; };
</del><ins>+                316FE1090E6E1DA700BF6088 /* CSSAnimationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAnimationController.cpp; sourceTree = "<group>"; };
+                316FE10A0E6E1DA700BF6088 /* CSSAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAnimationController.h; sourceTree = "<group>"; };
</ins><span class="cx">                 316FE10B0E6E1DA700BF6088 /* CompositeAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompositeAnimation.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 316FE10C0E6E1DA700BF6088 /* CompositeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompositeAnimation.h; sourceTree = "<group>"; };
</span><span class="cx">                 316FE10D0E6E1DA700BF6088 /* ImplicitAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImplicitAnimation.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -16657,9 +16657,9 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 316FE1070E6E1DA700BF6088 /* AnimationBase.cpp */,
</span><span class="cx">                                 316FE1080E6E1DA700BF6088 /* AnimationBase.h */,
</span><del>-                                316FE1090E6E1DA700BF6088 /* AnimationController.cpp */,
-                                316FE10A0E6E1DA700BF6088 /* AnimationController.h */,
-                                0F15DA890F3AAEE70000CE47 /* AnimationControllerPrivate.h */,
</del><ins>+                                316FE1090E6E1DA700BF6088 /* CSSAnimationController.cpp */,
+                                316FE10A0E6E1DA700BF6088 /* CSSAnimationController.h */,
+                                0F15DA890F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h */,
</ins><span class="cx">                                 316FE10B0E6E1DA700BF6088 /* CompositeAnimation.cpp */,
</span><span class="cx">                                 316FE10C0E6E1DA700BF6088 /* CompositeAnimation.h */,
</span><span class="cx">                                 78D02BC3154A18DF00B62D05 /* CSSPropertyAnimation.cpp */,
</span><span class="lines">@@ -25165,8 +25165,8 @@
</span><span class="cx">                                 490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */,
</span><span class="cx">                                 49E912AB0EFAC906009D0CAF /* Animation.h in Headers */,
</span><span class="cx">                                 316FE1120E6E1DA700BF6088 /* AnimationBase.h in Headers */,
</span><del>-                                316FE1140E6E1DA700BF6088 /* AnimationController.h in Headers */,
-                                0F15DA8A0F3AAEE70000CE47 /* AnimationControllerPrivate.h in Headers */,
</del><ins>+                                316FE1140E6E1DA700BF6088 /* CSSAnimationController.h in Headers */,
+                                0F15DA8A0F3AAEE70000CE47 /* CSSAnimationControllerPrivate.h in Headers */,
</ins><span class="cx">                                 319848011A1D817B00A13318 /* AnimationEvent.h in Headers */,
</span><span class="cx">                                 49E912AD0EFAC906009D0CAF /* AnimationList.h in Headers */,
</span><span class="cx">                                 31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */,
</span><span class="lines">@@ -29129,7 +29129,7 @@
</span><span class="cx">                                 490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */,
</span><span class="cx">                                 49E912AA0EFAC906009D0CAF /* Animation.cpp in Sources */,
</span><span class="cx">                                 316FE1110E6E1DA700BF6088 /* AnimationBase.cpp in Sources */,
</span><del>-                                316FE1130E6E1DA700BF6088 /* AnimationController.cpp in Sources */,
</del><ins>+                                316FE1130E6E1DA700BF6088 /* CSSAnimationController.cpp in Sources */,
</ins><span class="cx">                                 120DE3F11C86CCC600B6D4DD /* AnimationEffect.cpp in Sources */,
</span><span class="cx">                                 319848021A1D818100A13318 /* AnimationEvent.cpp in Sources */,
</span><span class="cx">                                 49E912AC0EFAC906009D0CAF /* AnimationList.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -25,9 +25,9 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "CSSComputedStyleDeclaration.h"
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "BasicShapeFunctions.h"
</span><span class="cx"> #include "BasicShapes.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CSSAnimationTriggerScrollValue.h"
</span><span class="cx"> #include "CSSAspectRatioValue.h"
</span><span class="cx"> #include "CSSBasicShapes.h"
</span><span class="lines">@@ -2408,7 +2408,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto* renderer = element.renderer();
</span><span class="cx">
</span><del>- if (renderer && renderer->isComposited() && AnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) {
</del><ins>+ if (renderer && renderer->isComposited() && CSSAnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) {
</ins><span class="cx"> ownedStyle = renderer->animation().getAnimatedStyleForRenderer(*renderer);
</span><span class="cx"> if (pseudoElementSpecifier && !element.isPseudoElement()) {
</span><span class="cx"> // FIXME: This cached pseudo style will only exist if the animation has been run at least once.
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/dom/Document.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx">
</span><span class="cx"> #include "AXObjectCache.h"
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "Attr.h"
</span><span class="cx"> #include "CDATASection.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CSSFontSelector.h"
</span><span class="cx"> #include "CSSStyleDeclaration.h"
</span><span class="cx"> #include "CSSStyleSheet.h"
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryCachedFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/CachedFrame.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/CachedFrame.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/history/CachedFrame.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -24,10 +24,11 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><del>-#include "CachedPage.h"
</del><ins>+#include "CachedFrame.h"
</ins><span class="cx">
</span><del>-#include "AnimationController.h"
</del><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CachedFramePlatformData.h"
</span><ins>+#include "CachedPage.h"
</ins><span class="cx"> #include "DOMWindow.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "DocumentLoader.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/Frame.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "ApplyStyleCommand.h"
</span><span class="cx"> #include "BackForwardController.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CSSComputedStyleDeclaration.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "CachedCSSStyleSheet.h"
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> , m_script(std::make_unique<ScriptController>(*this))
</span><span class="cx"> , m_editor(std::make_unique<Editor>(*this))
</span><span class="cx"> , m_selection(std::make_unique<FrameSelection>(this))
</span><del>- , m_animationController(std::make_unique<AnimationController>(*this))
</del><ins>+ , m_animationController(std::make_unique<CSSAnimationController>(*this))
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> , m_overflowAutoScrollTimer(*this, &Frame::overflowAutoScrollTimerFired)
</span><span class="cx"> , m_selectionChangeCallbacksDisabled(false)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/Frame.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class AnimationController;
</del><ins>+class CSSAnimationController;
</ins><span class="cx"> class Color;
</span><span class="cx"> class Document;
</span><span class="cx"> class Editor;
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> NavigationScheduler& navigationScheduler() const;
</span><span class="cx"> FrameSelection& selection() const;
</span><span class="cx"> FrameTree& tree() const;
</span><del>- AnimationController& animation() const;
</del><ins>+ CSSAnimationController& animation() const;
</ins><span class="cx"> ScriptController& script();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT RenderView* contentRenderer() const; // Root of the render tree for the document contained in this frame.
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> const std::unique_ptr<ScriptController> m_script;
</span><span class="cx"> const std::unique_ptr<Editor> m_editor;
</span><span class="cx"> const std::unique_ptr<FrameSelection> m_selection;
</span><del>- const std::unique_ptr<AnimationController> m_animationController;
</del><ins>+ const std::unique_ptr<CSSAnimationController> m_animationController;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx"> RetainPtr<NSArray> m_dataDetectionResults;
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx"> return *m_editor;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline AnimationController& Frame::animation() const
</del><ins>+inline CSSAnimationController& Frame::animation() const
</ins><span class="cx"> {
</span><span class="cx"> return *m_animationController;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/FrameView.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx">
</span><span class="cx"> #include "AXObjectCache.h"
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "BackForwardController.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CachedImage.h"
</span><span class="cx"> #include "CachedResourceLoader.h"
</span><span class="cx"> #include "Chrome.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/Page.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -22,10 +22,10 @@
</span><span class="cx">
</span><span class="cx"> #include "ActivityStateChangeObserver.h"
</span><span class="cx"> #include "AlternativeTextClient.h"
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "ApplicationCacheStorage.h"
</span><span class="cx"> #include "BackForwardClient.h"
</span><span class="cx"> #include "BackForwardController.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "Chrome.h"
</span><span class="cx"> #include "ChromeClient.h"
</span><span class="cx"> #include "ClientRectList.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/AnimationBase.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationBase.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/AnimationBase.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "AnimationBase.h"
</span><span class="cx">
</span><del>-#include "AnimationControllerPrivate.h"
</del><ins>+#include "CSSAnimationControllerPrivate.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPropertyAnimation.h"
</span><span class="cx"> #include "CompositeAnimation.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/page/animation/AnimationController.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationController.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,790 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "AnimationController.h"
-
-#include "AnimationBase.h"
-#include "AnimationControllerPrivate.h"
-#include "AnimationEvent.h"
-#include "CSSPropertyAnimation.h"
-#include "CSSPropertyParser.h"
-#include "CompositeAnimation.h"
-#include "EventNames.h"
-#include "Frame.h"
-#include "FrameView.h"
-#include "Logging.h"
-#include "PseudoElement.h"
-#include "RenderView.h"
-#include "TransitionEvent.h"
-#include "WebKitAnimationEvent.h"
-#include "WebKitTransitionEvent.h"
-#include <wtf/CurrentTime.h>
-
-namespace WebCore {
-
-static const double cAnimationTimerDelay = 1.0 / 60;
-static const double cBeginAnimationUpdateTimeNotSet = -1;
-
-class AnimationPrivateUpdateBlock {
-public:
- AnimationPrivateUpdateBlock(AnimationControllerPrivate& animationController)
- : m_animationController(animationController)
- {
- m_animationController.beginAnimationUpdate();
- }
-
- ~AnimationPrivateUpdateBlock()
- {
- m_animationController.endAnimationUpdate();
- }
-
- AnimationControllerPrivate& m_animationController;
-};
-
-AnimationControllerPrivate::AnimationControllerPrivate(Frame& frame)
- : m_animationTimer(*this, &AnimationControllerPrivate::animationTimerFired)
- , m_updateStyleIfNeededDispatcher(*this, &AnimationControllerPrivate::updateStyleIfNeededDispatcherFired)
- , m_frame(frame)
- , m_beginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet)
- , m_beginAnimationUpdateCount(0)
- , m_waitingForAsyncStartNotification(false)
- , m_isSuspended(false)
- , m_allowsNewAnimationsWhileSuspended(false)
-{
-}
-
-AnimationControllerPrivate::~AnimationControllerPrivate()
-{
-}
-
-CompositeAnimation& AnimationControllerPrivate::ensureCompositeAnimation(RenderElement& renderer)
-{
- auto result = m_compositeAnimations.add(&renderer, nullptr);
- if (result.isNewEntry) {
- result.iterator->value = CompositeAnimation::create(*this);
- renderer.setIsCSSAnimating(true);
- }
-
- if (animationsAreSuspendedForDocument(&renderer.document()))
- result.iterator->value->suspendAnimations();
-
- return *result.iterator->value;
-}
-
-bool AnimationControllerPrivate::clear(RenderElement& renderer)
-{
- LOG(Animations, "AnimationControllerPrivate %p clear: %p", this, &renderer);
-
- ASSERT(renderer.isCSSAnimating());
- ASSERT(m_compositeAnimations.contains(&renderer));
-
- Element* element = renderer.element();
-
- m_eventsToDispatch.removeAllMatching([element] (const EventToDispatch& info) {
- return info.element.ptr() == element;
- });
-
- m_elementChangesToDispatch.removeAllMatching([element](auto& currentElement) {
- return currentElement.ptr() == element;
- });
-
- // Return false if we didn't do anything OR we are suspended (so we don't try to
- // do a invalidateStyleForSubtree() when suspended).
- RefPtr<CompositeAnimation> animation = m_compositeAnimations.take(&renderer);
- ASSERT(animation);
- renderer.setIsCSSAnimating(false);
- animation->clearRenderer();
- return animation->isSuspended();
-}
-
-double AnimationControllerPrivate::updateAnimations(SetChanged callSetChanged/* = DoNotCallSetChanged*/)
-{
- AnimationPrivateUpdateBlock updateBlock(*this);
- double timeToNextService = -1;
- bool calledSetChanged = false;
-
- for (auto& compositeAnimation : m_compositeAnimations) {
- CompositeAnimation& animation = *compositeAnimation.value;
- if (!animation.isSuspended() && animation.hasAnimations()) {
- double t = animation.timeToNextService();
- if (t != -1 && (t < timeToNextService || timeToNextService == -1))
- timeToNextService = t;
- if (!timeToNextService) {
- if (callSetChanged != CallSetChanged)
- break;
- Element* element = compositeAnimation.key->element();
- ASSERT(element);
- ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
- element->invalidateStyleAndLayerComposition();
- calledSetChanged = true;
- }
- }
- }
-
- if (calledSetChanged)
- m_frame.document()->updateStyleIfNeeded();
-
- return timeToNextService;
-}
-
-void AnimationControllerPrivate::updateAnimationTimerForRenderer(RenderElement& renderer)
-{
- double timeToNextService = 0;
-
- const CompositeAnimation* compositeAnimation = m_compositeAnimations.get(&renderer);
- if (!compositeAnimation->isSuspended() && compositeAnimation->hasAnimations())
- timeToNextService = compositeAnimation->timeToNextService();
-
- if (m_animationTimer.isActive() && (m_animationTimer.repeatInterval() || m_animationTimer.nextFireInterval() <= timeToNextService))
- return;
-
- m_animationTimer.startOneShot(timeToNextService);
-}
-
-void AnimationControllerPrivate::updateAnimationTimer(SetChanged callSetChanged/* = DoNotCallSetChanged*/)
-{
- double timeToNextService = updateAnimations(callSetChanged);
-
- LOG(Animations, "updateAnimationTimer: timeToNextService is %.2f", timeToNextService);
-
- // If we want service immediately, we start a repeating timer to reduce the overhead of starting
- if (!timeToNextService) {
- if (!m_animationTimer.isActive() || m_animationTimer.repeatInterval() == 0)
- m_animationTimer.startRepeating(cAnimationTimerDelay);
- return;
- }
-
- // If we don't need service, we want to make sure the timer is no longer running
- if (timeToNextService < 0) {
- if (m_animationTimer.isActive())
- m_animationTimer.stop();
- return;
- }
-
- // Otherwise, we want to start a one-shot timer so we get here again
- m_animationTimer.startOneShot(timeToNextService);
-}
-
-void AnimationControllerPrivate::updateStyleIfNeededDispatcherFired()
-{
- fireEventsAndUpdateStyle();
-}
-
-void AnimationControllerPrivate::fireEventsAndUpdateStyle()
-{
- // Protect the frame from getting destroyed in the event handler
- Ref<Frame> protector(m_frame);
-
- bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_elementChangesToDispatch.isEmpty();
-
- // fire all the events
- Vector<EventToDispatch> eventsToDispatch = WTFMove(m_eventsToDispatch);
- for (auto& event : eventsToDispatch) {
- Element& element = event.element;
- if (event.eventType == eventNames().transitionendEvent)
- element.dispatchEvent(TransitionEvent::create(event.eventType, event.name, event.elapsedTime, PseudoElement::pseudoElementNameForEvents(element.pseudoId())));
- else
- element.dispatchEvent(AnimationEvent::create(event.eventType, event.name, event.elapsedTime));
- }
-
- for (auto& change : m_elementChangesToDispatch)
- change->invalidateStyleAndLayerComposition();
-
- m_elementChangesToDispatch.clear();
-
- if (updateStyle)
- m_frame.document()->updateStyleIfNeeded();
-}
-
-void AnimationControllerPrivate::startUpdateStyleIfNeededDispatcher()
-{
- if (!m_updateStyleIfNeededDispatcher.isActive())
- m_updateStyleIfNeededDispatcher.startOneShot(0);
-}
-
-void AnimationControllerPrivate::addEventToDispatch(Element& element, const AtomicString& eventType, const String& name, double elapsedTime)
-{
- m_eventsToDispatch.append({ element, eventType, name, elapsedTime });
- startUpdateStyleIfNeededDispatcher();
-}
-
-void AnimationControllerPrivate::addElementChangeToDispatch(Element& element)
-{
- m_elementChangesToDispatch.append(element);
- ASSERT(m_elementChangesToDispatch.last()->document().pageCacheState() == Document::NotInPageCache);
- startUpdateStyleIfNeededDispatcher();
-}
-
-void AnimationControllerPrivate::animationFrameCallbackFired()
-{
- double timeToNextService = updateAnimations(CallSetChanged);
-
- if (timeToNextService >= 0)
- m_frame.document()->view()->scheduleAnimation();
-}
-
-void AnimationControllerPrivate::animationTimerFired()
-{
- // We need to keep the frame alive, since it owns us.
- Ref<Frame> protector(m_frame);
-
- // Make sure animationUpdateTime is updated, so that it is current even if no
- // styleChange has happened (e.g. accelerated animations)
- AnimationPrivateUpdateBlock updateBlock(*this);
-
- // When the timer fires, all we do is call setChanged on all DOM nodes with running animations and then do an immediate
- // updateStyleIfNeeded. It will then call back to us with new information.
- updateAnimationTimer(CallSetChanged);
-
- // Fire events right away, to avoid a flash of unanimated style after an animation completes, and before
- // the 'end' event fires.
- fireEventsAndUpdateStyle();
-}
-
-bool AnimationControllerPrivate::isRunningAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
-{
- ASSERT(renderer.isCSSAnimating());
- ASSERT(m_compositeAnimations.contains(&renderer));
- const CompositeAnimation& animation = *m_compositeAnimations.get(&renderer);
- return animation.isAnimatingProperty(property, false, runningState);
-}
-
-bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
-{
- ASSERT(renderer.isCSSAnimating());
- ASSERT(m_compositeAnimations.contains(&renderer));
- const CompositeAnimation& animation = *m_compositeAnimations.get(&renderer);
- return animation.isAnimatingProperty(property, true, runningState);
-}
-
-void AnimationControllerPrivate::suspendAnimations()
-{
- if (isSuspended())
- return;
-
- suspendAnimationsForDocument(m_frame.document());
-
- // Traverse subframes
- for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
- child->animation().suspendAnimations();
-
- m_isSuspended = true;
-}
-
-void AnimationControllerPrivate::resumeAnimations()
-{
- if (!isSuspended())
- return;
-
- resumeAnimationsForDocument(m_frame.document());
-
- // Traverse subframes
- for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
- child->animation().resumeAnimations();
-
- m_isSuspended = false;
-}
-
-bool AnimationControllerPrivate::animationsAreSuspendedForDocument(Document* document)
-{
- return isSuspended() || m_suspendedDocuments.contains(document);
-}
-
-void AnimationControllerPrivate::detachFromDocument(Document* document)
-{
- m_suspendedDocuments.remove(document);
-}
-
-void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document)
-{
- if (animationsAreSuspendedForDocument(document))
- return;
-
- m_suspendedDocuments.add(document);
-
- AnimationPrivateUpdateBlock updateBlock(*this);
-
- for (auto& animation : m_compositeAnimations) {
- if (&animation.key->document() == document)
- animation.value->suspendAnimations();
- }
-
- updateAnimationTimer();
-}
-
-void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
-{
- if (!animationsAreSuspendedForDocument(document))
- return;
-
- detachFromDocument(document);
-
- AnimationPrivateUpdateBlock updateBlock(*this);
-
- for (auto& animation : m_compositeAnimations) {
- if (&animation.key->document() == document)
- animation.value->resumeAnimations();
- }
-
- updateAnimationTimer();
-}
-
-void AnimationControllerPrivate::startAnimationsIfNotSuspended(Document* document)
-{
- if (!animationsAreSuspendedForDocument(document) || allowsNewAnimationsWhileSuspended())
- resumeAnimationsForDocument(document);
-}
-
-void AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended(bool allowed)
-{
- m_allowsNewAnimationsWhileSuspended = allowed;
-}
-
-bool AnimationControllerPrivate::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t)
-{
- if (!renderer)
- return false;
-
- CompositeAnimation& compositeAnimation = ensureCompositeAnimation(*renderer);
- if (compositeAnimation.pauseAnimationAtTime(name, t)) {
- renderer->element()->invalidateStyleAndLayerComposition();
- startUpdateStyleIfNeededDispatcher();
- return true;
- }
-
- return false;
-}
-
-bool AnimationControllerPrivate::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t)
-{
- if (!renderer)
- return false;
-
- CompositeAnimation& compositeAnimation = ensureCompositeAnimation(*renderer);
- if (compositeAnimation.pauseTransitionAtTime(cssPropertyID(property), t)) {
- renderer->element()->invalidateStyleAndLayerComposition();
- startUpdateStyleIfNeededDispatcher();
- return true;
- }
-
- return false;
-}
-
-double AnimationControllerPrivate::beginAnimationUpdateTime()
-{
- ASSERT(m_beginAnimationUpdateCount);
- if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
- m_beginAnimationUpdateTime = monotonicallyIncreasingTime();
-
- return m_beginAnimationUpdateTime;
-}
-
-void AnimationControllerPrivate::beginAnimationUpdate()
-{
- if (!m_beginAnimationUpdateCount)
- setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
- ++m_beginAnimationUpdateCount;
-}
-
-void AnimationControllerPrivate::endAnimationUpdate()
-{
- ASSERT(m_beginAnimationUpdateCount > 0);
- if (m_beginAnimationUpdateCount == 1) {
- styleAvailable();
- if (!m_waitingForAsyncStartNotification)
- startTimeResponse(beginAnimationUpdateTime());
- }
- --m_beginAnimationUpdateCount;
-}
-
-void AnimationControllerPrivate::receivedStartTimeResponse(double time)
-{
- LOG(Animations, "AnimationControllerPrivate %p receivedStartTimeResponse %f", this, time);
-
- m_waitingForAsyncStartNotification = false;
- startTimeResponse(time);
-}
-
-std::unique_ptr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer)
-{
- AnimationPrivateUpdateBlock animationUpdateBlock(*this);
-
- ASSERT(renderer.isCSSAnimating());
- ASSERT(m_compositeAnimations.contains(&renderer));
- const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
- std::unique_ptr<RenderStyle> animatingStyle = rendererAnimations.getAnimatedStyle();
- if (!animatingStyle)
- animatingStyle = RenderStyle::clonePtr(renderer.style());
-
- return animatingStyle;
-}
-
-bool AnimationControllerPrivate::computeExtentOfAnimation(RenderElement& renderer, LayoutRect& bounds) const
-{
- ASSERT(renderer.isCSSAnimating());
- ASSERT(m_compositeAnimations.contains(&renderer));
-
- const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
- if (!rendererAnimations.isAnimatingProperty(CSSPropertyTransform, false, AnimationBase::Running | AnimationBase::Paused))
- return true;
-
- return rendererAnimations.computeExtentOfTransformAnimation(bounds);
-}
-
-unsigned AnimationControllerPrivate::numberOfActiveAnimations(Document* document) const
-{
- unsigned count = 0;
-
- for (auto& animation : m_compositeAnimations) {
- if (&animation.key->document() == document)
- count += animation.value->numberOfActiveAnimations();
- }
-
- return count;
-}
-
-void AnimationControllerPrivate::addToAnimationsWaitingForStyle(AnimationBase* animation)
-{
- // Make sure this animation is not in the start time waiters
- m_animationsWaitingForStartTimeResponse.remove(animation);
-
- m_animationsWaitingForStyle.add(animation);
-}
-
-void AnimationControllerPrivate::removeFromAnimationsWaitingForStyle(AnimationBase* animationToRemove)
-{
- m_animationsWaitingForStyle.remove(animationToRemove);
-}
-
-void AnimationControllerPrivate::styleAvailable()
-{
- // Go through list of waiters and send them on their way
- for (const auto& waitingAnimation : m_animationsWaitingForStyle)
- waitingAnimation->styleAvailable();
-
- m_animationsWaitingForStyle.clear();
-}
-
-void AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse(AnimationBase* animation, bool willGetResponse)
-{
- // If willGetResponse is true, it means this animation is actually waiting for a response
- // (which will come in as a call to notifyAnimationStarted()).
- // In that case we don't need to add it to this list. We just set a waitingForAResponse flag
- // which says we are waiting for the response. If willGetResponse is false, this animation
- // is not waiting for a response for itself, but rather for a notifyXXXStarted() call for
- // another animation to which it will sync.
- //
- // When endAnimationUpdate() is called we check to see if the waitingForAResponse flag is
- // true. If so, we just return and will do our work when the first notifyXXXStarted() call
- // comes in. If it is false, we will not be getting a notifyXXXStarted() call, so we will
- // do our work right away. In both cases we call the onAnimationStartResponse() method
- // on each animation. In the first case we send in the time we got from notifyXXXStarted().
- // In the second case, we just pass in the beginAnimationUpdateTime().
- //
- // This will synchronize all software and accelerated animations started in the same
- // updateStyleIfNeeded cycle.
- //
-
- if (willGetResponse)
- m_waitingForAsyncStartNotification = true;
-
- m_animationsWaitingForStartTimeResponse.add(animation);
-}
-
-void AnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse(AnimationBase* animationToRemove)
-{
- m_animationsWaitingForStartTimeResponse.remove(animationToRemove);
-
- if (m_animationsWaitingForStartTimeResponse.isEmpty())
- m_waitingForAsyncStartNotification = false;
-}
-
-void AnimationControllerPrivate::startTimeResponse(double time)
-{
- // Go through list of waiters and send them on their way
-
- for (const auto& animation : m_animationsWaitingForStartTimeResponse)
- animation->onAnimationStartResponse(time);
-
- m_animationsWaitingForStartTimeResponse.clear();
- m_waitingForAsyncStartNotification = false;
-}
-
-void AnimationControllerPrivate::animationWillBeRemoved(AnimationBase* animation)
-{
- LOG(Animations, "AnimationControllerPrivate %p animationWillBeRemoved: %p", this, animation);
-
- removeFromAnimationsWaitingForStyle(animation);
- removeFromAnimationsWaitingForStartTimeResponse(animation);
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
- removeFromAnimationsDependentOnScroll(animation);
-#endif
-
- bool anyAnimationsWaitingForAsyncStart = false;
- for (auto& animation : m_animationsWaitingForStartTimeResponse) {
- if (animation->waitingForStartTime() && animation->isAccelerated()) {
- anyAnimationsWaitingForAsyncStart = true;
- break;
- }
- }
-
- if (!anyAnimationsWaitingForAsyncStart)
- m_waitingForAsyncStartNotification = false;
-}
-
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
-void AnimationControllerPrivate::addToAnimationsDependentOnScroll(AnimationBase* animation)
-{
- m_animationsDependentOnScroll.add(animation);
-}
-
-void AnimationControllerPrivate::removeFromAnimationsDependentOnScroll(AnimationBase* animation)
-{
- m_animationsDependentOnScroll.remove(animation);
-}
-
-void AnimationControllerPrivate::scrollWasUpdated()
-{
- auto* view = m_frame.view();
- if (!view || !wantsScrollUpdates())
- return;
-
- m_scrollPosition = view->scrollPositionForFixedPosition().y().toFloat();
-
- // FIXME: This is updating all the animations, rather than just the ones
- // that are dependent on scroll. We to go from our AnimationBase to its CompositeAnimation
- // so we can execute code similar to updateAnimations.
- // https://bugs.webkit.org/show_bug.cgi?id=144170
- updateAnimations(CallSetChanged);
-}
-#endif
-
-AnimationController::AnimationController(Frame& frame)
- : m_data(std::make_unique<AnimationControllerPrivate>(frame))
-{
-}
-
-AnimationController::~AnimationController()
-{
-}
-
-void AnimationController::cancelAnimations(RenderElement& renderer)
-{
- if (!renderer.isCSSAnimating())
- return;
-
- if (!m_data->clear(renderer))
- return;
-
- Element* element = renderer.element();
- if (!element || element->document().renderTreeBeingDestroyed())
- return;
- ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
- element->invalidateStyleAndLayerComposition();
-}
-
-bool AnimationController::updateAnimations(RenderElement& renderer, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle)
-{
- auto* oldStyle = renderer.hasInitializedStyle() ? &renderer.style() : nullptr;
- if ((!oldStyle || (!oldStyle->animations() && !oldStyle->transitions())) && (!newStyle.animations() && !newStyle.transitions()))
- return false;
-
- if (renderer.document().pageCacheState() != Document::NotInPageCache)
- return false;
-
- // Don't run transitions when printing.
- if (renderer.view().printing())
- return false;
-
- // Fetch our current set of implicit animations from a hashtable. We then compare them
- // against the animations in the style and make sure we're in sync. If destination values
- // have changed, we reset the animation. We then do a blend to get new values and we return
- // a new style.
-
- // We don't support anonymous pseudo elements like :first-line or :first-letter.
- ASSERT(renderer.element());
-
- CompositeAnimation& rendererAnimations = m_data->ensureCompositeAnimation(renderer);
- bool animationStateChanged = rendererAnimations.animate(renderer, oldStyle, newStyle, animatedStyle);
-
- if (renderer.parent() || newStyle.animations() || (oldStyle && oldStyle->animations())) {
- m_data->updateAnimationTimerForRenderer(renderer);
- renderer.view().frameView().scheduleAnimation();
- }
-
- return animationStateChanged;
-}
-
-std::unique_ptr<RenderStyle> AnimationController::getAnimatedStyleForRenderer(RenderElement& renderer)
-{
- if (!renderer.isCSSAnimating())
- return RenderStyle::clonePtr(renderer.style());
- return m_data->getAnimatedStyleForRenderer(renderer);
-}
-
-bool AnimationController::computeExtentOfAnimation(RenderElement& renderer, LayoutRect& bounds) const
-{
- if (!renderer.isCSSAnimating())
- return true;
-
- return m_data->computeExtentOfAnimation(renderer, bounds);
-}
-
-void AnimationController::notifyAnimationStarted(RenderElement& renderer, double startTime)
-{
- LOG(Animations, "AnimationController %p notifyAnimationStarted on renderer %p, time=%f", this, &renderer, startTime);
- UNUSED_PARAM(renderer);
-
- AnimationUpdateBlock animationUpdateBlock(this);
- m_data->receivedStartTimeResponse(startTime);
-}
-
-bool AnimationController::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t)
-{
- AnimationUpdateBlock animationUpdateBlock(this);
- return m_data->pauseAnimationAtTime(renderer, name, t);
-}
-
-unsigned AnimationController::numberOfActiveAnimations(Document* document) const
-{
- return m_data->numberOfActiveAnimations(document);
-}
-
-bool AnimationController::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t)
-{
- AnimationUpdateBlock animationUpdateBlock(this);
- return m_data->pauseTransitionAtTime(renderer, property, t);
-}
-
-bool AnimationController::isRunningAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
-{
- return renderer.isCSSAnimating() && m_data->isRunningAnimationOnRenderer(renderer, property, runningState);
-}
-
-bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
-{
- return renderer.isCSSAnimating() && m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, runningState);
-}
-
-bool AnimationController::isSuspended() const
-{
- return m_data->isSuspended();
-}
-
-void AnimationController::suspendAnimations()
-{
- LOG(Animations, "controller is suspending animations");
- m_data->suspendAnimations();
-}
-
-void AnimationController::resumeAnimations()
-{
- LOG(Animations, "controller is resuming animations");
- m_data->resumeAnimations();
-}
-
-bool AnimationController::allowsNewAnimationsWhileSuspended() const
-{
- return m_data->allowsNewAnimationsWhileSuspended();
-}
-
-void AnimationController::setAllowsNewAnimationsWhileSuspended(bool allowed)
-{
- m_data->setAllowsNewAnimationsWhileSuspended(allowed);
-}
-
-void AnimationController::serviceAnimations()
-{
- m_data->animationFrameCallbackFired();
-}
-
-bool AnimationController::animationsAreSuspendedForDocument(Document* document)
-{
- return m_data->animationsAreSuspendedForDocument(document);
-}
-
-void AnimationController::detachFromDocument(Document* document)
-{
- return m_data->detachFromDocument(document);
-}
-
-void AnimationController::suspendAnimationsForDocument(Document* document)
-{
- LOG(Animations, "suspending animations for document %p", document);
- m_data->suspendAnimationsForDocument(document);
-}
-
-void AnimationController::resumeAnimationsForDocument(Document* document)
-{
- LOG(Animations, "resuming animations for document %p", document);
- AnimationUpdateBlock animationUpdateBlock(this);
- m_data->resumeAnimationsForDocument(document);
-}
-
-void AnimationController::startAnimationsIfNotSuspended(Document* document)
-{
- LOG(Animations, "animations may start for document %p", document);
-
- AnimationUpdateBlock animationUpdateBlock(this);
- m_data->startAnimationsIfNotSuspended(document);
-}
-
-void AnimationController::beginAnimationUpdate()
-{
- m_data->beginAnimationUpdate();
-}
-
-void AnimationController::endAnimationUpdate()
-{
- m_data->endAnimationUpdate();
-}
-
-bool AnimationController::supportsAcceleratedAnimationOfProperty(CSSPropertyID property)
-{
- return CSSPropertyAnimation::animationOfPropertyIsAccelerated(property);
-}
-
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
-bool AnimationController::wantsScrollUpdates() const
-{
- return m_data->wantsScrollUpdates();
-}
-
-void AnimationController::scrollWasUpdated()
-{
- m_data->scrollWasUpdated();
-}
-#endif
-
-bool AnimationController::hasAnimations() const
-{
- return m_data->hasAnimations();
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/page/animation/AnimationController.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationController.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/AnimationController.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,118 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "AnimationBase.h"
-#include "CSSPropertyNames.h"
-#include <wtf/Forward.h>
-
-namespace WebCore {
-
-class AnimationControllerPrivate;
-class Document;
-class Element;
-class Frame;
-class LayoutRect;
-class RenderElement;
-class RenderStyle;
-
-class AnimationController {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit AnimationController(Frame&);
- ~AnimationController();
-
- void cancelAnimations(RenderElement&);
- bool updateAnimations(RenderElement&, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle);
- std::unique_ptr<RenderStyle> getAnimatedStyleForRenderer(RenderElement&);
-
- // If possible, compute the visual extent of any transform animation on the given renderer
- // using the given rect, returning the result in the rect. Return false if there is some
- // transform animation but we were unable to cheaply compute its affect on the extent.
- bool computeExtentOfAnimation(RenderElement&, LayoutRect&) const;
-
- // This is called when an accelerated animation or transition has actually started to animate.
- void notifyAnimationStarted(RenderElement&, double startTime);
-
- WEBCORE_EXPORT bool pauseAnimationAtTime(RenderElement*, const AtomicString& name, double t); // To be used only for testing
- WEBCORE_EXPORT bool pauseTransitionAtTime(RenderElement*, const String& property, double t); // To be used only for testing
- WEBCORE_EXPORT unsigned numberOfActiveAnimations(Document*) const; // To be used only for testing
-
- bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
- bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
-
- WEBCORE_EXPORT bool isSuspended() const;
- WEBCORE_EXPORT void suspendAnimations();
- WEBCORE_EXPORT void resumeAnimations();
- void serviceAnimations();
-
- WEBCORE_EXPORT void suspendAnimationsForDocument(Document*);
- WEBCORE_EXPORT void resumeAnimationsForDocument(Document*);
- WEBCORE_EXPORT bool animationsAreSuspendedForDocument(Document*);
- void detachFromDocument(Document*);
- void startAnimationsIfNotSuspended(Document*);
-
- void beginAnimationUpdate();
- void endAnimationUpdate();
-
- WEBCORE_EXPORT bool allowsNewAnimationsWhileSuspended() const;
- WEBCORE_EXPORT void setAllowsNewAnimationsWhileSuspended(bool);
-
- static bool supportsAcceleratedAnimationOfProperty(CSSPropertyID);
-
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
- bool wantsScrollUpdates() const;
- void scrollWasUpdated();
-#endif
-
- bool hasAnimations() const;
-
-private:
- const std::unique_ptr<AnimationControllerPrivate> m_data;
-};
-
-class AnimationUpdateBlock {
-public:
- AnimationUpdateBlock(AnimationController* animationController)
- : m_animationController(animationController)
- {
- if (m_animationController)
- m_animationController->beginAnimationUpdate();
- }
-
- ~AnimationUpdateBlock()
- {
- if (m_animationController)
- m_animationController->endAnimationUpdate();
- }
-
- AnimationController* m_animationController;
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllerPrivateh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,160 +0,0 @@
</span><del>-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "AnimationBase.h"
-#include "Timer.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class CompositeAnimation;
-class Document;
-class Frame;
-
-enum SetChanged { DoNotCallSetChanged, CallSetChanged };
-
-class AnimationControllerPrivate {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit AnimationControllerPrivate(Frame&);
- ~AnimationControllerPrivate();
-
- // Returns the time until the next animation needs to be serviced, or -1 if there are none.
- double updateAnimations(SetChanged callSetChanged = DoNotCallSetChanged);
- void updateAnimationTimer(SetChanged callSetChanged = DoNotCallSetChanged);
-
- CompositeAnimation& ensureCompositeAnimation(RenderElement&);
- bool clear(RenderElement&);
-
- void updateStyleIfNeededDispatcherFired();
- void startUpdateStyleIfNeededDispatcher();
- void addEventToDispatch(Element&, const AtomicString& eventType, const String& name, double elapsedTime);
- void addElementChangeToDispatch(Element&);
-
- bool hasAnimations() const { return !m_compositeAnimations.isEmpty(); }
-
- bool isSuspended() const { return m_isSuspended; }
- void suspendAnimations();
- void resumeAnimations();
- void animationFrameCallbackFired();
-
- void suspendAnimationsForDocument(Document*);
- void resumeAnimationsForDocument(Document*);
- bool animationsAreSuspendedForDocument(Document*);
- void startAnimationsIfNotSuspended(Document*);
- void detachFromDocument(Document*);
-
- bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
- bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
-
- bool pauseAnimationAtTime(RenderElement*, const AtomicString& name, double t);
- bool pauseTransitionAtTime(RenderElement*, const String& property, double t);
- unsigned numberOfActiveAnimations(Document*) const;
-
- std::unique_ptr<RenderStyle> getAnimatedStyleForRenderer(RenderElement&);
-
- bool computeExtentOfAnimation(RenderElement&, LayoutRect&) const;
-
- double beginAnimationUpdateTime();
- void setBeginAnimationUpdateTime(double t) { m_beginAnimationUpdateTime = t; }
-
- void beginAnimationUpdate();
- void endAnimationUpdate();
- void receivedStartTimeResponse(double);
-
- void addToAnimationsWaitingForStyle(AnimationBase*);
- void removeFromAnimationsWaitingForStyle(AnimationBase*);
-
- void addToAnimationsWaitingForStartTimeResponse(AnimationBase*, bool willGetResponse);
- void removeFromAnimationsWaitingForStartTimeResponse(AnimationBase*);
-
- void animationWillBeRemoved(AnimationBase*);
-
- void updateAnimationTimerForRenderer(RenderElement&);
-
- bool allowsNewAnimationsWhileSuspended() const { return m_allowsNewAnimationsWhileSuspended; }
- void setAllowsNewAnimationsWhileSuspended(bool);
-
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
- bool wantsScrollUpdates() const { return !m_animationsDependentOnScroll.isEmpty(); }
- void addToAnimationsDependentOnScroll(AnimationBase*);
- void removeFromAnimationsDependentOnScroll(AnimationBase*);
-
- void scrollWasUpdated();
- float scrollPosition() const { return m_scrollPosition; }
-#endif
-
-private:
- void animationTimerFired();
-
- void styleAvailable();
- void fireEventsAndUpdateStyle();
- void startTimeResponse(double t);
-
- HashMap<RenderElement*, RefPtr<CompositeAnimation>> m_compositeAnimations;
- Timer m_animationTimer;
- Timer m_updateStyleIfNeededDispatcher;
- Frame& m_frame;
-
- struct EventToDispatch {
- Ref<Element> element;
- AtomicString eventType;
- String name;
- double elapsedTime;
- };
- Vector<EventToDispatch> m_eventsToDispatch;
- Vector<Ref<Element>> m_elementChangesToDispatch;
- HashSet<Document*> m_suspendedDocuments;
-
- double m_beginAnimationUpdateTime;
-
- using AnimationsSet = HashSet<RefPtr<AnimationBase>>;
- AnimationsSet m_animationsWaitingForStyle;
- AnimationsSet m_animationsWaitingForStartTimeResponse;
-
- int m_beginAnimationUpdateCount;
-
- bool m_waitingForAsyncStartNotification;
- bool m_isSuspended;
-
- // Used to flag whether we should revert to previous buggy
- // behavior of allowing new transitions and animations to
- // run even when this object is suspended.
- bool m_allowsNewAnimationsWhileSuspended;
-
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
- AnimationsSet m_animationsDependentOnScroll;
- float m_scrollPosition { 0 };
-#endif
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSAnimationControllercppfromrev211740trunkSourceWebCorepageanimationAnimationControllercpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/animation/CSSAnimationController.cpp (from rev 211740, trunk/Source/WebCore/page/animation/AnimationController.cpp) (0 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSAnimationController.cpp         (rev 0)
+++ trunk/Source/WebCore/page/animation/CSSAnimationController.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -0,0 +1,790 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CSSAnimationController.h"
+
+#include "AnimationBase.h"
+#include "AnimationEvent.h"
+#include "CSSAnimationControllerPrivate.h"
+#include "CSSPropertyAnimation.h"
+#include "CSSPropertyParser.h"
+#include "CompositeAnimation.h"
+#include "EventNames.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "Logging.h"
+#include "PseudoElement.h"
+#include "RenderView.h"
+#include "TransitionEvent.h"
+#include "WebKitAnimationEvent.h"
+#include "WebKitTransitionEvent.h"
+#include <wtf/CurrentTime.h>
+
+namespace WebCore {
+
+static const double cAnimationTimerDelay = 1.0 / 60;
+static const double cBeginAnimationUpdateTimeNotSet = -1;
+
+class AnimationPrivateUpdateBlock {
+public:
+ AnimationPrivateUpdateBlock(CSSAnimationControllerPrivate& animationController)
+ : m_animationController(animationController)
+ {
+ m_animationController.beginAnimationUpdate();
+ }
+
+ ~AnimationPrivateUpdateBlock()
+ {
+ m_animationController.endAnimationUpdate();
+ }
+
+ CSSAnimationControllerPrivate& m_animationController;
+};
+
+CSSAnimationControllerPrivate::CSSAnimationControllerPrivate(Frame& frame)
+ : m_animationTimer(*this, &CSSAnimationControllerPrivate::animationTimerFired)
+ , m_updateStyleIfNeededDispatcher(*this, &CSSAnimationControllerPrivate::updateStyleIfNeededDispatcherFired)
+ , m_frame(frame)
+ , m_beginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet)
+ , m_beginAnimationUpdateCount(0)
+ , m_waitingForAsyncStartNotification(false)
+ , m_isSuspended(false)
+ , m_allowsNewAnimationsWhileSuspended(false)
+{
+}
+
+CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate()
+{
+}
+
+CompositeAnimation& CSSAnimationControllerPrivate::ensureCompositeAnimation(RenderElement& renderer)
+{
+ auto result = m_compositeAnimations.add(&renderer, nullptr);
+ if (result.isNewEntry) {
+ result.iterator->value = CompositeAnimation::create(*this);
+ renderer.setIsCSSAnimating(true);
+ }
+
+ if (animationsAreSuspendedForDocument(&renderer.document()))
+ result.iterator->value->suspendAnimations();
+
+ return *result.iterator->value;
+}
+
+bool CSSAnimationControllerPrivate::clear(RenderElement& renderer)
+{
+ LOG(Animations, "CSSAnimationControllerPrivate %p clear: %p", this, &renderer);
+
+ ASSERT(renderer.isCSSAnimating());
+ ASSERT(m_compositeAnimations.contains(&renderer));
+
+ Element* element = renderer.element();
+
+ m_eventsToDispatch.removeAllMatching([element] (const EventToDispatch& info) {
+ return info.element.ptr() == element;
+ });
+
+ m_elementChangesToDispatch.removeAllMatching([element](auto& currentElement) {
+ return currentElement.ptr() == element;
+ });
+
+ // Return false if we didn't do anything OR we are suspended (so we don't try to
+ // do a invalidateStyleForSubtree() when suspended).
+ RefPtr<CompositeAnimation> animation = m_compositeAnimations.take(&renderer);
+ ASSERT(animation);
+ renderer.setIsCSSAnimating(false);
+ animation->clearRenderer();
+ return animation->isSuspended();
+}
+
+double CSSAnimationControllerPrivate::updateAnimations(SetChanged callSetChanged/* = DoNotCallSetChanged*/)
+{
+ AnimationPrivateUpdateBlock updateBlock(*this);
+ double timeToNextService = -1;
+ bool calledSetChanged = false;
+
+ for (auto& compositeAnimation : m_compositeAnimations) {
+ CompositeAnimation& animation = *compositeAnimation.value;
+ if (!animation.isSuspended() && animation.hasAnimations()) {
+ double t = animation.timeToNextService();
+ if (t != -1 && (t < timeToNextService || timeToNextService == -1))
+ timeToNextService = t;
+ if (!timeToNextService) {
+ if (callSetChanged != CallSetChanged)
+ break;
+ Element* element = compositeAnimation.key->element();
+ ASSERT(element);
+ ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
+ element->invalidateStyleAndLayerComposition();
+ calledSetChanged = true;
+ }
+ }
+ }
+
+ if (calledSetChanged)
+ m_frame.document()->updateStyleIfNeeded();
+
+ return timeToNextService;
+}
+
+void CSSAnimationControllerPrivate::updateAnimationTimerForRenderer(RenderElement& renderer)
+{
+ double timeToNextService = 0;
+
+ const CompositeAnimation* compositeAnimation = m_compositeAnimations.get(&renderer);
+ if (!compositeAnimation->isSuspended() && compositeAnimation->hasAnimations())
+ timeToNextService = compositeAnimation->timeToNextService();
+
+ if (m_animationTimer.isActive() && (m_animationTimer.repeatInterval() || m_animationTimer.nextFireInterval() <= timeToNextService))
+ return;
+
+ m_animationTimer.startOneShot(timeToNextService);
+}
+
+void CSSAnimationControllerPrivate::updateAnimationTimer(SetChanged callSetChanged/* = DoNotCallSetChanged*/)
+{
+ double timeToNextService = updateAnimations(callSetChanged);
+
+ LOG(Animations, "updateAnimationTimer: timeToNextService is %.2f", timeToNextService);
+
+ // If we want service immediately, we start a repeating timer to reduce the overhead of starting
+ if (!timeToNextService) {
+ if (!m_animationTimer.isActive() || !m_animationTimer.repeatInterval())
+ m_animationTimer.startRepeating(cAnimationTimerDelay);
+ return;
+ }
+
+ // If we don't need service, we want to make sure the timer is no longer running
+ if (timeToNextService < 0) {
+ if (m_animationTimer.isActive())
+ m_animationTimer.stop();
+ return;
+ }
+
+ // Otherwise, we want to start a one-shot timer so we get here again
+ m_animationTimer.startOneShot(timeToNextService);
+}
+
+void CSSAnimationControllerPrivate::updateStyleIfNeededDispatcherFired()
+{
+ fireEventsAndUpdateStyle();
+}
+
+void CSSAnimationControllerPrivate::fireEventsAndUpdateStyle()
+{
+ // Protect the frame from getting destroyed in the event handler
+ Ref<Frame> protector(m_frame);
+
+ bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_elementChangesToDispatch.isEmpty();
+
+ // fire all the events
+ Vector<EventToDispatch> eventsToDispatch = WTFMove(m_eventsToDispatch);
+ for (auto& event : eventsToDispatch) {
+ Element& element = event.element;
+ if (event.eventType == eventNames().transitionendEvent)
+ element.dispatchEvent(TransitionEvent::create(event.eventType, event.name, event.elapsedTime, PseudoElement::pseudoElementNameForEvents(element.pseudoId())));
+ else
+ element.dispatchEvent(AnimationEvent::create(event.eventType, event.name, event.elapsedTime));
+ }
+
+ for (auto& change : m_elementChangesToDispatch)
+ change->invalidateStyleAndLayerComposition();
+
+ m_elementChangesToDispatch.clear();
+
+ if (updateStyle)
+ m_frame.document()->updateStyleIfNeeded();
+}
+
+void CSSAnimationControllerPrivate::startUpdateStyleIfNeededDispatcher()
+{
+ if (!m_updateStyleIfNeededDispatcher.isActive())
+ m_updateStyleIfNeededDispatcher.startOneShot(0);
+}
+
+void CSSAnimationControllerPrivate::addEventToDispatch(Element& element, const AtomicString& eventType, const String& name, double elapsedTime)
+{
+ m_eventsToDispatch.append({ element, eventType, name, elapsedTime });
+ startUpdateStyleIfNeededDispatcher();
+}
+
+void CSSAnimationControllerPrivate::addElementChangeToDispatch(Element& element)
+{
+ m_elementChangesToDispatch.append(element);
+ ASSERT(m_elementChangesToDispatch.last()->document().pageCacheState() == Document::NotInPageCache);
+ startUpdateStyleIfNeededDispatcher();
+}
+
+void CSSAnimationControllerPrivate::animationFrameCallbackFired()
+{
+ double timeToNextService = updateAnimations(CallSetChanged);
+
+ if (timeToNextService >= 0)
+ m_frame.document()->view()->scheduleAnimation();
+}
+
+void CSSAnimationControllerPrivate::animationTimerFired()
+{
+ // We need to keep the frame alive, since it owns us.
+ Ref<Frame> protector(m_frame);
+
+ // Make sure animationUpdateTime is updated, so that it is current even if no
+ // styleChange has happened (e.g. accelerated animations)
+ AnimationPrivateUpdateBlock updateBlock(*this);
+
+ // When the timer fires, all we do is call setChanged on all DOM nodes with running animations and then do an immediate
+ // updateStyleIfNeeded. It will then call back to us with new information.
+ updateAnimationTimer(CallSetChanged);
+
+ // Fire events right away, to avoid a flash of unanimated style after an animation completes, and before
+ // the 'end' event fires.
+ fireEventsAndUpdateStyle();
+}
+
+bool CSSAnimationControllerPrivate::isRunningAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
+{
+ ASSERT(renderer.isCSSAnimating());
+ ASSERT(m_compositeAnimations.contains(&renderer));
+ const CompositeAnimation& animation = *m_compositeAnimations.get(&renderer);
+ return animation.isAnimatingProperty(property, false, runningState);
+}
+
+bool CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
+{
+ ASSERT(renderer.isCSSAnimating());
+ ASSERT(m_compositeAnimations.contains(&renderer));
+ const CompositeAnimation& animation = *m_compositeAnimations.get(&renderer);
+ return animation.isAnimatingProperty(property, true, runningState);
+}
+
+void CSSAnimationControllerPrivate::suspendAnimations()
+{
+ if (isSuspended())
+ return;
+
+ suspendAnimationsForDocument(m_frame.document());
+
+ // Traverse subframes
+ for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
+ child->animation().suspendAnimations();
+
+ m_isSuspended = true;
+}
+
+void CSSAnimationControllerPrivate::resumeAnimations()
+{
+ if (!isSuspended())
+ return;
+
+ resumeAnimationsForDocument(m_frame.document());
+
+ // Traverse subframes
+ for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
+ child->animation().resumeAnimations();
+
+ m_isSuspended = false;
+}
+
+bool CSSAnimationControllerPrivate::animationsAreSuspendedForDocument(Document* document)
+{
+ return isSuspended() || m_suspendedDocuments.contains(document);
+}
+
+void CSSAnimationControllerPrivate::detachFromDocument(Document* document)
+{
+ m_suspendedDocuments.remove(document);
+}
+
+void CSSAnimationControllerPrivate::suspendAnimationsForDocument(Document* document)
+{
+ if (animationsAreSuspendedForDocument(document))
+ return;
+
+ m_suspendedDocuments.add(document);
+
+ AnimationPrivateUpdateBlock updateBlock(*this);
+
+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ animation.value->suspendAnimations();
+ }
+
+ updateAnimationTimer();
+}
+
+void CSSAnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
+{
+ if (!animationsAreSuspendedForDocument(document))
+ return;
+
+ detachFromDocument(document);
+
+ AnimationPrivateUpdateBlock updateBlock(*this);
+
+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ animation.value->resumeAnimations();
+ }
+
+ updateAnimationTimer();
+}
+
+void CSSAnimationControllerPrivate::startAnimationsIfNotSuspended(Document* document)
+{
+ if (!animationsAreSuspendedForDocument(document) || allowsNewAnimationsWhileSuspended())
+ resumeAnimationsForDocument(document);
+}
+
+void CSSAnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended(bool allowed)
+{
+ m_allowsNewAnimationsWhileSuspended = allowed;
+}
+
+bool CSSAnimationControllerPrivate::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t)
+{
+ if (!renderer)
+ return false;
+
+ CompositeAnimation& compositeAnimation = ensureCompositeAnimation(*renderer);
+ if (compositeAnimation.pauseAnimationAtTime(name, t)) {
+ renderer->element()->invalidateStyleAndLayerComposition();
+ startUpdateStyleIfNeededDispatcher();
+ return true;
+ }
+
+ return false;
+}
+
+bool CSSAnimationControllerPrivate::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t)
+{
+ if (!renderer)
+ return false;
+
+ CompositeAnimation& compositeAnimation = ensureCompositeAnimation(*renderer);
+ if (compositeAnimation.pauseTransitionAtTime(cssPropertyID(property), t)) {
+ renderer->element()->invalidateStyleAndLayerComposition();
+ startUpdateStyleIfNeededDispatcher();
+ return true;
+ }
+
+ return false;
+}
+
+double CSSAnimationControllerPrivate::beginAnimationUpdateTime()
+{
+ ASSERT(m_beginAnimationUpdateCount);
+ if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
+ m_beginAnimationUpdateTime = monotonicallyIncreasingTime();
+
+ return m_beginAnimationUpdateTime;
+}
+
+void CSSAnimationControllerPrivate::beginAnimationUpdate()
+{
+ if (!m_beginAnimationUpdateCount)
+ setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
+ ++m_beginAnimationUpdateCount;
+}
+
+void CSSAnimationControllerPrivate::endAnimationUpdate()
+{
+ ASSERT(m_beginAnimationUpdateCount > 0);
+ if (m_beginAnimationUpdateCount == 1) {
+ styleAvailable();
+ if (!m_waitingForAsyncStartNotification)
+ startTimeResponse(beginAnimationUpdateTime());
+ }
+ --m_beginAnimationUpdateCount;
+}
+
+void CSSAnimationControllerPrivate::receivedStartTimeResponse(double time)
+{
+ LOG(Animations, "CSSAnimationControllerPrivate %p receivedStartTimeResponse %f", this, time);
+
+ m_waitingForAsyncStartNotification = false;
+ startTimeResponse(time);
+}
+
+std::unique_ptr<RenderStyle> CSSAnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer)
+{
+ AnimationPrivateUpdateBlock animationUpdateBlock(*this);
+
+ ASSERT(renderer.isCSSAnimating());
+ ASSERT(m_compositeAnimations.contains(&renderer));
+ const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
+ std::unique_ptr<RenderStyle> animatingStyle = rendererAnimations.getAnimatedStyle();
+ if (!animatingStyle)
+ animatingStyle = RenderStyle::clonePtr(renderer.style());
+
+ return animatingStyle;
+}
+
+bool CSSAnimationControllerPrivate::computeExtentOfAnimation(RenderElement& renderer, LayoutRect& bounds) const
+{
+ ASSERT(renderer.isCSSAnimating());
+ ASSERT(m_compositeAnimations.contains(&renderer));
+
+ const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
+ if (!rendererAnimations.isAnimatingProperty(CSSPropertyTransform, false, AnimationBase::Running | AnimationBase::Paused))
+ return true;
+
+ return rendererAnimations.computeExtentOfTransformAnimation(bounds);
+}
+
+unsigned CSSAnimationControllerPrivate::numberOfActiveAnimations(Document* document) const
+{
+ unsigned count = 0;
+
+ for (auto& animation : m_compositeAnimations) {
+ if (&animation.key->document() == document)
+ count += animation.value->numberOfActiveAnimations();
+ }
+
+ return count;
+}
+
+void CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle(AnimationBase* animation)
+{
+ // Make sure this animation is not in the start time waiters
+ m_animationsWaitingForStartTimeResponse.remove(animation);
+
+ m_animationsWaitingForStyle.add(animation);
+}
+
+void CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle(AnimationBase* animationToRemove)
+{
+ m_animationsWaitingForStyle.remove(animationToRemove);
+}
+
+void CSSAnimationControllerPrivate::styleAvailable()
+{
+ // Go through list of waiters and send them on their way
+ for (const auto& waitingAnimation : m_animationsWaitingForStyle)
+ waitingAnimation->styleAvailable();
+
+ m_animationsWaitingForStyle.clear();
+}
+
+void CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse(AnimationBase* animation, bool willGetResponse)
+{
+ // If willGetResponse is true, it means this animation is actually waiting for a response
+ // (which will come in as a call to notifyAnimationStarted()).
+ // In that case we don't need to add it to this list. We just set a waitingForAResponse flag
+ // which says we are waiting for the response. If willGetResponse is false, this animation
+ // is not waiting for a response for itself, but rather for a notifyXXXStarted() call for
+ // another animation to which it will sync.
+ //
+ // When endAnimationUpdate() is called we check to see if the waitingForAResponse flag is
+ // true. If so, we just return and will do our work when the first notifyXXXStarted() call
+ // comes in. If it is false, we will not be getting a notifyXXXStarted() call, so we will
+ // do our work right away. In both cases we call the onAnimationStartResponse() method
+ // on each animation. In the first case we send in the time we got from notifyXXXStarted().
+ // In the second case, we just pass in the beginAnimationUpdateTime().
+ //
+ // This will synchronize all software and accelerated animations started in the same
+ // updateStyleIfNeeded cycle.
+ //
+
+ if (willGetResponse)
+ m_waitingForAsyncStartNotification = true;
+
+ m_animationsWaitingForStartTimeResponse.add(animation);
+}
+
+void CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse(AnimationBase* animationToRemove)
+{
+ m_animationsWaitingForStartTimeResponse.remove(animationToRemove);
+
+ if (m_animationsWaitingForStartTimeResponse.isEmpty())
+ m_waitingForAsyncStartNotification = false;
+}
+
+void CSSAnimationControllerPrivate::startTimeResponse(double time)
+{
+ // Go through list of waiters and send them on their way
+
+ for (const auto& animation : m_animationsWaitingForStartTimeResponse)
+ animation->onAnimationStartResponse(time);
+
+ m_animationsWaitingForStartTimeResponse.clear();
+ m_waitingForAsyncStartNotification = false;
+}
+
+void CSSAnimationControllerPrivate::animationWillBeRemoved(AnimationBase* animation)
+{
+ LOG(Animations, "CSSAnimationControllerPrivate %p animationWillBeRemoved: %p", this, animation);
+
+ removeFromAnimationsWaitingForStyle(animation);
+ removeFromAnimationsWaitingForStartTimeResponse(animation);
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ removeFromAnimationsDependentOnScroll(animation);
+#endif
+
+ bool anyAnimationsWaitingForAsyncStart = false;
+ for (auto& animation : m_animationsWaitingForStartTimeResponse) {
+ if (animation->waitingForStartTime() && animation->isAccelerated()) {
+ anyAnimationsWaitingForAsyncStart = true;
+ break;
+ }
+ }
+
+ if (!anyAnimationsWaitingForAsyncStart)
+ m_waitingForAsyncStartNotification = false;
+}
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+void CSSAnimationControllerPrivate::addToAnimationsDependentOnScroll(AnimationBase* animation)
+{
+ m_animationsDependentOnScroll.add(animation);
+}
+
+void CSSAnimationControllerPrivate::removeFromAnimationsDependentOnScroll(AnimationBase* animation)
+{
+ m_animationsDependentOnScroll.remove(animation);
+}
+
+void CSSAnimationControllerPrivate::scrollWasUpdated()
+{
+ auto* view = m_frame.view();
+ if (!view || !wantsScrollUpdates())
+ return;
+
+ m_scrollPosition = view->scrollPositionForFixedPosition().y().toFloat();
+
+ // FIXME: This is updating all the animations, rather than just the ones
+ // that are dependent on scroll. We to go from our AnimationBase to its CompositeAnimation
+ // so we can execute code similar to updateAnimations.
+ // https://bugs.webkit.org/show_bug.cgi?id=144170
+ updateAnimations(CallSetChanged);
+}
+#endif
+
+CSSAnimationController::CSSAnimationController(Frame& frame)
+ : m_data(std::make_unique<CSSAnimationControllerPrivate>(frame))
+{
+}
+
+CSSAnimationController::~CSSAnimationController()
+{
+}
+
+void CSSAnimationController::cancelAnimations(RenderElement& renderer)
+{
+ if (!renderer.isCSSAnimating())
+ return;
+
+ if (!m_data->clear(renderer))
+ return;
+
+ Element* element = renderer.element();
+ if (!element || element->document().renderTreeBeingDestroyed())
+ return;
+ ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
+ element->invalidateStyleAndLayerComposition();
+}
+
+bool CSSAnimationController::updateAnimations(RenderElement& renderer, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle)
+{
+ auto* oldStyle = renderer.hasInitializedStyle() ? &renderer.style() : nullptr;
+ if ((!oldStyle || (!oldStyle->animations() && !oldStyle->transitions())) && (!newStyle.animations() && !newStyle.transitions()))
+ return false;
+
+ if (renderer.document().pageCacheState() != Document::NotInPageCache)
+ return false;
+
+ // Don't run transitions when printing.
+ if (renderer.view().printing())
+ return false;
+
+ // Fetch our current set of implicit animations from a hashtable. We then compare them
+ // against the animations in the style and make sure we're in sync. If destination values
+ // have changed, we reset the animation. We then do a blend to get new values and we return
+ // a new style.
+
+ // We don't support anonymous pseudo elements like :first-line or :first-letter.
+ ASSERT(renderer.element());
+
+ CompositeAnimation& rendererAnimations = m_data->ensureCompositeAnimation(renderer);
+ bool animationStateChanged = rendererAnimations.animate(renderer, oldStyle, newStyle, animatedStyle);
+
+ if (renderer.parent() || newStyle.animations() || (oldStyle && oldStyle->animations())) {
+ m_data->updateAnimationTimerForRenderer(renderer);
+ renderer.view().frameView().scheduleAnimation();
+ }
+
+ return animationStateChanged;
+}
+
+std::unique_ptr<RenderStyle> CSSAnimationController::getAnimatedStyleForRenderer(RenderElement& renderer)
+{
+ if (!renderer.isCSSAnimating())
+ return RenderStyle::clonePtr(renderer.style());
+ return m_data->getAnimatedStyleForRenderer(renderer);
+}
+
+bool CSSAnimationController::computeExtentOfAnimation(RenderElement& renderer, LayoutRect& bounds) const
+{
+ if (!renderer.isCSSAnimating())
+ return true;
+
+ return m_data->computeExtentOfAnimation(renderer, bounds);
+}
+
+void CSSAnimationController::notifyAnimationStarted(RenderElement& renderer, double startTime)
+{
+ LOG(Animations, "CSSAnimationController %p notifyAnimationStarted on renderer %p, time=%f", this, &renderer, startTime);
+ UNUSED_PARAM(renderer);
+
+ AnimationUpdateBlock animationUpdateBlock(this);
+ m_data->receivedStartTimeResponse(startTime);
+}
+
+bool CSSAnimationController::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t)
+{
+ AnimationUpdateBlock animationUpdateBlock(this);
+ return m_data->pauseAnimationAtTime(renderer, name, t);
+}
+
+unsigned CSSAnimationController::numberOfActiveAnimations(Document* document) const
+{
+ return m_data->numberOfActiveAnimations(document);
+}
+
+bool CSSAnimationController::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t)
+{
+ AnimationUpdateBlock animationUpdateBlock(this);
+ return m_data->pauseTransitionAtTime(renderer, property, t);
+}
+
+bool CSSAnimationController::isRunningAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
+{
+ return renderer.isCSSAnimating() && m_data->isRunningAnimationOnRenderer(renderer, property, runningState);
+}
+
+bool CSSAnimationController::isRunningAcceleratedAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
+{
+ return renderer.isCSSAnimating() && m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, runningState);
+}
+
+bool CSSAnimationController::isSuspended() const
+{
+ return m_data->isSuspended();
+}
+
+void CSSAnimationController::suspendAnimations()
+{
+ LOG(Animations, "controller is suspending animations");
+ m_data->suspendAnimations();
+}
+
+void CSSAnimationController::resumeAnimations()
+{
+ LOG(Animations, "controller is resuming animations");
+ m_data->resumeAnimations();
+}
+
+bool CSSAnimationController::allowsNewAnimationsWhileSuspended() const
+{
+ return m_data->allowsNewAnimationsWhileSuspended();
+}
+
+void CSSAnimationController::setAllowsNewAnimationsWhileSuspended(bool allowed)
+{
+ m_data->setAllowsNewAnimationsWhileSuspended(allowed);
+}
+
+void CSSAnimationController::serviceAnimations()
+{
+ m_data->animationFrameCallbackFired();
+}
+
+bool CSSAnimationController::animationsAreSuspendedForDocument(Document* document)
+{
+ return m_data->animationsAreSuspendedForDocument(document);
+}
+
+void CSSAnimationController::detachFromDocument(Document* document)
+{
+ return m_data->detachFromDocument(document);
+}
+
+void CSSAnimationController::suspendAnimationsForDocument(Document* document)
+{
+ LOG(Animations, "suspending animations for document %p", document);
+ m_data->suspendAnimationsForDocument(document);
+}
+
+void CSSAnimationController::resumeAnimationsForDocument(Document* document)
+{
+ LOG(Animations, "resuming animations for document %p", document);
+ AnimationUpdateBlock animationUpdateBlock(this);
+ m_data->resumeAnimationsForDocument(document);
+}
+
+void CSSAnimationController::startAnimationsIfNotSuspended(Document* document)
+{
+ LOG(Animations, "animations may start for document %p", document);
+
+ AnimationUpdateBlock animationUpdateBlock(this);
+ m_data->startAnimationsIfNotSuspended(document);
+}
+
+void CSSAnimationController::beginAnimationUpdate()
+{
+ m_data->beginAnimationUpdate();
+}
+
+void CSSAnimationController::endAnimationUpdate()
+{
+ m_data->endAnimationUpdate();
+}
+
+bool CSSAnimationController::supportsAcceleratedAnimationOfProperty(CSSPropertyID property)
+{
+ return CSSPropertyAnimation::animationOfPropertyIsAccelerated(property);
+}
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+bool CSSAnimationController::wantsScrollUpdates() const
+{
+ return m_data->wantsScrollUpdates();
+}
+
+void CSSAnimationController::scrollWasUpdated()
+{
+ m_data->scrollWasUpdated();
+}
+#endif
+
+bool CSSAnimationController::hasAnimations() const
+{
+ return m_data->hasAnimations();
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSAnimationControllerhfromrev211740trunkSourceWebCorepageanimationAnimationControllerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/animation/CSSAnimationController.h (from rev 211740, trunk/Source/WebCore/page/animation/AnimationController.h) (0 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSAnimationController.h         (rev 0)
+++ trunk/Source/WebCore/page/animation/CSSAnimationController.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AnimationBase.h"
+#include "CSSPropertyNames.h"
+#include <wtf/Forward.h>
+
+namespace WebCore {
+
+class CSSAnimationControllerPrivate;
+class Document;
+class Element;
+class Frame;
+class LayoutRect;
+class RenderElement;
+class RenderStyle;
+
+class CSSAnimationController {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ explicit CSSAnimationController(Frame&);
+ ~CSSAnimationController();
+
+ void cancelAnimations(RenderElement&);
+ bool updateAnimations(RenderElement&, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle);
+ std::unique_ptr<RenderStyle> getAnimatedStyleForRenderer(RenderElement&);
+
+ // If possible, compute the visual extent of any transform animation on the given renderer
+ // using the given rect, returning the result in the rect. Return false if there is some
+ // transform animation but we were unable to cheaply compute its affect on the extent.
+ bool computeExtentOfAnimation(RenderElement&, LayoutRect&) const;
+
+ // This is called when an accelerated animation or transition has actually started to animate.
+ void notifyAnimationStarted(RenderElement&, double startTime);
+
+ WEBCORE_EXPORT bool pauseAnimationAtTime(RenderElement*, const AtomicString& name, double t); // To be used only for testing
+ WEBCORE_EXPORT bool pauseTransitionAtTime(RenderElement*, const String& property, double t); // To be used only for testing
+ WEBCORE_EXPORT unsigned numberOfActiveAnimations(Document*) const; // To be used only for testing
+
+ bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
+ bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
+
+ WEBCORE_EXPORT bool isSuspended() const;
+ WEBCORE_EXPORT void suspendAnimations();
+ WEBCORE_EXPORT void resumeAnimations();
+ void serviceAnimations();
+
+ WEBCORE_EXPORT void suspendAnimationsForDocument(Document*);
+ WEBCORE_EXPORT void resumeAnimationsForDocument(Document*);
+ WEBCORE_EXPORT bool animationsAreSuspendedForDocument(Document*);
+ void detachFromDocument(Document*);
+ void startAnimationsIfNotSuspended(Document*);
+
+ void beginAnimationUpdate();
+ void endAnimationUpdate();
+
+ WEBCORE_EXPORT bool allowsNewAnimationsWhileSuspended() const;
+ WEBCORE_EXPORT void setAllowsNewAnimationsWhileSuspended(bool);
+
+ static bool supportsAcceleratedAnimationOfProperty(CSSPropertyID);
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ bool wantsScrollUpdates() const;
+ void scrollWasUpdated();
+#endif
+
+ bool hasAnimations() const;
+
+private:
+ const std::unique_ptr<CSSAnimationControllerPrivate> m_data;
+};
+
+class AnimationUpdateBlock {
+public:
+ AnimationUpdateBlock(CSSAnimationController* animationController)
+ : m_animationController(animationController)
+ {
+ if (m_animationController)
+ m_animationController->beginAnimationUpdate();
+ }
+
+ ~AnimationUpdateBlock()
+ {
+ if (m_animationController)
+ m_animationController->endAnimationUpdate();
+ }
+
+ CSSAnimationController* m_animationController;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSAnimationControllerPrivatehfromrev211740trunkSourceWebCorepageanimationAnimationControllerPrivateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/animation/CSSAnimationControllerPrivate.h (from rev 211740, trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h) (0 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSAnimationControllerPrivate.h         (rev 0)
+++ trunk/Source/WebCore/page/animation/CSSAnimationControllerPrivate.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -0,0 +1,160 @@
</span><ins>+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "AnimationBase.h"
+#include "Timer.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class CompositeAnimation;
+class Document;
+class Frame;
+
+enum SetChanged { DoNotCallSetChanged, CallSetChanged };
+
+class CSSAnimationControllerPrivate {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ explicit CSSAnimationControllerPrivate(Frame&);
+ ~CSSAnimationControllerPrivate();
+
+ // Returns the time until the next animation needs to be serviced, or -1 if there are none.
+ double updateAnimations(SetChanged callSetChanged = DoNotCallSetChanged);
+ void updateAnimationTimer(SetChanged callSetChanged = DoNotCallSetChanged);
+
+ CompositeAnimation& ensureCompositeAnimation(RenderElement&);
+ bool clear(RenderElement&);
+
+ void updateStyleIfNeededDispatcherFired();
+ void startUpdateStyleIfNeededDispatcher();
+ void addEventToDispatch(Element&, const AtomicString& eventType, const String& name, double elapsedTime);
+ void addElementChangeToDispatch(Element&);
+
+ bool hasAnimations() const { return !m_compositeAnimations.isEmpty(); }
+
+ bool isSuspended() const { return m_isSuspended; }
+ void suspendAnimations();
+ void resumeAnimations();
+ void animationFrameCallbackFired();
+
+ void suspendAnimationsForDocument(Document*);
+ void resumeAnimationsForDocument(Document*);
+ bool animationsAreSuspendedForDocument(Document*);
+ void startAnimationsIfNotSuspended(Document*);
+ void detachFromDocument(Document*);
+
+ bool isRunningAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
+ bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID, AnimationBase::RunningState) const;
+
+ bool pauseAnimationAtTime(RenderElement*, const AtomicString& name, double t);
+ bool pauseTransitionAtTime(RenderElement*, const String& property, double t);
+ unsigned numberOfActiveAnimations(Document*) const;
+
+ std::unique_ptr<RenderStyle> getAnimatedStyleForRenderer(RenderElement&);
+
+ bool computeExtentOfAnimation(RenderElement&, LayoutRect&) const;
+
+ double beginAnimationUpdateTime();
+ void setBeginAnimationUpdateTime(double t) { m_beginAnimationUpdateTime = t; }
+
+ void beginAnimationUpdate();
+ void endAnimationUpdate();
+ void receivedStartTimeResponse(double);
+
+ void addToAnimationsWaitingForStyle(AnimationBase*);
+ void removeFromAnimationsWaitingForStyle(AnimationBase*);
+
+ void addToAnimationsWaitingForStartTimeResponse(AnimationBase*, bool willGetResponse);
+ void removeFromAnimationsWaitingForStartTimeResponse(AnimationBase*);
+
+ void animationWillBeRemoved(AnimationBase*);
+
+ void updateAnimationTimerForRenderer(RenderElement&);
+
+ bool allowsNewAnimationsWhileSuspended() const { return m_allowsNewAnimationsWhileSuspended; }
+ void setAllowsNewAnimationsWhileSuspended(bool);
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ bool wantsScrollUpdates() const { return !m_animationsDependentOnScroll.isEmpty(); }
+ void addToAnimationsDependentOnScroll(AnimationBase*);
+ void removeFromAnimationsDependentOnScroll(AnimationBase*);
+
+ void scrollWasUpdated();
+ float scrollPosition() const { return m_scrollPosition; }
+#endif
+
+private:
+ void animationTimerFired();
+
+ void styleAvailable();
+ void fireEventsAndUpdateStyle();
+ void startTimeResponse(double t);
+
+ HashMap<RenderElement*, RefPtr<CompositeAnimation>> m_compositeAnimations;
+ Timer m_animationTimer;
+ Timer m_updateStyleIfNeededDispatcher;
+ Frame& m_frame;
+
+ struct EventToDispatch {
+ Ref<Element> element;
+ AtomicString eventType;
+ String name;
+ double elapsedTime;
+ };
+ Vector<EventToDispatch> m_eventsToDispatch;
+ Vector<Ref<Element>> m_elementChangesToDispatch;
+ HashSet<Document*> m_suspendedDocuments;
+
+ double m_beginAnimationUpdateTime;
+
+ using AnimationsSet = HashSet<RefPtr<AnimationBase>>;
+ AnimationsSet m_animationsWaitingForStyle;
+ AnimationsSet m_animationsWaitingForStartTimeResponse;
+
+ int m_beginAnimationUpdateCount;
+
+ bool m_waitingForAsyncStartNotification;
+ bool m_isSuspended;
+
+ // Used to flag whether we should revert to previous buggy
+ // behavior of allowing new transitions and animations to
+ // run even when this object is suspended.
+ bool m_allowsNewAnimationsWhileSuspended;
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+ AnimationsSet m_animationsDependentOnScroll;
+ float m_scrollPosition { 0 };
+#endif
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1290,7 +1290,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static CSSPropertyAnimationWrapperMap& singleton()
</span><span class="cx"> {
</span><del>- // FIXME: This data is never destroyed. Maybe we should ref count it and toss it when the last AnimationController is destroyed?
</del><ins>+ // FIXME: This data is never destroyed. Maybe we should ref count it and toss it when the last CSSAnimationController is destroyed?
</ins><span class="cx"> static NeverDestroyed<CSSPropertyAnimationWrapperMap> map;
</span><span class="cx"> return map;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCompositeAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CompositeAnimation.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "CompositeAnimation.h"
</span><span class="cx">
</span><del>-#include "AnimationControllerPrivate.h"
</del><ins>+#include "CSSAnimationControllerPrivate.h"
</ins><span class="cx"> #include "CSSPropertyAnimation.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "ImplicitAnimation.h"
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-CompositeAnimation::CompositeAnimation(AnimationControllerPrivate& animationController)
</del><ins>+CompositeAnimation::CompositeAnimation(CSSAnimationControllerPrivate& animationController)
</ins><span class="cx"> : m_animationController(animationController)
</span><span class="cx"> {
</span><span class="cx"> m_suspended = m_animationController.isSuspended() && !m_animationController.allowsNewAnimationsWhileSuspended();
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCompositeAnimationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CompositeAnimation.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -36,8 +36,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class AnimationControllerPrivate;
-class AnimationController;
</del><ins>+class CSSAnimationControllerPrivate;
+class CSSAnimationController;
</ins><span class="cx"> class RenderElement;
</span><span class="cx"> class RenderStyle;
</span><span class="cx">
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> class CompositeAnimation : public RefCounted<CompositeAnimation> {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- static Ref<CompositeAnimation> create(AnimationControllerPrivate& animationController)
</del><ins>+ static Ref<CompositeAnimation> create(CSSAnimationControllerPrivate& animationController)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new CompositeAnimation(animationController));
</span><span class="cx"> };
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> double timeToNextService() const;
</span><span class="cx">
</span><del>- AnimationControllerPrivate& animationController() const { return m_animationController; }
</del><ins>+ CSSAnimationControllerPrivate& animationController() const { return m_animationController; }
</ins><span class="cx">
</span><span class="cx"> void suspendAnimations();
</span><span class="cx"> void resumeAnimations();
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CompositeAnimation(AnimationControllerPrivate&);
</del><ins>+ CompositeAnimation(CSSAnimationControllerPrivate&);
</ins><span class="cx">
</span><span class="cx"> void updateTransitions(RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle);
</span><span class="cx"> void updateKeyframeAnimations(RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle);
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> typedef HashMap<int, RefPtr<ImplicitAnimation>> CSSPropertyTransitionsMap;
</span><span class="cx"> typedef HashMap<AtomicStringImpl*, RefPtr<KeyframeAnimation>> AnimationNameMap;
</span><span class="cx">
</span><del>- AnimationControllerPrivate& m_animationController;
</del><ins>+ CSSAnimationControllerPrivate& m_animationController;
</ins><span class="cx"> CSSPropertyTransitionsMap m_transitions;
</span><span class="cx"> AnimationNameMap m_keyframeAnimations;
</span><span class="cx"> Vector<AtomicStringImpl*> m_keyframeAnimationOrderMap;
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationImplicitAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -27,13 +27,13 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><ins>+#include "ImplicitAnimation.h"
</ins><span class="cx">
</span><del>-#include "AnimationControllerPrivate.h"
</del><ins>+#include "CSSAnimationControllerPrivate.h"
</ins><span class="cx"> #include "CSSPropertyAnimation.h"
</span><span class="cx"> #include "CompositeAnimation.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="cx"> #include "GeometryUtilities.h"
</span><del>-#include "ImplicitAnimation.h"
</del><span class="cx"> #include "KeyframeAnimation.h"
</span><span class="cx"> #include "RenderBox.h"
</span><span class="cx"> #include "StylePendingResources.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationKeyframeAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "KeyframeAnimation.h"
</span><span class="cx">
</span><del>-#include "AnimationControllerPrivate.h"
</del><ins>+#include "CSSAnimationControllerPrivate.h"
</ins><span class="cx"> #include "CSSPropertyAnimation.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "CompositeAnimation.h"
</span></span></pre></div>
<a id="trunkSourceWebCorepageiosFrameIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ios/FrameIOS.mm (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ios/FrameIOS.mm        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/page/ios/FrameIOS.mm        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><del>-#import "AnimationController.h"
</del><ins>+#import "CSSAnimationController.h"
</ins><span class="cx"> #import "CommonVM.h"
</span><span class="cx"> #import "DOMWindow.h"
</span><span class="cx"> #import "Document.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -441,7 +441,7 @@
</span><span class="cx"> static String animationNameForTransition(AnimatedPropertyID);
</span><span class="cx">
</span><span class="cx"> // Return true if the animation is handled by the compositing system. If this returns
</span><del>- // false, the animation will be run by AnimationController.
</del><ins>+ // false, the animation will be run by CSSAnimationController.
</ins><span class="cx"> // These methods handle both transitions and keyframe animations.
</span><span class="cx"> virtual bool addAnimation(const KeyframeValueList&, const FloatSize& /*boxSize*/, const Animation*, const String& /*animationName*/, double /*timeOffset*/) { return false; }
</span><span class="cx"> virtual void pauseAnimation(const String& /*animationName*/, double /*timeOffset*/) { }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderElement.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "LengthFunctions.h"
</span><span class="cx"> #include "RenderObject.h"
</span><span class="cx"> #include "StyleInheritedData.h"
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderLayer.h"
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "BoxShape.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "Chrome.h"
</span><span class="cx"> #include "DebugPageOverlays.h"
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "RenderLayerBacking.h"
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CanvasRenderingContext.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "CachedImage.h"
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><span class="cx">
</span><del>-#include "AnimationController.h"
</del><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CanvasRenderingContext.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include "Chrome.h"
</span><span class="lines">@@ -2548,7 +2548,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> const AnimationBase::RunningState activeAnimationState = AnimationBase::Running | AnimationBase::Paused;
</span><del>- AnimationController& animController = renderer.animation();
</del><ins>+ CSSAnimationController& animController = renderer.animation();
</ins><span class="cx"> return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity, activeAnimationState)
</span><span class="cx"> && (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
</span><span class="cx"> || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyFilter, activeAnimationState)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #include "RenderObject.h"
</span><span class="cx">
</span><span class="cx"> #include "AXObjectCache.h"
</span><del>-#include "AnimationController.h"
</del><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "FloatQuad.h"
</span><span class="cx"> #include "FlowThreadController.h"
</span><span class="cx"> #include "FrameSelection.h"
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class AffineTransform;
</span><del>-class AnimationController;
</del><ins>+class CSSAnimationController;
</ins><span class="cx"> class Color;
</span><span class="cx"> class Cursor;
</span><span class="cx"> class Document;
</span><span class="lines">@@ -771,7 +771,7 @@
</span><span class="cx">
</span><span class="cx"> void removeFromParent();
</span><span class="cx">
</span><del>- AnimationController& animation() const;
</del><ins>+ CSSAnimationController& animation() const;
</ins><span class="cx">
</span><span class="cx"> // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use
</span><span class="cx"> // localToAbsolute/absoluteToLocal methods instead.
</span><span class="lines">@@ -1016,7 +1016,7 @@
</span><span class="cx"> return *frame().page();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline AnimationController& RenderObject::animation() const
</del><ins>+inline CSSAnimationController& RenderObject::animation() const
</ins><span class="cx"> {
</span><span class="cx"> return frame().animation();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebCore/testing/Internals.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx">
</span><span class="cx"> #include "AXObjectCache.h"
</span><span class="cx"> #include "ActiveDOMCallbackMicrotask.h"
</span><del>-#include "AnimationController.h"
</del><span class="cx"> #include "ApplicationCacheStorage.h"
</span><span class="cx"> #include "Autofill.h"
</span><span class="cx"> #include "BackForwardController.h"
</span><span class="cx"> #include "BitmapImage.h"
</span><ins>+#include "CSSAnimationController.h"
</ins><span class="cx"> #include "CSSKeyframesRule.h"
</span><span class="cx"> #include "CSSMediaRule.h"
</span><span class="cx"> #include "CSSStyleRule.h"
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ Rename AnimationController to CSSAnimationController
+ https://bugs.webkit.org/show_bug.cgi?id=167829
+
+ Reviewed by Simon Fraser.
+
+ * WebView/WebFrame.mm:
+ * WebView/WebView.mm:
+
</ins><span class="cx"> 2017-02-03 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Dismiss HTML form validation popover when pressing Escape key
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> #import <JavaScriptCore/JSContextInternal.h>
</span><span class="cx"> #import <WebCore/AXObjectCache.h>
</span><span class="cx"> #import <WebCore/AccessibilityObject.h>
</span><del>-#import <WebCore/AnimationController.h>
</del><ins>+#import <WebCore/CSSAnimationController.h>
</ins><span class="cx"> #import <WebCore/CSSStyleDeclaration.h>
</span><span class="cx"> #import <WebCore/CachedResourceLoader.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -121,10 +121,10 @@
</span><span class="cx"> #import <JavaScriptCore/Exception.h>
</span><span class="cx"> #import <JavaScriptCore/JSValueRef.h>
</span><span class="cx"> #import <WebCore/AlternativeTextUIController.h>
</span><del>-#import <WebCore/AnimationController.h>
</del><span class="cx"> #import <WebCore/ApplicationCacheStorage.h>
</span><span class="cx"> #import <WebCore/BackForwardController.h>
</span><span class="cx"> #import <WebCore/CFNetworkSPI.h>
</span><ins>+#import <WebCore/CSSAnimationController.h>
</ins><span class="cx"> #import <WebCore/Chrome.h>
</span><span class="cx"> #import <WebCore/ColorMac.h>
</span><span class="cx"> #import <WebCore/DatabaseManager.h>
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebKit/win/ChangeLog        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2017-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ Rename AnimationController to CSSAnimationController
+ https://bugs.webkit.org/show_bug.cgi?id=167829
+
+ Reviewed by Simon Fraser.
+
+ * WebFrame.cpp:
+
</ins><span class="cx"> 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
</span><span class="cx">
</span><span class="cx"> Drag images should be anchored to the mouse location
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebFrame.cpp (211740 => 211741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebFrame.cpp        2017-02-06 19:16:07 UTC (rev 211740)
+++ trunk/Source/WebKit/win/WebFrame.cpp        2017-02-06 19:21:45 UTC (rev 211741)
</span><span class="lines">@@ -52,9 +52,9 @@
</span><span class="cx"> #include "WebScriptWorld.h"
</span><span class="cx"> #include "WebURLResponse.h"
</span><span class="cx"> #include "WebView.h"
</span><del>-#include <WebCore/AnimationController.h>
</del><span class="cx"> #include <WebCore/BString.h>
</span><span class="cx"> #include <WebCore/COMPtr.h>
</span><ins>+#include <WebCore/CSSAnimationController.h>
</ins><span class="cx"> #include <WebCore/MemoryCache.h>
</span><span class="cx"> #include <WebCore/Document.h>
</span><span class="cx"> #include <WebCore/DocumentLoader.h>
</span></span></pre>
</div>
</div>
</body>
</html>