Diff
Modified: trunk/Source/WebCore/ChangeLog (154400 => 154401)
--- trunk/Source/WebCore/ChangeLog 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/ChangeLog 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1,3 +1,13 @@
+2013-08-21 Andreas Kling <[email protected]>
+
+ <https://webkit.org/b/120118> Frame::animation() should return a reference.
+
+ Reviewed by Anders Carlsson.
+
+ Frame::m_animationController is never null.
+ Also changed RenderObject::animation() to return a reference since it's just a wrapper
+ around RenderObject::frame()->animation() with no null checking of frame().
+
2013-08-21 Simon Fraser <[email protected]>
Allow opacity to apply to custom scrollbars
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (154400 => 154401)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1667,8 +1667,8 @@
RenderObject* renderer = styledNode->renderer();
if (renderer && renderer->isComposited() && AnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) {
- AnimationUpdateBlock animationUpdateBlock(renderer->animation());
- RefPtr<RenderStyle> style = renderer->animation()->getAnimatedStyleForRenderer(renderer);
+ AnimationUpdateBlock animationUpdateBlock(&renderer->animation());
+ RefPtr<RenderStyle> style = renderer->animation().getAnimatedStyleForRenderer(renderer);
if (pseudoElementSpecifier && !styledNode->isPseudoElement()) {
// FIXME: This cached pseudo style will only exist if the animation has been run at least once.
return style->getCachedPseudoStyle(pseudoElementSpecifier);
Modified: trunk/Source/WebCore/dom/Document.cpp (154400 => 154401)
--- trunk/Source/WebCore/dom/Document.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1828,7 +1828,7 @@
if ((!m_pendingStyleRecalcShouldForce && !childNeedsStyleRecalc()) || inPageCache())
return;
- AnimationUpdateBlock animationUpdateBlock(m_frame ? m_frame->animation() : 0);
+ AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : 0);
recalcStyle(Style::NoChange);
}
@@ -2352,7 +2352,7 @@
Frame* f = frame();
if (f) {
f->loader().icon()->startLoader();
- f->animation()->startAnimationsIfNotSuspended(this);
+ f->animation().startAnimationsIfNotSuspended(this);
}
ImageLoader::dispatchPendingBeforeLoadEvents();
@@ -3158,7 +3158,7 @@
// This recalcStyle initiates a new recalc cycle. We need to bracket it to
// make sure animations get the correct update time
{
- AnimationUpdateBlock animationUpdateBlock(m_frame ? m_frame->animation() : 0);
+ AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : 0);
recalcStyle(Style::Force);
}
Modified: trunk/Source/WebCore/history/CachedFrame.cpp (154400 => 154401)
--- trunk/Source/WebCore/history/CachedFrame.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/history/CachedFrame.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -109,7 +109,7 @@
m_document->accessSVGExtensions()->unpauseAnimations();
#endif
- frame.animation()->resumeAnimationsForDocument(m_document.get());
+ frame.animation().resumeAnimationsForDocument(m_document.get());
frame.eventHandler().setMousePressNode(m_mousePressNode.get());
m_document->resumeActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
m_document->resumeScriptedAnimationControllerCallbacks();
Modified: trunk/Source/WebCore/page/Frame.cpp (154400 => 154401)
--- trunk/Source/WebCore/page/Frame.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/page/Frame.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -630,7 +630,7 @@
{
if (view) {
view->unscheduleRelayout();
- view->frame().animation()->suspendAnimationsForDocument(document);
+ view->frame().animation().suspendAnimationsForDocument(document);
view->frame().eventHandler().stopAutoscrollTimer();
}
}
@@ -961,7 +961,7 @@
// FIXME: Suspend/resume calls will not match if the frame is navigated, and gets a new document.
if (document()) {
document()->suspendScriptedAnimationControllerCallbacks();
- animation()->suspendAnimationsForDocument(document());
+ animation().suspendAnimationsForDocument(document());
document()->suspendActiveDOMObjects(ActiveDOMObject::PageWillBeSuspended);
}
}
@@ -977,7 +977,7 @@
if (document()) {
document()->resumeActiveDOMObjects(ActiveDOMObject::PageWillBeSuspended);
- animation()->resumeAnimationsForDocument(document());
+ animation().resumeAnimationsForDocument(document());
document()->resumeScriptedAnimationControllerCallbacks();
}
Modified: trunk/Source/WebCore/page/Frame.h (154400 => 154401)
--- trunk/Source/WebCore/page/Frame.h 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/page/Frame.h 2013-08-21 18:49:52 UTC (rev 154401)
@@ -120,7 +120,7 @@
NavigationScheduler* navigationScheduler() const;
FrameSelection& selection() const;
FrameTree* tree() const;
- AnimationController* animation() const;
+ AnimationController& animation() const;
ScriptController& script();
RenderView* contentRenderer() const; // Root of the render tree for the document contained in this frame.
@@ -219,11 +219,11 @@
RefPtr<FrameView> m_view;
RefPtr<Document> m_doc;
- OwnPtr<ScriptController> m_script;
+ const OwnPtr<ScriptController> m_script;
const OwnPtr<Editor> m_editor;
- OwnPtr<FrameSelection> m_selection;
+ const OwnPtr<FrameSelection> m_selection;
const OwnPtr<EventHandler> m_eventHandler;
- OwnPtr<AnimationController> m_animationController;
+ const OwnPtr<AnimationController> m_animationController;
float m_pageZoomFactor;
float m_textZoomFactor;
@@ -296,9 +296,9 @@
return *m_editor;
}
- inline AnimationController* Frame::animation() const
+ inline AnimationController& Frame::animation() const
{
- return m_animationController.get();
+ return *m_animationController;
}
inline HTMLFrameOwnerElement* Frame::ownerElement() const
Modified: trunk/Source/WebCore/page/FrameView.cpp (154400 => 154401)
--- trunk/Source/WebCore/page/FrameView.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/page/FrameView.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -2508,7 +2508,7 @@
{
for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext()) {
frame->view()->serviceScrollAnimations();
- frame->animation()->serviceAnimations();
+ frame->animation().serviceAnimations();
}
Vector<RefPtr<Document> > documents;
Modified: trunk/Source/WebCore/page/Page.cpp (154400 => 154401)
--- trunk/Source/WebCore/page/Page.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/page/Page.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1290,11 +1290,11 @@
if (m_pageThrottler->shouldThrottleTimers())
throttleTimers();
if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
- mainFrame()->animation()->suspendAnimations();
+ mainFrame()->animation().suspendAnimations();
} else {
unthrottleTimers();
if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
- mainFrame()->animation()->resumeAnimations();
+ mainFrame()->animation().resumeAnimations();
}
#if !ENABLE(PAGE_VISIBILITY_API)
UNUSED_PARAM(isInitialState);
@@ -1555,9 +1555,9 @@
{
if (m_visibilityState == WebCore::PageVisibilityStateHidden) {
if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
- mainFrame()->animation()->suspendAnimations();
+ mainFrame()->animation().suspendAnimations();
else
- mainFrame()->animation()->resumeAnimations();
+ mainFrame()->animation().resumeAnimations();
}
}
#endif
Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (154400 => 154401)
--- trunk/Source/WebCore/page/animation/AnimationController.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -270,7 +270,7 @@
// Traverse subframes
for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
- child->animation()->suspendAnimations();
+ child->animation().suspendAnimations();
m_isSuspended = true;
}
@@ -284,7 +284,7 @@
// Traverse subframes
for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
- child->animation()->resumeAnimations();
+ child->animation().resumeAnimations();
m_isSuspended = false;
}
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (154400 => 154401)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -894,7 +894,7 @@
#if USE(ACCELERATED_COMPOSITING)
if (renderer()->style()->isRunningAcceleratedAnimation()) {
TransformationMatrix currTransform;
- RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleForRenderer(renderer());
+ RefPtr<RenderStyle> style = renderer()->animation().getAnimatedStyleForRenderer(renderer());
style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxRect().size(), applyOrigin);
makeMatrixRenderable(currTransform, canRender3DTransforms());
return currTransform;
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (154400 => 154401)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -608,11 +608,11 @@
// Set transform property, if it is not animating. We have to do this here because the transform
// is affected by the layer dimensions.
- if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitTransform))
+ if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitTransform))
updateTransform(renderer()->style());
// Set opacity, if it is not animating.
- if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
+ if (!renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
updateOpacity(renderer()->style());
#if ENABLE(CSS_FILTERS)
@@ -2243,7 +2243,7 @@
void RenderLayerBacking::notifyAnimationStarted(const GraphicsLayer*, double time)
{
- renderer()->animation()->notifyAnimationStarted(renderer(), time);
+ renderer()->animation().notifyAnimationStarted(renderer(), time);
}
void RenderLayerBacking::notifyFlushRequired(const GraphicsLayer* layer)
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (154400 => 154401)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -382,7 +382,7 @@
return;
}
- AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame().animation());
+ AnimationUpdateBlock animationUpdateBlock(&m_renderView->frameView()->frame().animation());
ASSERT(!m_flushingLayers);
m_flushingLayers = true;
@@ -521,7 +521,7 @@
if (!m_reevaluateCompositingAfterLayout && !m_compositing)
return;
- AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame().animation());
+ AnimationUpdateBlock animationUpdateBlock(&m_renderView->frameView()->frame().animation());
TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true);
@@ -2180,18 +2180,16 @@
if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
return false;
- if (AnimationController* animController = renderer->animation()) {
- return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity)
- && (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
+ AnimationController& animController = renderer->animation();
+ return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity)
+ && (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
#if ENABLE(CSS_FILTERS)
#if !PLATFORM(MAC) || (!PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
// <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
- || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitFilter)
+ || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitFilter)
#endif // !PLATFORM(MAC) || (!PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
#endif // CSS_FILTERS
- || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
- }
- return false;
+ || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
}
bool RenderLayerCompositor::requiresCompositingForIndirectReason(RenderObject* renderer, bool hasCompositedDescendants, bool has3DTransformedDescendants, RenderLayer::IndirectCompositingReason& reason) const
@@ -2341,10 +2339,7 @@
if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
return false;
- if (AnimationController* animController = renderer->animation())
- return animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
-
- return false;
+ return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
}
// If an element has negative z-index children, those children render in front of the
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (154400 => 154401)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1728,7 +1728,7 @@
void RenderObject::setAnimatableStyle(PassRefPtr<RenderStyle> style)
{
if (!isText() && style)
- setStyle(animation()->updateAnimations(this, style.get()));
+ setStyle(animation().updateAnimations(this, style.get()));
else
setStyle(style);
}
@@ -2460,7 +2460,7 @@
if (frame() && frame()->eventHandler().autoscrollRenderer() == this)
frame()->eventHandler().stopAutoscrollTimer(true);
- animation()->cancelAnimations(this);
+ animation().cancelAnimations(this);
// For accessibility management, notify the parent of the imminent change to its child set.
// We do it now, before remove(), while the parent pointer is still available.
@@ -3062,7 +3062,7 @@
rect.inflate(outlineSize);
}
-AnimationController* RenderObject::animation() const
+AnimationController& RenderObject::animation() const
{
return frame()->animation();
}
Modified: trunk/Source/WebCore/rendering/RenderObject.h (154400 => 154401)
--- trunk/Source/WebCore/rendering/RenderObject.h 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2013-08-21 18:49:52 UTC (rev 154401)
@@ -954,7 +954,7 @@
void remove() { if (parent()) parent()->removeChild(this); }
- AnimationController* animation() const;
+ AnimationController& animation() const;
bool visibleToHitTesting() const { return style()->visibility() == VISIBLE && style()->pointerEvents() != PE_NONE; }
Modified: trunk/Source/WebCore/testing/Internals.cpp (154400 => 154401)
--- trunk/Source/WebCore/testing/Internals.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebCore/testing/Internals.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -403,10 +403,7 @@
unsigned Internals::numberOfActiveAnimations() const
{
- Frame* contextFrame = frame();
- if (AnimationController* controller = contextFrame->animation())
- return controller->numberOfActiveAnimations(contextFrame->document());
- return 0;
+ return frame()->animation().numberOfActiveAnimations(frame()->document());
}
bool Internals::animationsAreSuspended(Document* document, ExceptionCode& ec) const
@@ -416,11 +413,7 @@
return false;
}
- AnimationController* controller = document->frame()->animation();
- if (!controller)
- return false;
-
- return controller->isSuspended();
+ return document->frame()->animation().isSuspended();
}
void Internals::suspendAnimations(Document* document, ExceptionCode& ec) const
@@ -430,11 +423,7 @@
return;
}
- AnimationController* controller = document->frame()->animation();
- if (!controller)
- return;
-
- controller->suspendAnimations();
+ document->frame()->animation().suspendAnimations();
}
void Internals::resumeAnimations(Document* document, ExceptionCode& ec) const
@@ -444,11 +433,7 @@
return;
}
- AnimationController* controller = document->frame()->animation();
- if (!controller)
- return;
-
- controller->resumeAnimations();
+ document->frame()->animation().resumeAnimations();
}
bool Internals::pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element* element, ExceptionCode& ec)
@@ -457,8 +442,7 @@
ec = INVALID_ACCESS_ERR;
return false;
}
- AnimationController* controller = frame()->animation();
- return controller->pauseAnimationAtTime(element->renderer(), AtomicString(animationName), pauseTime);
+ return frame()->animation().pauseAnimationAtTime(element->renderer(), AtomicString(animationName), pauseTime);
}
bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
@@ -479,7 +463,7 @@
return false;
}
- return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(), AtomicString(animationName), pauseTime);
+ return frame()->animation().pauseAnimationAtTime(pseudoElement->renderer(), AtomicString(animationName), pauseTime);
}
bool Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element* element, ExceptionCode& ec)
@@ -488,8 +472,7 @@
ec = INVALID_ACCESS_ERR;
return false;
}
- AnimationController* controller = frame()->animation();
- return controller->pauseTransitionAtTime(element->renderer(), propertyName, pauseTime);
+ return frame()->animation().pauseTransitionAtTime(element->renderer(), propertyName, pauseTime);
}
bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
@@ -510,7 +493,7 @@
return false;
}
- return frame()->animation()->pauseTransitionAtTime(pseudoElement->renderer(), property, pauseTime);
+ return frame()->animation().pauseTransitionAtTime(pseudoElement->renderer(), property, pauseTime);
}
bool Internals::attached(Node* node, ExceptionCode& ec)
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (154400 => 154401)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -3134,12 +3134,12 @@
if (visible != m_visible) {
if (visible) {
if (m_mainFrame)
- m_mainFrame->animation()->resumeAnimations();
+ m_mainFrame->animation().resumeAnimations();
if (m_page->scriptedAnimationsSuspended())
m_page->resumeScriptedAnimations();
} else {
if (m_mainFrame)
- m_mainFrame->animation()->suspendAnimations();
+ m_mainFrame->animation().suspendAnimations();
if (!m_page->scriptedAnimationsSuspended())
m_page->suspendScriptedAnimations();
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (154400 => 154401)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2013-08-21 18:49:52 UTC (rev 154401)
@@ -2779,7 +2779,7 @@
{
Frame* frame = core([self mainFrame]);
if (frame)
- return frame->animation()->allowsNewAnimationsWhileSuspended();
+ return frame->animation().allowsNewAnimationsWhileSuspended();
return false;
}
@@ -2788,7 +2788,7 @@
{
Frame* frame = core([self mainFrame]);
if (frame)
- frame->animation()->setAllowsNewAnimationsWhileSuspended(allowed);
+ frame->animation().setAllowsNewAnimationsWhileSuspended(allowed);
}
- (BOOL)cssAnimationsSuspended
@@ -2796,7 +2796,7 @@
// should ask the page!
Frame* frame = core([self mainFrame]);
if (frame)
- return frame->animation()->isSuspended();
+ return frame->animation().isSuspended();
return false;
}
@@ -2804,13 +2804,13 @@
- (void)setCSSAnimationsSuspended:(BOOL)suspended
{
Frame* frame = core([self mainFrame]);
- if (suspended == frame->animation()->isSuspended())
+ if (suspended == frame->animation().isSuspended())
return;
if (suspended)
- frame->animation()->suspendAnimations();
+ frame->animation().suspendAnimations();
else
- frame->animation()->resumeAnimations();
+ frame->animation().resumeAnimations();
}
+ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
Modified: trunk/Source/WebKit/win/WebFrame.cpp (154400 => 154401)
--- trunk/Source/WebKit/win/WebFrame.cpp 2013-08-21 18:04:42 UTC (rev 154400)
+++ trunk/Source/WebKit/win/WebFrame.cpp 2013-08-21 18:49:52 UTC (rev 154401)
@@ -1193,7 +1193,7 @@
if (!frame)
return E_FAIL;
- frame->animation()->resumeAnimations();
+ frame->animation().resumeAnimations();
return S_OK;
}
@@ -1203,7 +1203,7 @@
if (!frame)
return E_FAIL;
- frame->animation()->suspendAnimations();
+ frame->animation().suspendAnimations();
return S_OK;
}
@@ -1218,15 +1218,11 @@
if (!frame)
return E_FAIL;
- AnimationController* controller = frame->animation();
- if (!controller)
- return E_FAIL;
-
COMPtr<DOMNode> domNode(Query, node);
if (!domNode)
return E_FAIL;
- *animationWasRunning = controller->pauseAnimationAtTime(domNode->node()->renderer(), String(animationName, SysStringLen(animationName)), secondsFromNow);
+ *animationWasRunning = frame->animation().pauseAnimationAtTime(domNode->node()->renderer(), String(animationName, SysStringLen(animationName)), secondsFromNow);
return S_OK;
}
@@ -1241,15 +1237,11 @@
if (!frame)
return E_FAIL;
- AnimationController* controller = frame->animation();
- if (!controller)
- return E_FAIL;
-
COMPtr<DOMNode> domNode(Query, node);
if (!domNode)
return E_FAIL;
- *transitionWasRunning = controller->pauseTransitionAtTime(domNode->node()->renderer(), String(propertyName, SysStringLen(propertyName)), secondsFromNow);
+ *transitionWasRunning = frame->animation().pauseTransitionAtTime(domNode->node()->renderer(), String(propertyName, SysStringLen(propertyName)), secondsFromNow);
return S_OK;
}
@@ -1282,11 +1274,7 @@
if (!frame)
return E_FAIL;
- AnimationController* controller = frame->animation();
- if (!controller)
- return E_FAIL;
-
- *number = controller->numberOfActiveAnimations(frame->document());
+ *number = frame->animation().numberOfActiveAnimations(frame->document());
return S_OK;
}