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

Unified Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 1557993002: Add scroll units in GestureEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test on Mac Created 4 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 | « third_party/WebKit/Source/web/WebInputEvent.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebInputEventConversion.cpp
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
index d10f2c14f0bfdf7d5d776952ce7f2a82562d79d0..95ac99cc3b348be4a638cb05f7a27285503c3b03 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -204,6 +204,19 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W
m_data.m_scroll.m_velocityY = e.data.scrollUpdate.velocityY;
m_data.m_scroll.m_preventPropagation = e.data.scrollUpdate.preventPropagation;
m_data.m_scroll.m_inertial = e.data.scrollUpdate.inertial;
+ switch (e.data.scrollUpdate.deltaUnits) {
+ case WebGestureEvent::ScrollUnits::PrecisePixels:
+ m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPrecisePixel;
+ break;
+ case WebGestureEvent::ScrollUnits::Pixels:
+ m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPixel;
+ break;
+ case WebGestureEvent::ScrollUnits::Page:
+ m_data.m_scroll.m_deltaUnits = ScrollGranularity::ScrollByPage;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
break;
case WebInputEvent::GestureTap:
m_type = PlatformEvent::GestureTap;
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEvent.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698