WebKit Bugzilla
Attachment 357117 Details for
Bug 192604
: [Web Animations] CSSAnimationController should be created lazily
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192604-20181212145451.patch (text/plain), 46.46 KB, created by
Antoine Quint
on 2018-12-12 05:54:53 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-12-12 05:54:53 PST
Size:
46.46 KB
patch
obsolete
>Subversion Revision: 239098 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 74894db0f9c523424b12a709793683ce67610b4c..e1dd04a8e6ee3d0c918c442f870eaa411ee5e0ef 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,79 @@ >+2018-12-11 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] CSSAnimationController should be created lazily >+ https://bugs.webkit.org/show_bug.cgi?id=192604 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Frame used to expose an animation() method that returned a reference as it created its CSSAnimationController at creation time. >+ We add a new Frame::existingAnimationController() method which returns a pointer and Frame::animationController() which creates >+ a RefPtr<CSSAnimationController> lazily. We then replace the vast majority of calls to Frame::animation() to Frame::existingAnimationController(). >+ This matches the pattern used in the Web Animations codepath to access the DocumentTimeline. >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::computeRenderStyleForProperty): >+ * dom/Document.cpp: >+ (WebCore::Document::resolveStyle): >+ (WebCore::Document::didBecomeCurrentDocumentInFrame): >+ (WebCore::Document::prepareForDestruction): >+ (WebCore::Document::implicitClose): >+ (WebCore::Document::resume): >+ * dom/Element.cpp: >+ (WebCore::Element::removedFromAncestor): >+ * dom/PseudoElement.cpp: >+ (WebCore::PseudoElement::clearHostElement): >+ * history/CachedFrame.cpp: >+ (WebCore::CachedFrame::destroy): >+ * page/Frame.cpp: >+ (WebCore::Frame::Frame): >+ (WebCore::Frame::clearTimers): >+ (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): >+ (WebCore::Frame::animationController): >+ * page/Frame.h: >+ * page/FrameView.cpp: >+ (WebCore::FrameView::didDestroyRenderTree): >+ (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): >+ * page/FrameViewLayoutContext.cpp: >+ (WebCore::FrameViewLayoutContext::layout): >+ * page/Page.cpp: >+ (WebCore::Page::handleLowModePowerChange): >+ (WebCore::Page::setIsVisibleInternal): >+ (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): >+ * page/animation/CSSAnimationController.cpp: >+ (WebCore::CSSAnimationControllerPrivate::updateThrottlingState): >+ (WebCore::CSSAnimationControllerPrivate::suspendAnimations): >+ (WebCore::CSSAnimationControllerPrivate::resumeAnimations): >+ (WebCore::CSSAnimationController::create): >+ * page/animation/CSSAnimationController.h: >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::currentTransform const): >+ (WebCore::RenderLayer::calculateClipRects const): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateGeometry): >+ (WebCore::RenderLayerBacking::notifyAnimationStarted): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges): >+ (WebCore::RenderLayerCompositor::updateCompositingLayers): >+ (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const): >+ (WebCore::RenderLayerCompositor::isRunningTransformAnimation const): >+ * rendering/RenderObject.h: >+ (WebCore::RenderObject::animationController const): >+ (WebCore::RenderObject::animation const): Deleted. >+ * rendering/updating/RenderTreeUpdater.cpp: >+ (WebCore::RenderTreeUpdater::tearDownRenderers): >+ * style/StyleTreeResolver.cpp: >+ (WebCore::Style::TreeResolver::createAnimatedElementUpdate): >+ * testing/Internals.cpp: >+ (WebCore::Internals::numberOfActiveAnimations const): >+ (WebCore::Internals::animationsAreSuspended const): >+ (WebCore::Internals::animationsInterval const): >+ (WebCore::Internals::suspendAnimations const): >+ (WebCore::Internals::resumeAnimations const): >+ (WebCore::Internals::pauseAnimationAtTimeOnElement): >+ (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): >+ (WebCore::Internals::pauseTransitionAtTimeOnElement): >+ (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): >+ > 2018-12-11 Justin Michaud <justin_michaud@apple.com> > > Implement feature flag for CSS Typed OM >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 3b69319019d2fd0142742b929966746289530179..df8c9669b23fda33d399a92d6d44693d8cad531b 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-11 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] CSSAnimationController should be created lazily >+ https://bugs.webkit.org/show_bug.cgi?id=192604 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Frame::animation() was renamed to Frame::existingAnimationController() and returns a pointer. >+ >+ * WebView/WebView.mm: >+ (-[WebView allowsNewCSSAnimationsWhileSuspended]): >+ (-[WebView setAllowsNewCSSAnimationsWhileSuspended:]): >+ (-[WebView cssAnimationsSuspended]): >+ (-[WebView setCSSAnimationsSuspended:]): >+ > 2018-12-11 Justin Michaud <justin_michaud@apple.com> > > Implement feature flag for CSS Typed OM >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index ee6523c3ad49680f3b45794db94d86c03051ef15..582d04a4ab05da9d4874a659c47a713cab5975ed 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,19 @@ >+2018-12-11 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] CSSAnimationController should be created lazily >+ https://bugs.webkit.org/show_bug.cgi?id=192604 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Frame::animation() was renamed to Frame::existingAnimationController() and returns a pointer. >+ >+ * WebFrame.cpp: >+ (WebFrame::resumeAnimations): >+ (WebFrame::suspendAnimations): >+ (WebFrame::pauseAnimation): >+ (WebFrame::pauseTransition): >+ (WebFrame::numberOfActiveAnimations): >+ > 2018-12-11 Fujii Hironori <Hironori.Fujii@sony.com> > > [Win][Clang] Fix warning -Wmissing-field-initializers >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 36f0394ba7a96b5f7eac88c672c7c8931d14a35b..4e61dc88a629e49fabeee5abb248daa4d7e364c1 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -2484,8 +2484,10 @@ static inline const RenderStyle* computeRenderStyleForProperty(Element& element, > if (renderer && renderer->isComposited() && CSSAnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) { > if (auto timeline = element.document().existingTimeline()) > ownedStyle = timeline->animatedStyleForRenderer(*renderer); >+ else if (auto* animationController = renderer->animationController()) >+ ownedStyle = animationController->animatedStyleForRenderer(*renderer); > else >- ownedStyle = renderer->animation().animatedStyleForRenderer(*renderer); >+ ownedStyle = RenderStyle::clonePtr(renderer->style()); > if (pseudoElementSpecifier != PseudoId::None && !element.isPseudoElement()) { > // FIXME: This cached pseudo style will only exist if the animation has been run at least once. > return ownedStyle->getCachedPseudoStyle(pseudoElementSpecifier); >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 226bff2a8a285883785c245023121c685dac7bc3..82523322893f133c1bb90ccef13ace45a1d05ec9 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -1858,7 +1858,7 @@ void Document::resolveStyle(ResolveStyleType type) > TraceScope tracingScope(StyleRecalcStart, StyleRecalcEnd); > > RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView()); >- AnimationUpdateBlock animationUpdateBlock(&m_frame->animation()); >+ AnimationUpdateBlock animationUpdateBlock(m_frame->existingAnimationController()); > > // FIXME: Do this update per tree scope. > { >@@ -2356,16 +2356,16 @@ void Document::didBecomeCurrentDocumentInFrame() > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { > if (auto* timeline = existingTimeline()) > timeline->suspendAnimations(); >- } else >- m_frame->animation().suspendAnimationsForDocument(this); >+ } else if (auto* animationController = m_frame->existingAnimationController()) >+ animationController->suspendAnimationsForDocument(this); > suspendScheduledTasks(ReasonForSuspension::PageWillBeSuspended); > } else { > resumeScheduledTasks(ReasonForSuspension::PageWillBeSuspended); > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { > if (auto* timeline = existingTimeline()) > timeline->resumeAnimations(); >- } else >- m_frame->animation().resumeAnimationsForDocument(this); >+ } else if (auto* animationController = m_frame->existingAnimationController()) >+ animationController->resumeAnimationsForDocument(this); > } > } > >@@ -2457,8 +2457,10 @@ void Document::prepareForDestruction() > if (m_hasPreparedForDestruction) > return; > >- if (m_frame) >- m_frame->animation().detachFromDocument(this); >+ if (m_frame) { >+ if (auto* animationController = m_frame->existingAnimationController()) >+ animationController->detachFromDocument(this); >+ } > > #if USE(LIBWEBRTC) > // FIXME: This should be moved to Modules/mediastream. >@@ -2965,7 +2967,8 @@ void Document::implicitClose() > if (auto* documentLoader = loader()) > documentLoader->startIconLoading(); > >- f->animation().startAnimationsIfNotSuspended(this); >+ if (auto* animationController = f->existingAnimationController()) >+ animationController->startAnimationsIfNotSuspended(this); > > // FIXME: We shouldn't be dispatching pending events globally on all Documents here. > // For now, only do this when there is a Frame, otherwise this could cause JS reentrancy >@@ -5181,8 +5184,8 @@ void Document::resume(ReasonForSuspension reason) > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { > if (auto* timeline = existingTimeline()) > timeline->resumeAnimations(); >- } else >- m_frame->animation().resumeAnimationsForDocument(this); >+ } else if (auto* animationController = m_frame->existingAnimationController()) >+ animationController->resumeAnimationsForDocument(this); > > resumeScheduledTasks(reason); > >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 93be7bb2cac6c590b55008b9845f8faa3e4c1e45..d054182cc88a0ed4917325154d77c2d92e9106f4 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -1965,8 +1965,10 @@ void Element::removedFromAncestor(RemovalType removalType, ContainerNode& oldPar > RefPtr<Frame> frame = document().frame(); > if (auto* timeline = document().existingTimeline()) > timeline->elementWasRemoved(*this); >- if (frame) >- frame->animation().cancelAnimations(*this); >+ if (frame) { >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->cancelAnimations(*this); >+ } > > #if PLATFORM(MAC) > if (frame && frame->page()) >diff --git a/Source/WebCore/dom/PseudoElement.cpp b/Source/WebCore/dom/PseudoElement.cpp >index 1519778c3955bb146bca1f731534e612daab44b6..49e597455325a5f04b4c70b144f72ca79cf61c41 100644 >--- a/Source/WebCore/dom/PseudoElement.cpp >+++ b/Source/WebCore/dom/PseudoElement.cpp >@@ -92,8 +92,10 @@ void PseudoElement::clearHostElement() > > if (auto* timeline = document().existingTimeline()) > timeline->removeAnimationsForElement(*this); >- if (auto* frame = document().frame()) >- frame->animation().cancelAnimations(*this); >+ if (auto* frame = document().frame()) { >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->cancelAnimations(*this); >+ } > > m_hostElement = nullptr; > } >diff --git a/Source/WebCore/history/CachedFrame.cpp b/Source/WebCore/history/CachedFrame.cpp >index e9c66073027121b2a197f8988a1835fabd488c9f..834e94dba71ac4c00a6e1a523b9406c03ecb3009 100644 >--- a/Source/WebCore/history/CachedFrame.cpp >+++ b/Source/WebCore/history/CachedFrame.cpp >@@ -257,7 +257,8 @@ void CachedFrame::destroy() > > Frame::clearTimers(m_view.get(), m_document.get()); > >- m_view->frame().animation().detachFromDocument(m_document.get()); >+ if (auto* animationController = m_view->frame().existingAnimationController()) >+ animationController->detachFromDocument(m_document.get()); > > // FIXME: Why do we need to call removeAllEventListeners here? When the document is in page cache, this method won't work > // fully anyway, because the document won't be able to access its DOMWindow object (due to being frameless). >diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp >index 8d2c3ef583b2799a3fd1c69ec82e971ad9fe4e19..92fdd2fecabf48a6ef3f73c1ef4794201fb216b4 100644 >--- a/Source/WebCore/page/Frame.cpp >+++ b/Source/WebCore/page/Frame.cpp >@@ -155,7 +155,6 @@ Frame::Frame(Page& page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient& > , m_script(makeUniqueRef<ScriptController>(*this)) > , m_editor(makeUniqueRef<Editor>(*this)) > , m_selection(makeUniqueRef<FrameSelection>(this)) >- , m_animationController(makeUniqueRef<CSSAnimationController>(*this)) > #if PLATFORM(IOS_FAMILY) > , m_overflowAutoScrollTimer(*this, &Frame::overflowAutoScrollTimerFired) > , m_selectionChangeCallbacksDisabled(false) >@@ -777,8 +776,8 @@ void Frame::clearTimers(FrameView *view, Document *document) > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { > if (auto* timeline = document->existingTimeline()) > timeline->suspendAnimations(); >- } else >- view->frame().animation().suspendAnimationsForDocument(document); >+ } else if (auto* animationController = view->frame().existingAnimationController()) >+ animationController->suspendAnimationsForDocument(document); > view->frame().eventHandler().stopAutoscrollTimer(); > } > } >@@ -1067,7 +1066,8 @@ void Frame::resumeActiveDOMObjectsAndAnimations() > m_doc->resumeScheduledTasks(ReasonForSuspension::PageWillBeSuspended); > > // Frame::clearTimers() suspended animations and pending relayouts. >- animation().resumeAnimationsForDocument(m_doc.get()); >+ if (m_animationController) >+ m_animationController->resumeAnimationsForDocument(m_doc.get()); > if (m_view) > m_view->layoutContext().scheduleLayout(); > } >@@ -1132,4 +1132,12 @@ void Frame::selfOnlyDeref() > deref(); > } > >+CSSAnimationController& Frame::animationController() >+{ >+ if (!m_animationController) >+ m_animationController = CSSAnimationController::create(*this); >+ >+ return *m_animationController; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h >index 9faf2437f5721e96a2582127e2eae2643db9b71e..6c526e718c7657355f1bf74c6993569282c9b8c0 100644 >--- a/Source/WebCore/page/Frame.h >+++ b/Source/WebCore/page/Frame.h >@@ -162,8 +162,8 @@ public: > FrameSelection& selection() { return m_selection; } > const FrameSelection& selection() const { return m_selection; } > FrameTree& tree() const; >- CSSAnimationController& animation() { return m_animationController; } >- const CSSAnimationController& animation() const { return m_animationController; } >+ WEBCORE_EXPORT CSSAnimationController& animationController(); >+ CSSAnimationController* existingAnimationController() const { return m_animationController.get(); } > ScriptController& script() { return m_script; } > const ScriptController& script() const { return m_script; } > >@@ -316,7 +316,7 @@ private: > UniqueRef<ScriptController> m_script; > UniqueRef<Editor> m_editor; > UniqueRef<FrameSelection> m_selection; >- UniqueRef<CSSAnimationController> m_animationController; >+ RefPtr<CSSAnimationController> m_animationController; > > #if ENABLE(DATA_DETECTION) > RetainPtr<NSArray> m_dataDetectionResults; >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index edd1ceb2144d055e52e42ea2f3bd628dc5d1f83d..ab6d8d1a199fb4e4ad74113f6ca453a90c68877c 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -623,7 +623,8 @@ void FrameView::didDestroyRenderTree() > ASSERT(!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()); > ASSERT(!m_slowRepaintObjects || m_slowRepaintObjects->isEmpty()); > >- ASSERT(!frame().animation().hasAnimations()); >+ if (auto* animationController = frame().existingAnimationController()) >+ ASSERT(!animationController->hasAnimations()); > } > > void FrameView::setContentsSize(const IntSize& size) >@@ -4337,7 +4338,7 @@ void FrameView::updateLayoutAndStyleIfNeededRecursive() > // Style updates can trigger script, which can cause this FrameView to be destroyed. > Ref<FrameView> protectedThis(*this); > >- AnimationUpdateBlock animationUpdateBlock(&frame().animation()); >+ AnimationUpdateBlock animationUpdateBlock(frame().existingAnimationController()); > > using DescendantsDeque = Deque<Ref<FrameView>, 16>; > auto nextRenderedDescendant = [this] (DescendantsDeque& descendantsDeque) -> RefPtr<FrameView> { >diff --git a/Source/WebCore/page/FrameViewLayoutContext.cpp b/Source/WebCore/page/FrameViewLayoutContext.cpp >index 42ef64b119dcc070c6af3350d4316de1491956b2..e7e05d991e4b917dac688b2bbd50a12caad8bc47 100644 >--- a/Source/WebCore/page/FrameViewLayoutContext.cpp >+++ b/Source/WebCore/page/FrameViewLayoutContext.cpp >@@ -163,7 +163,7 @@ void FrameViewLayoutContext::layout() > LayoutScope layoutScope(*this); > TraceScope tracingScope(LayoutStart, LayoutEnd); > InspectorInstrumentationCookie inspectorLayoutScope(InspectorInstrumentation::willLayout(view().frame())); >- AnimationUpdateBlock animationUpdateBlock(&view().frame().animation()); >+ AnimationUpdateBlock animationUpdateBlock(view().frame().existingAnimationController()); > WeakPtr<RenderElement> layoutRoot; > > m_layoutTimer.stop(); >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index e5665b1386623d60b98157ef8c1a05b138eb2f4a..ce4bf4dc1fff197f026d7b01a1af72b4e45b2f7b 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -1328,8 +1328,8 @@ void Page::handleLowModePowerChange(bool isLowPowerModeEnabled) > if (auto timeline = document.existingTimeline()) > timeline->updateThrottlingState(); > }); >- } else >- mainFrame().animation().updateThrottlingState(); >+ } else if (auto* animationController = mainFrame().existingAnimationController()) >+ animationController->updateThrottlingState(); > updateDOMTimerAlignmentInterval(); > } > >@@ -1861,8 +1861,8 @@ void Page::setIsVisibleInternal(bool isVisible) > if (auto* timeline = document.existingTimeline()) > timeline->resumeAnimations(); > }); >- } else >- mainFrame().animation().resumeAnimations(); >+ } else if (auto* animationController = mainFrame().existingAnimationController()) >+ animationController->resumeAnimations(); > } > > setSVGAnimationsState(*this, SVGAnimationsState::Resumed); >@@ -1882,8 +1882,8 @@ void Page::setIsVisibleInternal(bool isVisible) > if (auto* timeline = document.existingTimeline()) > timeline->suspendAnimations(); > }); >- } else >- mainFrame().animation().suspendAnimations(); >+ } else if (auto* animationController = mainFrame().existingAnimationController()) >+ animationController->suspendAnimations(); > } > > setSVGAnimationsState(*this, SVGAnimationsState::Paused); >@@ -2245,11 +2245,11 @@ void Page::hiddenPageCSSAnimationSuspensionStateChanged() > timeline->resumeAnimations(); > } > }); >- } else { >+ } else if (auto* animationController = mainFrame().existingAnimationController()) { > if (m_settings->hiddenPageCSSAnimationSuspensionEnabled()) >- mainFrame().animation().suspendAnimations(); >+ animationController->suspendAnimations(); > else >- mainFrame().animation().resumeAnimations(); >+ animationController->resumeAnimations(); > } > } > } >diff --git a/Source/WebCore/page/animation/CSSAnimationController.cpp b/Source/WebCore/page/animation/CSSAnimationController.cpp >index 5d56afc6682667def2bc57f8029ae5c0a84ffa1b..c642ed0df0df239c13aad7eafc6991c29fd3f17c 100644 >--- a/Source/WebCore/page/animation/CSSAnimationController.cpp >+++ b/Source/WebCore/page/animation/CSSAnimationController.cpp >@@ -313,8 +313,10 @@ void CSSAnimationControllerPrivate::updateThrottlingState() > { > updateAnimationTimer(); > >- for (auto* childFrame = m_frame.tree().firstChild(); childFrame; childFrame = childFrame->tree().nextSibling()) >- childFrame->animation().updateThrottlingState(); >+ for (auto* childFrame = m_frame.tree().firstChild(); childFrame; childFrame = childFrame->tree().nextSibling()) { >+ if (auto* animationController = childFrame->existingAnimationController()) >+ animationController->updateThrottlingState(); >+ } > } > > Seconds CSSAnimationControllerPrivate::animationInterval() const >@@ -333,8 +335,10 @@ void CSSAnimationControllerPrivate::suspendAnimations() > suspendAnimationsForDocument(m_frame.document()); > > // Traverse subframes >- for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) >- child->animation().suspendAnimations(); >+ for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) { >+ if (auto* animationController = child->existingAnimationController()) >+ animationController->suspendAnimations(); >+ } > > m_isSuspended = true; > } >@@ -347,8 +351,10 @@ void CSSAnimationControllerPrivate::resumeAnimations() > resumeAnimationsForDocument(m_frame.document()); > > // Traverse subframes >- for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) >- child->animation().resumeAnimations(); >+ for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) { >+ if (auto* animationController = child->existingAnimationController()) >+ animationController->resumeAnimations(); >+ } > > m_isSuspended = false; > } >@@ -592,6 +598,11 @@ void CSSAnimationControllerPrivate::animationWillBeRemoved(AnimationBase* animat > m_waitingForAsyncStartNotification = false; > } > >+Ref<CSSAnimationController> CSSAnimationController::create(Frame& frame) >+{ >+ return adoptRef(*new CSSAnimationController(frame)); >+} >+ > CSSAnimationController::CSSAnimationController(Frame& frame) > : m_data(std::make_unique<CSSAnimationControllerPrivate>(frame)) > { >diff --git a/Source/WebCore/page/animation/CSSAnimationController.h b/Source/WebCore/page/animation/CSSAnimationController.h >index 5b2e67a91f9f791a61b705b1c166a3dcfc1c2ec9..1b417f497ca619796dabbffafd82274b69a24629 100644 >--- a/Source/WebCore/page/animation/CSSAnimationController.h >+++ b/Source/WebCore/page/animation/CSSAnimationController.h >@@ -32,6 +32,7 @@ > #include "CSSPropertyNames.h" > #include "RenderStyle.h" > #include <wtf/Forward.h> >+#include <wtf/Ref.h> > > namespace WebCore { > >@@ -47,10 +48,10 @@ struct AnimationUpdate { > bool stateChanged { false }; > }; > >-class CSSAnimationController { >+class CSSAnimationController : public RefCounted<CSSAnimationController> { > WTF_MAKE_FAST_ALLOCATED; > public: >- explicit CSSAnimationController(Frame&); >+ static Ref<CSSAnimationController> create(Frame&); > ~CSSAnimationController(); > > void cancelAnimations(Element&); >@@ -97,6 +98,7 @@ public: > bool hasAnimations() const; > > private: >+ explicit CSSAnimationController(Frame&); > const std::unique_ptr<CSSAnimationControllerPrivate> m_data; > }; > >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 80c1bbe74e3b5b04d6553fa7c944bfd0889961fa..1383271c6106c588e4fecc17fb0466d41d4e20b2 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -1204,11 +1204,11 @@ TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr > return currTransform; > } > } >- } else { >- if (renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused)) { >+ } else if (auto* animationController = renderer().animationController()) { >+ if (animationController->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused)) { > TransformationMatrix currTransform; > FloatRect pixelSnappedBorderRect = snapRectToDevicePixels(box->borderBoxRect(), box->document().deviceScaleFactor()); >- std::unique_ptr<RenderStyle> style = renderer().animation().animatedStyleForRenderer(renderer()); >+ std::unique_ptr<RenderStyle> style = animationController->animatedStyleForRenderer(renderer()); > style->applyTransform(currTransform, pixelSnappedBorderRect, applyOrigin); > makeMatrixRenderable(currTransform, canRender3DTransforms()); > return currTransform; >@@ -5769,8 +5769,8 @@ bool RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimati > return true; > } > } >- } else { >- if (renderer().animation().computeExtentOfAnimation(renderer(), animatedBounds)) { >+ } else if (auto* animationController = renderer().animationController()) { >+ if (animationController->computeExtentOfAnimation(renderer(), animatedBounds)) { > bounds = animatedBounds; > return true; > } >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 54984777de9bb673a92f840d66110e866501b4f0..ea095c8ea37006e81dd1877fc6a615cbcee04df8 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -989,9 +989,9 @@ void RenderLayerBacking::updateGeometry() > isRunningAcceleratedTransformAnimation = timeline->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform); > isRunningAcceleratedOpacityAnimation = timeline->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity); > } >- } else { >- isRunningAcceleratedTransformAnimation = renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused); >- isRunningAcceleratedOpacityAnimation = renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity, AnimationBase::Running | AnimationBase::Paused); >+ } else if (auto* animationController = renderer().animationController()) { >+ isRunningAcceleratedTransformAnimation = animationController->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused); >+ isRunningAcceleratedOpacityAnimation = animationController->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity, AnimationBase::Running | AnimationBase::Paused); > } > > // Set transform property, if it is not animating. We have to do this here because the transform >@@ -2924,7 +2924,8 @@ void RenderLayerBacking::transitionFinished(CSSPropertyID property) > > void RenderLayerBacking::notifyAnimationStarted(const GraphicsLayer*, const String&, MonotonicTime time) > { >- renderer().animation().notifyAnimationStarted(renderer(), time); >+ if (auto* animationController = renderer().animationController()) >+ animationController->notifyAnimationStarted(renderer(), time); > } > > void RenderLayerBacking::notifyFlushRequired(const GraphicsLayer* layer) >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 77b0120fbaed32236d03f7e858dcd7819fda505e..4661e732cabd9d60051d99fa9bba157e864ce9d5 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -471,7 +471,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot) > } > > auto& frameView = m_renderView.frameView(); >- AnimationUpdateBlock animationUpdateBlock(&frameView.frame().animation()); >+ AnimationUpdateBlock animationUpdateBlock(frameView.frame().existingAnimationController()); > > ASSERT(!m_flushingLayers); > { >@@ -697,7 +697,7 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update > bool isFullUpdate = true; > ++m_compositingUpdateCount; > >- AnimationUpdateBlock animationUpdateBlock(&m_renderView.frameView().frame().animation()); >+ AnimationUpdateBlock animationUpdateBlock(m_renderView.frameView().frame().existingAnimationController()); > > SetForScope<bool> postLayoutChange(m_inPostLayoutUpdate, true); > >@@ -2442,25 +2442,28 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderLayerModelObje > if (!(m_compositingTriggers & ChromeClient::AnimationTrigger)) > return false; > >- if (auto* element = renderer.element()) { >- if (auto* timeline = element->document().existingTimeline()) { >- if (timeline->runningAnimationsForElementAreAllAccelerated(*element)) >- return true; >+ if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { >+ if (auto* element = renderer.element()) { >+ if (auto* timeline = element->document().existingTimeline()) { >+ if (timeline->runningAnimationsForElementAreAllAccelerated(*element)) >+ return true; >+ } > } >+ return false; > } > >- if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) >+ auto* animationController = renderer.animationController(); >+ if (!animationController) > return false; > > const AnimationBase::RunningState activeAnimationState = AnimationBase::Running | AnimationBase::Paused; >- auto& animController = renderer.animation(); >- return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity, activeAnimationState) >+ return (animationController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity, activeAnimationState) > && (usesCompositing() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger))) >- || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyFilter, activeAnimationState) >+ || animationController->isRunningAnimationOnRenderer(renderer, CSSPropertyFilter, activeAnimationState) > #if ENABLE(FILTERS_LEVEL_2) >- || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitBackdropFilter, activeAnimationState) >+ || animationController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitBackdropFilter, activeAnimationState) > #endif >- || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyTransform, activeAnimationState); >+ || animationController->isRunningAnimationOnRenderer(renderer, CSSPropertyTransform, activeAnimationState); > } > > bool RenderLayerCompositor::requiresCompositingForTransform(RenderLayerModelObject& renderer) const >@@ -2869,7 +2872,11 @@ bool RenderLayerCompositor::isRunningTransformAnimation(RenderLayerModelObject& > } > return false; > } >- return renderer.animation().isRunningAnimationOnRenderer(renderer, CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused); >+ >+ if (auto* animationController = renderer.animationController()) >+ return animationController->isRunningAnimationOnRenderer(renderer, CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused); >+ >+ return false; > } > > // If an element has negative z-index children, those children render in front of the >diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h >index 6745c07485c80cdb7c2bb2f691904c4cf79a01d6..d88307ef839645238b6a75860d2dcd3524c42691 100644 >--- a/Source/WebCore/rendering/RenderObject.h >+++ b/Source/WebCore/rendering/RenderObject.h >@@ -770,7 +770,7 @@ public: > void imageChanged(CachedImage*, const IntRect* = nullptr) override; > virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) { } > >- CSSAnimationController& animation() const; >+ CSSAnimationController* animationController() const; > DocumentTimeline* documentTimeline() const; > > // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use >@@ -1021,9 +1021,9 @@ inline Page& RenderObject::page() const > return *frame().page(); > } > >-inline CSSAnimationController& RenderObject::animation() const >+inline CSSAnimationController* RenderObject::animationController() const > { >- return frame().animation(); >+ return frame().existingAnimationController(); > } > > inline DocumentTimeline* RenderObject::documentTimeline() const >diff --git a/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp b/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >index d3a6f8cb630c7cdf23ccc8e0cf0120195e40b156..0d3e23981833642504fb3cb3febf40073113bbaf 100644 >--- a/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >+++ b/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >@@ -548,7 +548,7 @@ void RenderTreeUpdater::tearDownRenderers(Element& root, TeardownType teardownTy > > auto& document = root.document(); > auto* timeline = document.existingTimeline(); >- auto& animationController = document.frame()->animation(); >+ auto* animationController = document.frame()->existingAnimationController(); > > auto pop = [&] (unsigned depth) { > while (teardownStack.size() > depth) { >@@ -560,8 +560,8 @@ void RenderTreeUpdater::tearDownRenderers(Element& root, TeardownType teardownTy > timeline->elementWasRemoved(element); > else if (teardownType == TeardownType::RendererUpdateCancelingAnimations) > timeline->cancelDeclarativeAnimationsForElement(element); >- } >- animationController.cancelAnimations(element); >+ } else if (animationController) >+ animationController->cancelAnimations(element); > } > > if (teardownType == TeardownType::Full) >diff --git a/Source/WebCore/style/StyleTreeResolver.cpp b/Source/WebCore/style/StyleTreeResolver.cpp >index c8af0970cfe28f612f7387c91a1ffd0074e2e007..1c30a14539bbb5f6756b1f620d72fd12d4a6ca21 100644 >--- a/Source/WebCore/style/StyleTreeResolver.cpp >+++ b/Source/WebCore/style/StyleTreeResolver.cpp >@@ -293,7 +293,7 @@ ElementUpdate TreeResolver::createAnimatedElementUpdate(std::unique_ptr<RenderSt > } > } > >- if (auto timeline = m_document.existingTimeline()) { >+ if (auto* timeline = m_document.existingTimeline()) { > // Now we can update all Web animations, which will include CSS Animations as well > // as animations created via the JS API. > auto animatedStyle = RenderStyle::clonePtr(*newStyle); >@@ -303,7 +303,7 @@ ElementUpdate TreeResolver::createAnimatedElementUpdate(std::unique_ptr<RenderSt > > // Old code path for CSS Animations and CSS Transitions. > if (!RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) { >- auto& animationController = m_document.frame()->animation(); >+ auto& animationController = m_document.frame()->animationController(); > > auto animationUpdate = animationController.updateAnimations(element, *newStyle, oldStyle); > shouldRecompositeLayer = animationUpdate.stateChanged; >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index b731246c71a3a7cc0cd1c7c5d3b89544da1e5daa..703652e39c0ed1950f3c8946246db938e87979d7 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -939,7 +939,7 @@ unsigned Internals::numberOfActiveAnimations() const > { > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) > return frame()->document()->timeline().numberOfActiveAnimationsForTesting(); >- return frame()->animation().numberOfActiveAnimations(frame()->document()); >+ return frame()->animationController().numberOfActiveAnimations(frame()->document()); > } > > ExceptionOr<bool> Internals::animationsAreSuspended() const >@@ -950,7 +950,7 @@ ExceptionOr<bool> Internals::animationsAreSuspended() const > > if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) > return document->timeline().animationsAreSuspended(); >- return document->frame()->animation().animationsAreSuspendedForDocument(document); >+ return document->frame()->animationController().animationsAreSuspendedForDocument(document); > } > > double Internals::animationsInterval() const >@@ -965,9 +965,11 @@ double Internals::animationsInterval() const > return INFINITY; > } > >- if (!document->frame()) >- return INFINITY; >- return document->frame()->animation().animationInterval().value(); >+ if (auto* frame = document->frame()) { >+ if (auto* animationController = frame->existingAnimationController()) >+ return animationController->animationInterval().value(); >+ } >+ return INFINITY; > } > > ExceptionOr<void> Internals::suspendAnimations() const >@@ -983,11 +985,14 @@ ExceptionOr<void> Internals::suspendAnimations() const > document->timeline().suspendAnimations(); > } > } else { >- document->frame()->animation().suspendAnimationsForDocument(document); >+ if (auto* animationController = document->frame()->existingAnimationController()) >+ animationController->suspendAnimationsForDocument(document); > > for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) { >- if (Document* document = frame->document()) >- frame->animation().suspendAnimationsForDocument(document); >+ if (Document* document = frame->document()) { >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->suspendAnimationsForDocument(document); >+ } > } > } > >@@ -1007,11 +1012,14 @@ ExceptionOr<void> Internals::resumeAnimations() const > document->timeline().resumeAnimations(); > } > } else { >- document->frame()->animation().resumeAnimationsForDocument(document); >+ if (auto* animationController = document->frame()->existingAnimationController()) >+ animationController->resumeAnimationsForDocument(document); > > for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) { >- if (Document* document = frame->document()) >- frame->animation().resumeAnimationsForDocument(document); >+ if (Document* document = frame->document()) { >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->resumeAnimationsForDocument(document); >+ } > } > } > >@@ -1022,7 +1030,10 @@ ExceptionOr<bool> Internals::pauseAnimationAtTimeOnElement(const String& animati > { > if (pauseTime < 0) > return Exception { InvalidAccessError }; >- return frame()->animation().pauseAnimationAtTime(element, AtomicString(animationName), pauseTime); >+ >+ if (auto* animationController = frame()->existingAnimationController()) >+ return animationController->pauseAnimationAtTime(element, AtomicString(animationName), pauseTime); >+ return false; > } > > ExceptionOr<bool> Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element& element, const String& pseudoId) >@@ -1037,14 +1048,18 @@ ExceptionOr<bool> Internals::pauseAnimationAtTimeOnPseudoElement(const String& a > if (!pseudoElement) > return Exception { InvalidAccessError }; > >- return frame()->animation().pauseAnimationAtTime(*pseudoElement, AtomicString(animationName), pauseTime); >+ if (auto* animationController = frame()->existingAnimationController()) >+ return animationController->pauseAnimationAtTime(*pseudoElement, AtomicString(animationName), pauseTime); >+ return false; > } > > ExceptionOr<bool> Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element& element) > { > if (pauseTime < 0) > return Exception { InvalidAccessError }; >- return frame()->animation().pauseTransitionAtTime(element, propertyName, pauseTime); >+ if (auto* animationController = frame()->existingAnimationController()) >+ return animationController->pauseTransitionAtTime(element, propertyName, pauseTime); >+ return false; > } > > ExceptionOr<bool> Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element& element, const String& pseudoId) >@@ -1059,7 +1074,9 @@ ExceptionOr<bool> Internals::pauseTransitionAtTimeOnPseudoElement(const String& > if (!pseudoElement) > return Exception { InvalidAccessError }; > >- return frame()->animation().pauseTransitionAtTime(*pseudoElement, property, pauseTime); >+ if (auto* animationController = frame()->existingAnimationController()) >+ return animationController->pauseTransitionAtTime(*pseudoElement, property, pauseTime); >+ return false; > } > > Vector<Internals::AcceleratedAnimation> Internals::acceleratedAnimationsForElement(Element& element) >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 5eb9575282c1b653dcbc9aa6a47ed70c05e7d5ef..4495e69f853ac874e0cabb696f2fd48ceee8faee 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -4843,40 +4843,42 @@ + (void)_removeAllUserContentFromGroup:(NSString *)groupName > > - (BOOL)allowsNewCSSAnimationsWhileSuspended > { >- Frame* frame = core([self mainFrame]); >- if (frame) >- return frame->animation().allowsNewAnimationsWhileSuspended(); >+ if (auto* frame = core([self mainFrame])) { >+ if (auto* animationController = frame->existingAnimationController()) >+ return animationController->allowsNewAnimationsWhileSuspended(); >+ } > > return false; > } > > - (void)setAllowsNewCSSAnimationsWhileSuspended:(BOOL)allowed > { >- Frame* frame = core([self mainFrame]); >- if (frame) >- frame->animation().setAllowsNewAnimationsWhileSuspended(allowed); >+ if (auto* frame = core([self mainFrame])) { >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->setAllowsNewAnimationsWhileSuspended(allowed); >+ } > } > > - (BOOL)cssAnimationsSuspended > { >- // should ask the page! >- Frame* frame = core([self mainFrame]); >- if (frame) >- return frame->animation().isSuspended(); >+ if (auto* frame = core([self mainFrame])) { >+ if (auto* animationController = frame->existingAnimationController()) >+ return animationController->isSuspended(); >+ } > > return false; > } > > - (void)setCSSAnimationsSuspended:(BOOL)suspended > { >- Frame* frame = core([self mainFrame]); >- if (suspended == frame->animation().isSuspended()) >+ auto* animationController = core([self mainFrame])->existingAnimationController(); >+ if (!animationController || suspended == animationController->isSuspended()) > return; >- >+ > if (suspended) >- frame->animation().suspendAnimations(); >+ animationController->suspendAnimations(); > else >- frame->animation().resumeAnimations(); >+ animationController->resumeAnimations(); > } > > + (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme >diff --git a/Source/WebKitLegacy/win/WebFrame.cpp b/Source/WebKitLegacy/win/WebFrame.cpp >index 8866515f1a4d6969ed994c2535ce98062bf45fcb..9bff3423cca26d5da9dc701c6d8566e26c5a4a25 100644 >--- a/Source/WebKitLegacy/win/WebFrame.cpp >+++ b/Source/WebKitLegacy/win/WebFrame.cpp >@@ -1140,7 +1140,8 @@ HRESULT WebFrame::resumeAnimations() > if (!frame) > return E_UNEXPECTED; > >- frame->animation().resumeAnimations(); >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->resumeAnimations(); > return S_OK; > } > >@@ -1150,7 +1151,8 @@ HRESULT WebFrame::suspendAnimations() > if (!frame) > return E_UNEXPECTED; > >- frame->animation().suspendAnimations(); >+ if (auto* animationController = frame->existingAnimationController()) >+ animationController->suspendAnimations(); > return S_OK; > } > >@@ -1169,7 +1171,8 @@ HRESULT WebFrame::pauseAnimation(_In_ BSTR animationName, _In_opt_ IDOMNode* nod > if (!domNode) > return E_FAIL; > >- *animationWasRunning = frame->animation().pauseAnimationAtTime(downcast<Element>(*domNode->node()), String(animationName, SysStringLen(animationName)), secondsFromNow); >+ if (auto* animationController = frame->existingAnimationController()) >+ *animationWasRunning = animationController->pauseAnimationAtTime(downcast<Element>(*domNode->node()), String(animationName, SysStringLen(animationName)), secondsFromNow); > return S_OK; > } > >@@ -1188,7 +1191,8 @@ HRESULT WebFrame::pauseTransition(_In_ BSTR propertyName, _In_opt_ IDOMNode* nod > if (!domNode) > return E_FAIL; > >- *transitionWasRunning = frame->animation().pauseTransitionAtTime(downcast<Element>(*domNode->node()), String(propertyName, SysStringLen(propertyName)), secondsFromNow); >+ if (auto* animationController = frame->existingAnimationController()) >+ *transitionWasRunning = animationController->pauseTransitionAtTime(downcast<Element>(*domNode->node()), String(propertyName, SysStringLen(propertyName)), secondsFromNow); > return S_OK; > } > >@@ -1221,7 +1225,8 @@ HRESULT WebFrame::numberOfActiveAnimations(_Out_ UINT* number) > if (!frame) > return E_UNEXPECTED; > >- *number = frame->animation().numberOfActiveAnimations(frame->document()); >+ if (auto* animationController = frame->existingAnimationController()) >+ *number = animationController->numberOfActiveAnimations(frame->document()); > return S_OK; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192604
:
357074
|
357079
|
357082
|
357083
|
357117
|
357125
|
357141