Title: [104855] trunk/Source/WebCore
Revision
104855
Author
ander...@apple.com
Date
2012-01-12 13:39:54 -0800 (Thu, 12 Jan 2012)

Log Message

Make ScrollElasticityController members private
https://bugs.webkit.org/show_bug.cgi?id=76208

Reviewed by Andreas Kling.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::endScrollGesture):
Call ScrollElasticityController::endScrollGesture.

* platform/mac/ScrollElasticityController.h:
Make members private.

* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::endScrollGesture):
Call snapRubberBand.

(WebCore::ScrollElasticityController::snapRubberBandTimerFired):
Call stopSnapRubberbandTimer.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104854 => 104855)


--- trunk/Source/WebCore/ChangeLog	2012-01-12 21:34:27 UTC (rev 104854)
+++ trunk/Source/WebCore/ChangeLog	2012-01-12 21:39:54 UTC (rev 104855)
@@ -1,5 +1,26 @@
 2012-01-12  Anders Carlsson  <ander...@apple.com>
 
+        Make ScrollElasticityController members private
+        https://bugs.webkit.org/show_bug.cgi?id=76208
+
+        Reviewed by Andreas Kling.
+
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::endScrollGesture):
+        Call ScrollElasticityController::endScrollGesture.
+
+        * platform/mac/ScrollElasticityController.h:
+        Make members private.
+
+        * platform/mac/ScrollElasticityController.mm:
+        (WebCore::ScrollElasticityController::endScrollGesture):
+        Call snapRubberBand.
+
+        (WebCore::ScrollElasticityController::snapRubberBandTimerFired):
+        Call stopSnapRubberbandTimer.
+
+2012-01-12  Anders Carlsson  <ander...@apple.com>
+
         Move wheel event handling to ScrollElasticityController::handleWheelEvent
         https://bugs.webkit.org/show_bug.cgi?id=76205
 

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (104854 => 104855)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-01-12 21:34:27 UTC (rev 104854)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-01-12 21:39:54 UTC (rev 104855)
@@ -1085,7 +1085,7 @@
 {
     didEndScrollGesture();
 
-    m_scrollElasticityController.snapRubberBand();
+    m_scrollElasticityController.endScrollGesture();
 }
 
 void ScrollAnimatorMac::snapRubberBandTimerFired(Timer<ScrollAnimatorMac>*)

Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (104854 => 104855)


--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h	2012-01-12 21:34:27 UTC (rev 104854)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h	2012-01-12 21:39:54 UTC (rev 104855)
@@ -64,16 +64,13 @@
     explicit ScrollElasticityController(ScrollElasticityControllerClient*);
 
     void beginScrollGesture();
+    void endScrollGesture();
 
     bool handleWheelEvent(const PlatformWheelEvent&);
     void snapRubberBandTimerFired();
 
 private:
     void stopSnapRubberbandTimer();
-
-    // FIXME: These members should be private. They are currently public as a stop-gap measure, while
-    // the rubber-band related code from ScrollAnimatorMac is being moved over.
-public:
     void snapRubberBand();
 
     ScrollElasticityControllerClient* m_client;

Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (104854 => 104855)


--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-01-12 21:34:27 UTC (rev 104854)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-01-12 21:39:54 UTC (rev 104855)
@@ -132,6 +132,11 @@
     stopSnapRubberbandTimer();
 }
 
+void ScrollElasticityController::endScrollGesture()
+{
+    snapRubberBand();
+}
+
 bool ScrollElasticityController::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
 {
     bool isMomentumScrollEvent = (wheelEvent.momentumPhase() != PlatformWheelEventPhaseNone);
@@ -305,15 +310,13 @@
         if (m_startStretch == FloatSize()) {
             m_startStretch = m_client->stretchAmount();
             if (m_startStretch == FloatSize()) {
-                m_client->stopSnapRubberbandTimer();
+                stopSnapRubberbandTimer();
 
                 m_stretchScrollForce = FloatSize();
                 m_startTime = 0;
                 m_startStretch = FloatSize();
                 m_origOrigin = FloatPoint();
                 m_origVelocity = FloatSize();
-                m_snapRubberbandTimerIsActive = false;
-
                 return;
             }
 
@@ -347,14 +350,13 @@
             m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(newStretch.height()));
         } else {
             m_client->immediateScrollBy(m_origOrigin - m_client->absoluteScrollPosition());
-            m_client->stopSnapRubberbandTimer();
 
+            stopSnapRubberbandTimer();
             m_stretchScrollForce = FloatSize();
             m_startTime = 0;
             m_startStretch = FloatSize();
             m_origOrigin = FloatPoint();
             m_origVelocity = FloatSize();
-            m_snapRubberbandTimerIsActive = false;
         }
     } else {
         m_startTime = [NSDate timeIntervalSinceReferenceDate];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to