Title: [106037] trunk/Source/WebCore
- Revision
- 106037
- Author
- ander...@apple.com
- Date
- 2012-01-26 13:38:19 -0800 (Thu, 26 Jan 2012)
Log Message
Get rid of ScrollElasticityController::endScrollGesture()
https://bugs.webkit.org/show_bug.cgi?id=77134
Reviewed by Adam Roben.
Just make ScrollElasticityController::handleWheelEvent call snapRubberBand if the wheel
event phase is PlatformWheelEventPhaseEnded.
* 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 (106036 => 106037)
--- trunk/Source/WebCore/ChangeLog 2012-01-26 21:35:44 UTC (rev 106036)
+++ trunk/Source/WebCore/ChangeLog 2012-01-26 21:38:19 UTC (rev 106037)
@@ -1,3 +1,20 @@
+2012-01-26 Anders Carlsson <ander...@apple.com>
+
+ Get rid of ScrollElasticityController::endScrollGesture()
+ https://bugs.webkit.org/show_bug.cgi?id=77134
+
+ Reviewed by Adam Roben.
+
+ Just make ScrollElasticityController::handleWheelEvent call snapRubberBand if the wheel
+ event phase is PlatformWheelEventPhaseEnded.
+
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::handleWheelEvent):
+ * platform/mac/ScrollElasticityController.h:
+ (ScrollElasticityController):
+ * platform/mac/ScrollElasticityController.mm:
+ (WebCore::ScrollElasticityController::handleWheelEvent):
+
2012-01-26 Abhishek Arya <infe...@chromium.org>
Crash in SVGSVGElement::currentViewBoxRect.
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (106036 => 106037)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-26 21:35:44 UTC (rev 106036)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-01-26 21:38:19 UTC (rev 106037)
@@ -929,11 +929,8 @@
didBeginScrollGesture();
m_scrollElasticityController.beginScrollGesture();
- } else if (wheelEvent.phase() == PlatformWheelEventPhaseEnded) {
+ } else if (wheelEvent.phase() == PlatformWheelEventPhaseEnded)
didEndScrollGesture();
- m_scrollElasticityController.endScrollGesture();
- return true;
- }
return m_scrollElasticityController.handleWheelEvent(wheelEvent);
}
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (106036 => 106037)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-26 21:35:44 UTC (rev 106036)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-01-26 21:38:19 UTC (rev 106037)
@@ -64,7 +64,6 @@
explicit ScrollElasticityController(ScrollElasticityControllerClient*);
void beginScrollGesture();
- void endScrollGesture();
bool handleWheelEvent(const PlatformWheelEvent&);
void snapRubberBandTimerFired();
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (106036 => 106037)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-01-26 21:35:44 UTC (rev 106036)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-01-26 21:38:19 UTC (rev 106037)
@@ -132,11 +132,6 @@
stopSnapRubberbandTimer();
}
-void ScrollElasticityController::endScrollGesture()
-{
- snapRubberBand();
-}
-
bool ScrollElasticityController::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
{
bool isMomentumScrollEvent = (wheelEvent.momentumPhase() != PlatformWheelEventPhaseNone);
@@ -148,6 +143,11 @@
return false;
}
+ if (wheelEvent.phase() == PlatformWheelEventPhaseEnded) {
+ snapRubberBand();
+ return true;
+ }
+
float deltaX = m_overflowScrollDelta.width();
float deltaY = m_overflowScrollDelta.height();
@@ -175,10 +175,10 @@
isHorizontallyStretched = stretchAmount.width();
isVerticallyStretched = stretchAmount.height();
- PlatformWheelEventPhase phase = wheelEvent.momentumPhase();
+ PlatformWheelEventPhase momentumPhase = wheelEvent.momentumPhase();
// If we are starting momentum scrolling then do some setup.
- if (!m_momentumScrollInProgress && (phase == PlatformWheelEventPhaseBegan || phase == PlatformWheelEventPhaseChanged))
+ if (!m_momentumScrollInProgress && (momentumPhase == PlatformWheelEventPhaseBegan || momentumPhase == PlatformWheelEventPhaseChanged))
m_momentumScrollInProgress = true;
CFTimeInterval timeDelta = wheelEvent.timestamp() - m_lastMomentumScrollTimestamp;
@@ -279,7 +279,7 @@
}
}
- if (m_momentumScrollInProgress && phase == PlatformWheelEventPhaseEnded) {
+ if (m_momentumScrollInProgress && momentumPhase == PlatformWheelEventPhaseEnded) {
m_momentumScrollInProgress = false;
m_ignoreMomentumScrolls = false;
m_lastMomentumScrollTimestamp = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes