Title: [141314] trunk/Source/WebCore
Revision
141314
Author
[email protected]
Date
2013-01-30 14:32:30 -0800 (Wed, 30 Jan 2013)

Log Message

Remove unnecessary setAnimating() method
https://bugs.webkit.org/show_bug.cgi?id=107495

Patch by Douglas Stockwell <[email protected]> on 2013-01-30
Reviewed by Dean Jackson.

The corresponding accessor and uses were removed in r39211.

No new tests: no change in behaviour.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::AnimationBase):
* page/animation/AnimationBase.h:
(AnimationBase):
* page/animation/CompositeAnimation.cpp:
* page/animation/CompositeAnimation.h:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141313 => 141314)


--- trunk/Source/WebCore/ChangeLog	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/ChangeLog	2013-01-30 22:32:30 UTC (rev 141314)
@@ -1,3 +1,25 @@
+2013-01-30  Douglas Stockwell  <[email protected]>
+
+        Remove unnecessary setAnimating() method
+        https://bugs.webkit.org/show_bug.cgi?id=107495
+
+        Reviewed by Dean Jackson.
+
+        The corresponding accessor and uses were removed in r39211.
+
+        No new tests: no change in behaviour.
+
+        * page/animation/AnimationBase.cpp:
+        (WebCore::AnimationBase::AnimationBase):
+        * page/animation/AnimationBase.h:
+        (AnimationBase):
+        * page/animation/CompositeAnimation.cpp:
+        * page/animation/CompositeAnimation.h:
+        * page/animation/ImplicitAnimation.cpp:
+        (WebCore::ImplicitAnimation::animate):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::animate):
+
 2013-01-30  Elliott Sprehn  <[email protected]>
 
         Clean up interface to ShadowRoot

Modified: trunk/Source/WebCore/page/animation/AnimationBase.cpp (141313 => 141314)


--- trunk/Source/WebCore/page/animation/AnimationBase.cpp	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/AnimationBase.cpp	2013-01-30 22:32:30 UTC (rev 141314)
@@ -70,7 +70,6 @@
 
 AnimationBase::AnimationBase(const Animation* transition, RenderObject* renderer, CompositeAnimation* compAnim)
     : m_animState(AnimationStateNew)
-    , m_isAnimating(false)
     , m_isAccelerated(false)
     , m_transformFunctionListValid(false)
 #if ENABLE(CSS_FILTERS)

Modified: trunk/Source/WebCore/page/animation/AnimationBase.h (141313 => 141314)


--- trunk/Source/WebCore/page/animation/AnimationBase.h	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/AnimationBase.h	2013-01-30 22:32:30 UTC (rev 141314)
@@ -129,9 +129,6 @@
     bool waitingForStartTime() const { return m_animState == AnimationStateStartWaitResponse; }
     bool waitingForStyleAvailable() const { return m_animState == AnimationStateStartWaitStyleAvailable; }
 
-    // "animating" means that something is running that requires a timer to keep firing
-    // (e.g. a software animation)
-    void setAnimating(bool inAnimating = true) { m_isAnimating = inAnimating; }
     virtual double timeToNextService();
 
     double progress(double scale, double offset, const TimingFunction*) const;
@@ -224,7 +221,6 @@
 
     AnimState m_animState;
 
-    bool m_isAnimating;       // transition/animation requires continual timer firing
     bool m_isAccelerated;
     bool m_transformFunctionListValid;
 #if ENABLE(CSS_FILTERS)

Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.cpp (141313 => 141314)


--- trunk/Source/WebCore/page/animation/CompositeAnimation.cpp	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.cpp	2013-01-30 22:32:30 UTC (rev 141314)
@@ -325,26 +325,6 @@
     return resultStyle;
 }
 
-// "animating" means that something is running that requires the timer to keep firing
-void CompositeAnimation::setAnimating(bool animating)
-{
-    if (!m_transitions.isEmpty()) {
-        CSSPropertyTransitionsMap::const_iterator transitionsEnd = m_transitions.end();
-        for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != transitionsEnd; ++it) {
-            ImplicitAnimation* transition = it->value.get();
-            transition->setAnimating(animating);
-        }
-    }
-    if (!m_keyframeAnimations.isEmpty()) {
-        m_keyframeAnimations.checkConsistency();
-        AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
-        for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
-            KeyframeAnimation* anim = it->value.get();
-            anim->setAnimating(animating);
-        }
-    }
-}
-
 double CompositeAnimation::timeToNextService() const
 {
     // Returns the time at which next service is required. -1 means no service is required. 0 means 

Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.h (141313 => 141314)


--- trunk/Source/WebCore/page/animation/CompositeAnimation.h	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.h	2013-01-30 22:32:30 UTC (rev 141314)
@@ -68,7 +68,6 @@
     
     bool hasAnimations() const  { return !m_transitions.isEmpty() || !m_keyframeAnimations.isEmpty(); }
 
-    void setAnimating(bool);
     bool isAnimatingProperty(CSSPropertyID, bool acceleratedOnly, bool isRunningNow) const;
 
     PassRefPtr<KeyframeAnimation> getAnimationForProperty(CSSPropertyID) const;

Modified: trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp (141313 => 141314)


--- trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp	2013-01-30 22:32:30 UTC (rev 141314)
@@ -81,17 +81,14 @@
     bool needsAnim = CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0));
     // FIXME: we also need to detect cases where we have to software animate for other reasons,
     // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902
-    if (needsAnim)
-        setAnimating();
-    else {
 #if USE(ACCELERATED_COMPOSITING)
+    if (!needsAnim)
         // If we are running an accelerated animation, set a flag in the style which causes the style
         // to compare as different to any other style. This ensures that changes to the property
         // that is animating are correctly detected during the animation (e.g. when a transition
         // gets interrupted).
         animatedStyle->setIsRunningAcceleratedAnimation();
 #endif
-    }
 
     // Fire the start timeout if needed
     fireAnimationEventsIfNeeded();

Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (141313 => 141314)


--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2013-01-30 22:30:54 UTC (rev 141313)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2013-01-30 22:32:30 UTC (rev 141314)
@@ -187,16 +187,13 @@
         fetchIntervalEndpointsForProperty(*it, fromStyle, toStyle, progress);
     
         bool needsAnim = CSSPropertyAnimation::blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress);
-        if (needsAnim)
-            setAnimating();
-        else {
 #if USE(ACCELERATED_COMPOSITING)
+        if (!needsAnim)
             // If we are running an accelerated animation, set a flag in the style
             // to indicate it. This can be used to make sure we get an updated
             // style for hit testing, etc.
             animatedStyle->setIsRunningAcceleratedAnimation();
 #endif
-        }
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to