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

Unified Diff: Source/web/WebPluginContainerImpl.cpp

Issue 1147283002: Add ScrollDirectionPhysical enum in Scroll types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
Index: Source/web/WebPluginContainerImpl.cpp
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp
index 7057f128c57690eb3cbadea8dd5d837515d24557..91bb6469224ceae80ddcd7d977298f5372727d01 100644
--- a/Source/web/WebPluginContainerImpl.cpp
+++ b/Source/web/WebPluginContainerImpl.cpp
@@ -922,7 +922,7 @@ void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event)
}
}
-static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDirection positiveDirection, ScrollDirection negativeDirection, float delta)
+static inline bool gestureScrollHelper(ScrollbarGroup* scrollbarGroup, ScrollDirectionPhysical positiveDirection, ScrollDirectionPhysical negativeDirection, float delta)
{
if (!delta)
return false;
@@ -946,9 +946,9 @@ void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event)
if (webEvent.type == WebInputEvent::GestureScrollUpdate) {
if (!m_scrollbarGroup)
return;
- if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollLeft, ScrollRight, webEvent.data.scrollUpdate.deltaX))
+ if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollPhysicalLeft, ScrollPhysicalRight, webEvent.data.scrollUpdate.deltaX))
event->setDefaultHandled();
- if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollUp, ScrollDown, webEvent.data.scrollUpdate.deltaY))
+ if (gestureScrollHelper(m_scrollbarGroup.get(), ScrollPhysicalUp, ScrollPhysicalDown, webEvent.data.scrollUpdate.deltaY))
event->setDefaultHandled();
}
// FIXME: Can a plugin change the cursor from a touch-event callback?

Powered by Google App Engine
This is Rietveld 408576698