Title: [106039] trunk/Source/WebCore
- Revision
- 106039
- Author
- ander...@apple.com
- Date
- 2012-01-26 14:10:53 -0800 (Thu, 26 Jan 2012)
Log Message
Get rid of ScrollElasticityController::beginScrollGesture()
https://bugs.webkit.org/show_bug.cgi?id=77138
Reviewed by Adam Roben.
ScrollElasticityController::handleWheelEvent now checks if the wheel event phase is
PlatformWheelEventPhaseBegan and sets up the gesture state if it is.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
* platform/mac/ScrollElasticityController.h:
(ScrollElasticityController):
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::handleWheelEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (106038 => 106039)
--- trunk/Source/WebCore/ChangeLog 2012-01-26 21:46:36 UTC (rev 106038)
+++ trunk/Source/WebCore/ChangeLog 2012-01-26 22:10:53 UTC (rev 106039)
@@ -1,5 +1,22 @@
2012-01-26 Anders Carlsson <ander...@apple.com>
+ Get rid of ScrollElasticityController::beginScrollGesture()
+ https://bugs.webkit.org/show_bug.cgi?id=77138
+
+ Reviewed by Adam Roben.
+
+ ScrollElasticityController::handleWheelEvent now checks if the wheel event phase is
+ PlatformWheelEventPhaseBegan and sets up the gesture state if it is.
+
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::handleWheelEvent):
+ * platform/mac/ScrollElasticityController.h:
+ (ScrollElasticityController):
+ * platform/mac/ScrollElasticityController.mm:
+ (WebCore::ScrollElasticityController::handleWheelEvent):
+
+2012-01-26 Anders Carlsson <ander...@apple.com>
+
Get rid of ScrollElasticityController::endScrollGesture()
https://bugs.webkit.org/show_bug.cgi?id=77134
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (106038 => 106039)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-26 21:46:36 UTC (rev 106038)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-26 22:10:53 UTC (rev 106039)
@@ -928,7 +928,6 @@
return false;
didBeginScrollGesture();
- m_scrollElasticityController.beginScrollGesture();
} else if (wheelEvent.phase() == PlatformWheelEventPhaseEnded)
didEndScrollGesture();
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (106038 => 106039)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-26 21:46:36 UTC (rev 106038)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-26 22:10:53 UTC (rev 106039)
@@ -63,8 +63,6 @@
public:
explicit ScrollElasticityController(ScrollElasticityControllerClient*);
- void beginScrollGesture();
-
bool handleWheelEvent(const PlatformWheelEvent&);
void snapRubberBandTimerFired();
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (106038 => 106039)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-01-26 21:46:36 UTC (rev 106038)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-01-26 22:10:53 UTC (rev 106039)
@@ -115,23 +115,6 @@
{
}
-void ScrollElasticityController::beginScrollGesture()
-{
- m_inScrollGesture = true;
- m_momentumScrollInProgress = false;
- m_ignoreMomentumScrolls = false;
- m_lastMomentumScrollTimestamp = 0;
- m_momentumVelocity = FloatSize();
-
- IntSize stretchAmount = m_client->stretchAmount();
- m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(stretchAmount.width()));
- m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(stretchAmount.height()));
-
- m_overflowScrollDelta = FloatSize();
-
- stopSnapRubberbandTimer();
-}
-
bool ScrollElasticityController::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
{
bool isMomentumScrollEvent = (wheelEvent.momentumPhase() != PlatformWheelEventPhaseNone);
@@ -143,6 +126,23 @@
return false;
}
+ if (wheelEvent.phase() == PlatformWheelEventPhaseBegan) {
+ m_inScrollGesture = true;
+ m_momentumScrollInProgress = false;
+ m_ignoreMomentumScrolls = false;
+ m_lastMomentumScrollTimestamp = 0;
+ m_momentumVelocity = FloatSize();
+
+ IntSize stretchAmount = m_client->stretchAmount();
+ m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(stretchAmount.width()));
+ m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(stretchAmount.height()));
+ m_overflowScrollDelta = FloatSize();
+
+ stopSnapRubberbandTimer();
+
+ return true;
+ }
+
if (wheelEvent.phase() == PlatformWheelEventPhaseEnded) {
snapRubberBand();
return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes