Title: [225929] trunk/Source/WebCore
Revision
225929
Author
grao...@webkit.org
Date
2017-12-14 14:15:25 -0800 (Thu, 14 Dec 2017)

Log Message

[Web Animations] Use is<> when possible
https://bugs.webkit.org/show_bug.cgi?id=180832

Reviewed by Dean Jackson.

Adopt is<> when possible.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::setEffect):
(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::startOrStopAccelerated):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (225928 => 225929)


--- trunk/Source/WebCore/ChangeLog	2017-12-14 22:13:45 UTC (rev 225928)
+++ trunk/Source/WebCore/ChangeLog	2017-12-14 22:15:25 UTC (rev 225929)
@@ -1,5 +1,19 @@
 2017-12-14  Antoine Quint  <grao...@apple.com>
 
+        [Web Animations] Use is<> when possible
+        https://bugs.webkit.org/show_bug.cgi?id=180832
+
+        Reviewed by Dean Jackson.
+
+        Adopt is<> when possible.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::setEffect):
+        (WebCore::WebAnimation::setTimeline):
+        (WebCore::WebAnimation::startOrStopAccelerated):
+
+2017-12-14  Antoine Quint  <grao...@apple.com>
+
         [Web Animations] Bring timeline and currentTime setters closer to compliance
         https://bugs.webkit.org/show_bug.cgi?id=180834
 

Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (225928 => 225929)


--- trunk/Source/WebCore/animation/WebAnimation.cpp	2017-12-14 22:13:45 UTC (rev 225928)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp	2017-12-14 22:15:25 UTC (rev 225929)
@@ -82,7 +82,7 @@
         m_effect->setAnimation(nullptr);
 
         // Update the Element to Animation map.
-        if (m_timeline && m_effect->isKeyframeEffect()) {
+        if (m_timeline && is<KeyframeEffect>(m_effect)) {
             auto* keyframeEffect = downcast<KeyframeEffect>(m_effect.get());
             auto* target = keyframeEffect->target();
             if (target)
@@ -97,7 +97,7 @@
 
         effect->setAnimation(this);
 
-        if (m_timeline && effect->isKeyframeEffect()) {
+        if (m_timeline && is<KeyframeEffect>(effect)) {
             auto* keyframeEffect = downcast<KeyframeEffect>(effect.get());
             auto* target = keyframeEffect->target();
             if (target)
@@ -127,7 +127,7 @@
     if (timeline)
         timeline->addAnimation(*this);
 
-    if (m_effect && m_effect->isKeyframeEffect()) {
+    if (is<KeyframeEffect>(m_effect)) {
         auto* keyframeEffect = downcast<KeyframeEffect>(m_effect.get());
         auto* target = keyframeEffect->target();
         if (target) {
@@ -828,7 +828,7 @@
 
 void WebAnimation::startOrStopAccelerated()
 {
-    if (m_effect && m_effect->isKeyframeEffect())
+    if (is<KeyframeEffect>(m_effect))
         downcast<KeyframeEffect>(*m_effect).startOrStopAccelerated();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to