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

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

Issue 11826009: Merge 139022 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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/platform/chromium/fast/events/touch/gesture/touch-gesture-scroll-div-scaled-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/EventHandler.cpp
===================================================================
--- Source/WebCore/page/EventHandler.cpp (revision 139114)
+++ Source/WebCore/page/EventHandler.cpp (working copy)
@@ -2593,10 +2593,13 @@
bool EventHandler::handleGestureScrollCore(const PlatformGestureEvent& gestureEvent, PlatformWheelEventGranularity granularity, bool latchedWheel)
{
const float tickDivisor = (float)WheelEvent::tickMultiplier;
+ const float scaleFactor = m_frame->pageZoomFactor() * m_frame->frameScaleFactor();
+ float scaledDeltaX = gestureEvent.deltaX() / scaleFactor;
+ float scaledDeltaY = gestureEvent.deltaY() / scaleFactor;
IntPoint point(gestureEvent.position().x(), gestureEvent.position().y());
IntPoint globalPoint(gestureEvent.globalPosition().x(), gestureEvent.globalPosition().y());
PlatformWheelEvent syntheticWheelEvent(point, globalPoint,
- gestureEvent.deltaX(), gestureEvent.deltaY(), gestureEvent.deltaX() / tickDivisor, gestureEvent.deltaY() / tickDivisor,
+ scaledDeltaX, scaledDeltaY, scaledDeltaX / tickDivisor, scaledDeltaY / tickDivisor,
granularity,
gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
syntheticWheelEvent.setUseLatchedEventNode(latchedWheel);
« no previous file with comments | « LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-scroll-div-scaled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698