Title: [243151] trunk/Source/WebCore
Revision
243151
Author
za...@apple.com
Date
2019-03-19 10:59:24 -0700 (Tue, 19 Mar 2019)

Log Message

RenderElement::startAnimation should take const Animation&
https://bugs.webkit.org/show_bug.cgi?id=195929

Reviewed by Daniel Bates.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::startAnimation):
(WebCore::KeyframeAnimation::endAnimation):
* rendering/RenderElement.h:
(WebCore::RenderElement::startAnimation):
(WebCore::RenderElement::animationFinished):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::startAnimation):
(WebCore::RenderLayerModelObject::animationFinished):
* rendering/RenderLayerModelObject.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (243150 => 243151)


--- trunk/Source/WebCore/ChangeLog	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/ChangeLog	2019-03-19 17:59:24 UTC (rev 243151)
@@ -1,3 +1,26 @@
+2019-03-19  Zalan Bujtas  <za...@apple.com>
+
+        RenderElement::startAnimation should take const Animation&
+        https://bugs.webkit.org/show_bug.cgi?id=195929
+
+        Reviewed by Daniel Bates.
+
+        * animation/KeyframeEffect.cpp:
+        (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::startAnimation):
+        (WebCore::KeyframeAnimation::endAnimation):
+        * rendering/RenderElement.h:
+        (WebCore::RenderElement::startAnimation):
+        (WebCore::RenderElement::animationFinished):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::startAnimation):
+        * rendering/RenderLayerBacking.h:
+        * rendering/RenderLayerModelObject.cpp:
+        (WebCore::RenderLayerModelObject::startAnimation):
+        (WebCore::RenderLayerModelObject::animationFinished):
+        * rendering/RenderLayerModelObject.h:
+
 2019-03-19  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Heap: lazily create the agent

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (243150 => 243151)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2019-03-19 17:59:24 UTC (rev 243151)
@@ -1319,7 +1319,7 @@
     for (const auto& action : pendingAcceleratedActions) {
         switch (action) {
         case AcceleratedAction::Play:
-            if (!compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer().ptr(), m_blendingKeyframes)) {
+            if (!compositedRenderer->startAnimation(timeOffset, backingAnimationForCompositedRenderer(), m_blendingKeyframes)) {
                 m_shouldRunAccelerated = false;
                 m_lastRecordedAcceleratedAction = AcceleratedAction::Stop;
                 animation()->acceleratedStateDidChange();

Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (243150 => 243151)


--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2019-03-19 17:59:24 UTC (rev 243151)
@@ -292,7 +292,7 @@
 bool KeyframeAnimation::startAnimation(double timeOffset)
 {
     if (auto* renderer = this->renderer())
-        return renderer->startAnimation(timeOffset, m_animation.ptr(), m_keyframes);
+        return renderer->startAnimation(timeOffset, m_animation, m_keyframes);
     return false;
 }
 

Modified: trunk/Source/WebCore/rendering/RenderElement.h (243150 => 243151)


--- trunk/Source/WebCore/rendering/RenderElement.h	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/rendering/RenderElement.h	2019-03-19 17:59:24 UTC (rev 243151)
@@ -226,7 +226,7 @@
     virtual void transitionPaused(double /* timeOffset */, CSSPropertyID) { }
     virtual void transitionFinished(CSSPropertyID) { }
 
-    virtual bool startAnimation(double /* timeOffset */, const Animation*, const KeyframeList&) { return false; }
+    virtual bool startAnimation(double /* timeOffset */, const Animation&, const KeyframeList&) { return false; }
     virtual void animationPaused(double /* timeOffset */, const String& /* name */) { }
     virtual void animationSeeked(double /* timeOffset */, const String& /* name */) { }
     virtual void animationFinished(const String& /* name */) { }

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (243150 => 243151)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 17:59:24 UTC (rev 243151)
@@ -2793,7 +2793,7 @@
 }
 #endif
 
-bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes)
+bool RenderLayerBacking::startAnimation(double timeOffset, const Animation& animation, const KeyframeList& keyframes)
 {
     bool hasOpacity = keyframes.containsProperty(CSSPropertyOpacity);
     bool hasTransform = renderer().isBox() && keyframes.containsProperty(CSSPropertyTransform);
@@ -2846,17 +2846,17 @@
 
     bool didAnimate = false;
 
-    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, snappedIntRect(renderBox()->borderBoxRect()).size(), anim, keyframes.animationName(), timeOffset))
+    if (hasTransform && m_graphicsLayer->addAnimation(transformVector, snappedIntRect(renderBox()->borderBoxRect()).size(), &animation, keyframes.animationName(), timeOffset))
         didAnimate = true;
 
-    if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize(), anim, keyframes.animationName(), timeOffset))
+    if (hasOpacity && m_graphicsLayer->addAnimation(opacityVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
         didAnimate = true;
 
-    if (hasFilter && m_graphicsLayer->addAnimation(filterVector, IntSize(), anim, keyframes.animationName(), timeOffset))
+    if (hasFilter && m_graphicsLayer->addAnimation(filterVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
         didAnimate = true;
 
 #if ENABLE(FILTERS_LEVEL_2)
-    if (hasBackdropFilter && m_graphicsLayer->addAnimation(backdropFilterVector, IntSize(), anim, keyframes.animationName(), timeOffset))
+    if (hasBackdropFilter && m_graphicsLayer->addAnimation(backdropFilterVector, IntSize { }, &animation, keyframes.animationName(), timeOffset))
         didAnimate = true;
 #endif
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (243150 => 243151)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2019-03-19 17:59:24 UTC (rev 243151)
@@ -194,7 +194,7 @@
     void transitionPaused(double timeOffset, CSSPropertyID);
     void transitionFinished(CSSPropertyID);
 
-    bool startAnimation(double timeOffset, const Animation* anim, const KeyframeList& keyframes);
+    bool startAnimation(double timeOffset, const Animation&, const KeyframeList&);
     void animationPaused(double timeOffset, const String& name);
     void animationSeeked(double timeOffset, const String& name);
     void animationFinished(const String& name);

Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp (243150 => 243151)


--- trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp	2019-03-19 17:59:24 UTC (rev 243151)
@@ -304,7 +304,7 @@
     layer()->backing()->transitionFinished(propertyId);
 }
 
-bool RenderLayerModelObject::startAnimation(double timeOffset, const Animation* animation, const KeyframeList& keyframes)
+bool RenderLayerModelObject::startAnimation(double timeOffset, const Animation& animation, const KeyframeList& keyframes)
 {
     if (!layer() || !layer()->backing())
         return false;

Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.h (243150 => 243151)


--- trunk/Source/WebCore/rendering/RenderLayerModelObject.h	2019-03-19 17:50:19 UTC (rev 243150)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.h	2019-03-19 17:59:24 UTC (rev 243151)
@@ -73,7 +73,7 @@
     void transitionPaused(double timeOffset, CSSPropertyID) override;
     void transitionFinished(CSSPropertyID) override;
 
-    bool startAnimation(double timeOffset, const Animation*, const KeyframeList& keyframes) override;
+    bool startAnimation(double timeOffset, const Animation&, const KeyframeList&) override;
     void animationPaused(double timeOffset, const String& name) override;
     void animationSeeked(double timeOffset, const String& name) override;
     void animationFinished(const String& name) override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to