Rename CSSAnimationController accessors from animation() to legacyAnimation()
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Apr 2020 20:47:18 +0000 (20:47 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Apr 2020 20:47:18 +0000 (20:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=211082

Reviewed by Simon Fraser.

Source/WebCore:

* 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::clearTimers):
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
* 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):
* 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::legacyAnimation 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):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:

Source/WebKitLegacy/win:

* WebFrame.cpp:
(WebFrame::resumeAnimations):
(WebFrame::suspendAnimations):
(WebFrame::pauseAnimation):
(WebFrame::pauseTransition):
(WebFrame::numberOfActiveAnimations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260774 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameViewLayoutContext.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/animation/CSSAnimationController.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebFrame.cpp

index ee72ec1..0d9cb55 100644 (file)
@@ -1,3 +1,70 @@
+2020-04-27  Antoine Quint  <graouts@apple.com>
+
+        Rename CSSAnimationController accessors from animation() to legacyAnimation()
+        https://bugs.webkit.org/show_bug.cgi?id=211082
+
+        Reviewed by Simon Fraser.
+
+        * 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::clearTimers):
+        (WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
+        * 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):
+        * 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::legacyAnimation 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):
+
 2020-04-27  Per Arne Vollan  <pvollan@apple.com>
 
         [Cocoa] After r258891, r255119 can be reverted
index f561da4..29a2950 100644 (file)
@@ -2227,7 +2227,7 @@ static inline const RenderStyle* computeRenderStyleForProperty(Element& element,
         if (auto timeline = element.document().existingTimeline())
             ownedStyle = timeline->animatedStyleForRenderer(*renderer);
         else
-            ownedStyle = renderer->animation().animatedStyleForRenderer(*renderer);
+            ownedStyle = renderer->legacyAnimation().animatedStyleForRenderer(*renderer);
         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);
index c4e69ef..306584d 100644 (file)
@@ -1941,7 +1941,7 @@ void Document::resolveStyle(ResolveStyleType type)
     TraceScope tracingScope(StyleRecalcStart, StyleRecalcEnd);
 
     RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView());
-    AnimationUpdateBlock animationUpdateBlock(&m_frame->animation());
+    AnimationUpdateBlock animationUpdateBlock(&m_frame->legacyAnimation());
 
     // FIXME: Do this update per tree scope.
     {
@@ -2403,7 +2403,7 @@ void Document::didBecomeCurrentDocumentInFrame()
             if (auto* timeline = existingTimeline())
                 timeline->suspendAnimations();
         } else
-            m_frame->animation().suspendAnimationsForDocument(this);
+            m_frame->legacyAnimation().suspendAnimationsForDocument(this);
         suspendScheduledTasks(ReasonForSuspension::PageWillBeSuspended);
     } else {
         resumeScheduledTasks(ReasonForSuspension::PageWillBeSuspended);
@@ -2411,7 +2411,7 @@ void Document::didBecomeCurrentDocumentInFrame()
             if (auto* timeline = existingTimeline())
                 timeline->resumeAnimations();
         } else
-            m_frame->animation().resumeAnimationsForDocument(this);
+            m_frame->legacyAnimation().resumeAnimationsForDocument(this);
     }
 }
 
@@ -2506,7 +2506,7 @@ void Document::prepareForDestruction()
         return;
 
     if (m_frame)
-        m_frame->animation().detachFromDocument(this);
+        m_frame->legacyAnimation().detachFromDocument(this);
 
 #if USE(LIBWEBRTC)
     // FIXME: This should be moved to Modules/mediastream.
@@ -3041,7 +3041,7 @@ void Document::implicitClose()
         if (auto* documentLoader = loader())
             documentLoader->startIconLoading();
 
-        f->animation().startAnimationsIfNotSuspended(this);
+        f->legacyAnimation().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
@@ -5369,7 +5369,7 @@ void Document::resume(ReasonForSuspension reason)
         if (auto* timeline = existingTimeline())
             timeline->resumeAnimations();  
     } else
-        m_frame->animation().resumeAnimationsForDocument(this);
+        m_frame->legacyAnimation().resumeAnimationsForDocument(this);
 
     resumeScheduledTasks(reason);
 
index 1ff23e1..0b5af2f 100644 (file)
@@ -2243,7 +2243,7 @@ void Element::removedFromAncestor(RemovalType removalType, ContainerNode& oldPar
         timeline->elementWasRemoved(*this);
 
     if (frame)
-        frame->animation().cancelAnimations(*this);
+        frame->legacyAnimation().cancelAnimations(*this);
 
 #if PLATFORM(MAC)
     if (frame && frame->page())
index e84c229..15d81c1 100644 (file)
@@ -94,7 +94,7 @@ void PseudoElement::clearHostElement()
         timeline->elementWasRemoved(*this);
     
     if (auto* frame = document().frame())
-        frame->animation().cancelAnimations(*this);
+        frame->legacyAnimation().cancelAnimations(*this);
 
     m_hostElement = nullptr;
 }
index a87d3e5..55e41b7 100644 (file)
@@ -279,7 +279,7 @@ void CachedFrame::destroy()
 
     Frame::clearTimers(m_view.get(), m_document.get());
 
-    m_view->frame().animation().detachFromDocument(m_document.get());
+    m_view->frame().legacyAnimation().detachFromDocument(m_document.get());
 
     // FIXME: Why do we need to call removeAllEventListeners here? When the document is in back/forward cache, this method won't work
     // fully anyway, because the document won't be able to access its DOMWindow object (due to being frameless).
index 385e37a..1a60896 100644 (file)
@@ -723,7 +723,7 @@ void Frame::clearTimers(FrameView *view, Document *document)
             if (auto* timeline = document->existingTimeline())
                 timeline->suspendAnimations();
         } else
-            view->frame().animation().suspendAnimationsForDocument(document);
+            view->frame().legacyAnimation().suspendAnimationsForDocument(document);
         view->frame().eventHandler().stopAutoscrollTimer();
     }
 }
@@ -1018,7 +1018,7 @@ void Frame::resumeActiveDOMObjectsAndAnimations()
         if (auto* timeline = m_doc->existingTimeline())
             timeline->resumeAnimations();
     } else
-        animation().resumeAnimationsForDocument(m_doc.get());
+        legacyAnimation().resumeAnimationsForDocument(m_doc.get());
     if (m_view)
         m_view->layoutContext().scheduleLayout();
 }
index f2ae078..e9cab3c 100644 (file)
@@ -172,8 +172,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; }
+    CSSAnimationController& legacyAnimation() { return m_animationController; }
+    const CSSAnimationController& legacyAnimation() const { return m_animationController; }
     ScriptController& script() { return m_script; }
     const ScriptController& script() const { return m_script; }
 
index ee5e53a..25fe93a 100644 (file)
@@ -590,7 +590,7 @@ void FrameView::didDestroyRenderTree()
     ASSERT(!m_viewportConstrainedObjects || m_viewportConstrainedObjects->computesEmpty());
     ASSERT(!m_slowRepaintObjects || m_slowRepaintObjects->computesEmpty());
 
-    ASSERT(!frame().animation().hasAnimations());
+    ASSERT(!frame().legacyAnimation().hasAnimations());
 }
 
 void FrameView::setContentsSize(const IntSize& size)
@@ -4372,7 +4372,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().legacyAnimation());
 
     using DescendantsDeque = Deque<Ref<FrameView>, 16>;
     auto nextRenderedDescendant = [this] (DescendantsDeque& descendantsDeque) -> RefPtr<FrameView> {
index c304cf1..34147fb 100644 (file)
@@ -204,7 +204,7 @@ void FrameViewLayoutContext::layout()
     LayoutScope layoutScope(*this);
     TraceScope tracingScope(LayoutStart, LayoutEnd);
     InspectorInstrumentation::willLayout(view().frame());
-    AnimationUpdateBlock animationUpdateBlock(&view().frame().animation());
+    AnimationUpdateBlock animationUpdateBlock(&view().frame().legacyAnimation());
     WeakPtr<RenderElement> layoutRoot;
     
     m_layoutTimer.stop();
index ee19671..06fc022 100644 (file)
@@ -1487,7 +1487,7 @@ void Page::handleLowModePowerChange(bool isLowPowerModeEnabled)
                 timeline->updateThrottlingState();
         });
     } else
-        mainFrame().animation().updateThrottlingState();
+        mainFrame().legacyAnimation().updateThrottlingState();
     updateDOMTimerAlignmentInterval();
 }
 
@@ -2033,7 +2033,7 @@ void Page::setIsVisibleInternal(bool isVisible)
                         timeline->resumeAnimations();
                 });
             } else
-                mainFrame().animation().resumeAnimations();
+                mainFrame().legacyAnimation().resumeAnimations();
         }
 
         forEachDocument([] (Document& document) {
@@ -2057,7 +2057,7 @@ void Page::setIsVisibleInternal(bool isVisible)
                         timeline->suspendAnimations();
                 });
             } else
-                mainFrame().animation().suspendAnimations();
+                mainFrame().legacyAnimation().suspendAnimations();
         }
 
         forEachDocument([] (Document& document) {
@@ -2413,9 +2413,9 @@ void Page::hiddenPageCSSAnimationSuspensionStateChanged()
             });
         } else {
             if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
-                mainFrame().animation().suspendAnimations();
+                mainFrame().legacyAnimation().suspendAnimations();
             else
-                mainFrame().animation().resumeAnimations();
+                mainFrame().legacyAnimation().resumeAnimations();
         }
     }
 }
index 11db060..002ac9d 100644 (file)
@@ -320,7 +320,7 @@ void CSSAnimationControllerPrivate::updateThrottlingState()
     updateAnimationTimer();
 
     for (auto* childFrame = m_frame.tree().firstChild(); childFrame; childFrame = childFrame->tree().nextSibling())
-        childFrame->animation().updateThrottlingState();
+        childFrame->legacyAnimation().updateThrottlingState();
 }
 
 Seconds CSSAnimationControllerPrivate::animationInterval() const
@@ -340,7 +340,7 @@ void CSSAnimationControllerPrivate::suspendAnimations()
 
     // Traverse subframes
     for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
-        child->animation().suspendAnimations();
+        child->legacyAnimation().suspendAnimations();
 
     m_isSuspended = true;
 }
@@ -354,7 +354,7 @@ void CSSAnimationControllerPrivate::resumeAnimations()
 
     // Traverse subframes
     for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
-        child->animation().resumeAnimations();
+        child->legacyAnimation().resumeAnimations();
 
     m_isSuspended = false;
 }
index 783746f..14d19cf 100644 (file)
@@ -1359,9 +1359,9 @@ TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
             }
         }
     } else {
-        if (renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform)) {
+        if (renderer().legacyAnimation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform)) {
             TransformationMatrix currTransform;
-            std::unique_ptr<RenderStyle> style = renderer().animation().animatedStyleForRenderer(renderer());
+            std::unique_ptr<RenderStyle> style = renderer().legacyAnimation().animatedStyleForRenderer(renderer());
             LayoutSize offsetFromRoot;
             auto computedReferenceBox = computeReferenceBox(renderer(), transformBoxToCSSBoxType(style->transformBox()), offsetFromRoot, box->borderBoxRect());
             FloatRect pixelSnappedBorderRect = snapRectToDevicePixels(computedReferenceBox, box->document().deviceScaleFactor());
@@ -1376,7 +1376,7 @@ TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
     if (applyOrigin == RenderStyle::ExcludeTransformOrigin) {
         TransformationMatrix currTransform;
         LayoutSize offsetFromRoot;
-        std::unique_ptr<RenderStyle> style = renderer().animation().animatedStyleForRenderer(renderer());
+        std::unique_ptr<RenderStyle> style = renderer().legacyAnimation().animatedStyleForRenderer(renderer());
         auto computedReferenceBox = computeReferenceBox(renderer(), transformBoxToCSSBoxType(style->transformBox()), offsetFromRoot, box->borderBoxRect());
         FloatRect pixelSnappedBorderRect = snapRectToDevicePixels(computedReferenceBox, box->document().deviceScaleFactor());
         box->style().applyTransform(currTransform, pixelSnappedBorderRect, RenderStyle::ExcludeTransformOrigin);
@@ -6136,7 +6136,7 @@ bool RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimati
             }
         }
     } else {
-        if (renderer().animation().computeExtentOfAnimation(renderer(), animatedBounds)) {
+        if (renderer().legacyAnimation().computeExtentOfAnimation(renderer(), animatedBounds)) {
             bounds = animatedBounds;
             return true;
         }
index 3487580..e39337b 100644 (file)
@@ -1172,7 +1172,7 @@ void RenderLayerBacking::updateGeometry(const RenderLayer* compositedAncestor)
         if (auto* timeline = renderer().documentTimeline())
             isRunningAcceleratedTransformAnimation = timeline->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform);
     } else
-        isRunningAcceleratedTransformAnimation = renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform);
+        isRunningAcceleratedTransformAnimation = renderer().legacyAnimation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform);
 
     updateTransform(style);
     updateOpacity(style);
@@ -3515,7 +3515,7 @@ void RenderLayerBacking::transitionFinished(CSSPropertyID property)
 void RenderLayerBacking::notifyAnimationStarted(const GraphicsLayer*, const String&, MonotonicTime time)
 {
     if (!RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
-        renderer().animation().notifyAnimationStarted(renderer(), time);
+        renderer().legacyAnimation().notifyAnimationStarted(renderer(), time);
 }
 
 void RenderLayerBacking::notifyFlushRequired(const GraphicsLayer*)
index 55a32d1..4689281 100644 (file)
@@ -536,7 +536,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
     }
 
     auto& frameView = m_renderView.frameView();
-    AnimationUpdateBlock animationUpdateBlock(&frameView.frame().animation());
+    AnimationUpdateBlock animationUpdateBlock(&frameView.frame().legacyAnimation());
 
     ASSERT(!m_flushingLayers);
     {
@@ -776,7 +776,7 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
 
     ++m_compositingUpdateCount;
 
-    AnimationUpdateBlock animationUpdateBlock(&m_renderView.frameView().frame().animation());
+    AnimationUpdateBlock animationUpdateBlock(&m_renderView.frameView().frame().legacyAnimation());
 
     SetForScope<bool> postLayoutChange(m_inPostLayoutUpdate, true);
 
@@ -2851,7 +2851,7 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderLayerModelObje
     if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
         return false;
 
-    auto& animController = renderer.animation();
+    auto& animController = renderer.legacyAnimation();
     return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity)
         && (usesCompositing() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
         || animController.isRunningAnimationOnRenderer(renderer, CSSPropertyFilter)
@@ -3401,7 +3401,7 @@ bool RenderLayerCompositor::isRunningTransformAnimation(RenderLayerModelObject&
     if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
         return false;
 
-    return renderer.animation().isRunningAnimationOnRenderer(renderer, CSSPropertyTransform);
+    return renderer.legacyAnimation().isRunningAnimationOnRenderer(renderer, CSSPropertyTransform);
 }
 
 // If an element has composited negative z-index children, those children render in front of the
index eb8b42c..d7c41c3 100644 (file)
@@ -693,7 +693,7 @@ public:
     void imageChanged(CachedImage*, const IntRect* = nullptr) override;
     virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) { }
 
-    CSSAnimationController& animation() const;
+    CSSAnimationController& legacyAnimation() const;
     DocumentTimeline* documentTimeline() const;
 
     // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use
@@ -949,9 +949,9 @@ inline Page& RenderObject::page() const
     return *frame().page();
 }
 
-inline CSSAnimationController& RenderObject::animation() const
+inline CSSAnimationController& RenderObject::legacyAnimation() const
 {
-    return frame().animation();
+    return frame().legacyAnimation();
 }
 
 inline DocumentTimeline* RenderObject::documentTimeline() const
index a5b7fbc..dd64fde 100644 (file)
@@ -558,7 +558,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()->legacyAnimation();    
 
     auto pop = [&] (unsigned depth) {
         while (teardownStack.size() > depth) {
index 3e8f3c9..1671dda 100644 (file)
@@ -332,7 +332,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()->legacyAnimation();
 
         auto animationUpdate = animationController.updateAnimations(element, *newStyle, oldStyle);
         animationImpact.add(animationUpdate.impact);
index bcb6924..4e0133f 100644 (file)
@@ -1057,7 +1057,7 @@ unsigned Internals::numberOfActiveAnimations() const
 {
     if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
         return frame()->document()->timeline().numberOfActiveAnimationsForTesting();
-    return frame()->animation().numberOfActiveAnimations(frame()->document());
+    return frame()->legacyAnimation().numberOfActiveAnimations(frame()->document());
 }
 
 ExceptionOr<bool> Internals::animationsAreSuspended() const
@@ -1068,7 +1068,7 @@ ExceptionOr<bool> Internals::animationsAreSuspended() const
 
     if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled())
         return document->timeline().animationsAreSuspended();
-    return document->frame()->animation().animationsAreSuspendedForDocument(document);
+    return document->frame()->legacyAnimation().animationsAreSuspendedForDocument(document);
 }
 
 double Internals::animationsInterval() const
@@ -1085,7 +1085,7 @@ double Internals::animationsInterval() const
 
     if (!document->frame())
         return INFINITY;
-    return document->frame()->animation().animationInterval().value();
+    return document->frame()->legacyAnimation().animationInterval().value();
 }
 
 ExceptionOr<void> Internals::suspendAnimations() const
@@ -1101,11 +1101,11 @@ ExceptionOr<void> Internals::suspendAnimations() const
                 document->timeline().suspendAnimations();
         }
     } else {
-        document->frame()->animation().suspendAnimationsForDocument(document);
+        document->frame()->legacyAnimation().suspendAnimationsForDocument(document);
 
         for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) {
             if (Document* document = frame->document())
-                frame->animation().suspendAnimationsForDocument(document);
+                frame->legacyAnimation().suspendAnimationsForDocument(document);
         }
     }
 
@@ -1125,11 +1125,11 @@ ExceptionOr<void> Internals::resumeAnimations() const
                 document->timeline().resumeAnimations();
         }
     } else {
-        document->frame()->animation().resumeAnimationsForDocument(document);
+        document->frame()->legacyAnimation().resumeAnimationsForDocument(document);
 
         for (Frame* frame = document->frame(); frame; frame = frame->tree().traverseNext()) {
             if (Document* document = frame->document())
-                frame->animation().resumeAnimationsForDocument(document);
+                frame->legacyAnimation().resumeAnimationsForDocument(document);
         }
     }
 
@@ -1140,7 +1140,7 @@ ExceptionOr<bool> Internals::pauseAnimationAtTimeOnElement(const String& animati
 {
     if (pauseTime < 0)
         return Exception { InvalidAccessError };
-    return frame()->animation().pauseAnimationAtTime(element, AtomString(animationName), pauseTime);
+    return frame()->legacyAnimation().pauseAnimationAtTime(element, AtomString(animationName), pauseTime);
 }
 
 ExceptionOr<bool> Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element& element, const String& pseudoId)
@@ -1155,14 +1155,14 @@ ExceptionOr<bool> Internals::pauseAnimationAtTimeOnPseudoElement(const String& a
     if (!pseudoElement)
         return Exception { InvalidAccessError };
 
-    return frame()->animation().pauseAnimationAtTime(*pseudoElement, AtomString(animationName), pauseTime);
+    return frame()->legacyAnimation().pauseAnimationAtTime(*pseudoElement, AtomString(animationName), pauseTime);
 }
 
 ExceptionOr<bool> Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element& element)
 {
     if (pauseTime < 0)
         return Exception { InvalidAccessError };
-    return frame()->animation().pauseTransitionAtTime(element, propertyName, pauseTime);
+    return frame()->legacyAnimation().pauseTransitionAtTime(element, propertyName, pauseTime);
 }
 
 ExceptionOr<bool> Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element& element, const String& pseudoId)
@@ -1177,7 +1177,7 @@ ExceptionOr<bool> Internals::pauseTransitionAtTimeOnPseudoElement(const String&
     if (!pseudoElement)
         return Exception { InvalidAccessError };
 
-    return frame()->animation().pauseTransitionAtTime(*pseudoElement, property, pauseTime);
+    return frame()->legacyAnimation().pauseTransitionAtTime(*pseudoElement, property, pauseTime);
 }
 
 Vector<Internals::AcceleratedAnimation> Internals::acceleratedAnimationsForElement(Element& element)
index 0ebe435..357eb96 100644 (file)
@@ -1,3 +1,12 @@
+2020-04-27  Antoine Quint  <graouts@apple.com>
+
+        Rename CSSAnimationController accessors from animation() to legacyAnimation()
+        https://bugs.webkit.org/show_bug.cgi?id=211082
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebView.mm:
+
 2020-04-26  Darin Adler  <darin@apple.com>
 
         Replace more uses of live ranges with SimpleRange
index 7d21daa..b22b81e 100644 (file)
@@ -4776,7 +4776,7 @@ IGNORE_WARNINGS_END
 {
     auto* frame = core([self mainFrame]);
     if (frame)
-        return frame->animation().allowsNewAnimationsWhileSuspended();
+        return frame->legacyAnimation().allowsNewAnimationsWhileSuspended();
 
     return false;
 }
@@ -4785,7 +4785,7 @@ IGNORE_WARNINGS_END
 {
     auto* frame = core([self mainFrame]);
     if (frame)
-        frame->animation().setAllowsNewAnimationsWhileSuspended(allowed);
+        frame->legacyAnimation().setAllowsNewAnimationsWhileSuspended(allowed);
 }
 
 - (BOOL)cssAnimationsSuspended
@@ -4793,7 +4793,7 @@ IGNORE_WARNINGS_END
     // should ask the page!
     auto* frame = core([self mainFrame]);
     if (frame)
-        return frame->animation().isSuspended();
+        return frame->legacyAnimation().isSuspended();
 
     return false;
 }
@@ -4801,13 +4801,13 @@ IGNORE_WARNINGS_END
 - (void)setCSSAnimationsSuspended:(BOOL)suspended
 {
     auto* frame = core([self mainFrame]);
-    if (suspended == frame->animation().isSuspended())
+    if (suspended == frame->legacyAnimation().isSuspended())
         return;
 
     if (suspended)
-        frame->animation().suspendAnimations();
+        frame->legacyAnimation().suspendAnimations();
     else
-        frame->animation().resumeAnimations();
+        frame->legacyAnimation().resumeAnimations();
 }
 
 + (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
index a647931..2b027b6 100644 (file)
@@ -1,3 +1,17 @@
+2020-04-27  Antoine Quint  <graouts@apple.com>
+
+        Rename CSSAnimationController accessors from animation() to legacyAnimation()
+        https://bugs.webkit.org/show_bug.cgi?id=211082
+
+        Reviewed by Simon Fraser.
+
+        * WebFrame.cpp:
+        (WebFrame::resumeAnimations):
+        (WebFrame::suspendAnimations):
+        (WebFrame::pauseAnimation):
+        (WebFrame::pauseTransition):
+        (WebFrame::numberOfActiveAnimations):
+
 2020-04-27  Rob Buis  <rbuis@igalia.com>
 
         Make loadURLIntoChildFrame private and non-exported
index 2c83b3f..363c5bd 100644 (file)
@@ -1183,7 +1183,7 @@ HRESULT WebFrame::resumeAnimations()
     if (!frame)
         return E_UNEXPECTED;
 
-    frame->animation().resumeAnimations();
+    frame->legacyAnimation().resumeAnimations();
     return S_OK;
 }
 
@@ -1193,7 +1193,7 @@ HRESULT WebFrame::suspendAnimations()
     if (!frame)
         return E_UNEXPECTED;
 
-    frame->animation().suspendAnimations();
+    frame->legacyAnimation().suspendAnimations();
     return S_OK;
 }
 
@@ -1212,7 +1212,7 @@ 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);
+    *animationWasRunning = frame->legacyAnimation().pauseAnimationAtTime(downcast<Element>(*domNode->node()), String(animationName, SysStringLen(animationName)), secondsFromNow);
     return S_OK;
 }
 
@@ -1231,7 +1231,7 @@ 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);
+    *transitionWasRunning = frame->legacyAnimation().pauseTransitionAtTime(downcast<Element>(*domNode->node()), String(propertyName, SysStringLen(propertyName)), secondsFromNow);
     return S_OK;
 }
 
@@ -1264,7 +1264,7 @@ HRESULT WebFrame::numberOfActiveAnimations(_Out_ UINT* number)
     if (!frame)
         return E_UNEXPECTED;
 
-    *number = frame->animation().numberOfActiveAnimations(frame->document());
+    *number = frame->legacyAnimation().numberOfActiveAnimations(frame->document());
     return S_OK;
 }