Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Unified Diff: Source/core/page/EventHandler.cpp

Issue 472463002: On some webpages, touch scrolling speed is too slow / fast (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed values in tests to address precision issues. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 0ebaf637de48208ea8abef9b6889e0b2f92654d2..d40aac41a1ab9ee03ff5328023c6b9d29c0cc583 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2424,9 +2424,6 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
if (delta.isZero())
return false;
- const float scaleFactor = m_frame->pageZoomFactor();
- delta.scale(1 / scaleFactor, 1 / scaleFactor);
-
Node* node = m_scrollGestureHandlingNode.get();
if (!node)
return sendScrollEventToView(gestureEvent, delta);
@@ -2469,7 +2466,7 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
return sendScrollEventToView(gestureEvent, delta);
}
-bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEvent, const FloatSize& scaledDelta)
+bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEvent, const FloatSize& delta)
{
FrameView* view = m_frame->view();
if (!view)
@@ -2479,8 +2476,8 @@ bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEven
IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalPosition().y());
PlatformWheelEvent syntheticWheelEvent(point, globalPoint,
- scaledDelta.width(), scaledDelta.height(),
- scaledDelta.width() / tickDivisor, scaledDelta.height() / tickDivisor,
+ delta.width(), delta.height(),
+ delta.width() / tickDivisor, delta.height() / tickDivisor,
ScrollByPixelWheelEvent,
gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
syntheticWheelEvent.setHasPreciseScrollingDeltas(true);
« no previous file with comments | « LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-zoomed-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698