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

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

Issue 1147283002: Add ScrollDirectionPhysical enum in Scroll types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a conflict on EventHandler 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
« no previous file with comments | « Source/core/layout/LayoutEmbeddedObject.cpp ('k') | Source/platform/scroll/ScrollTypes.h » ('j') | 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 6fa108829a0bdfd96d347cc402795b094050fbba..389529f86e087fe9e1b1bddc581f8e378fe8422a 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -563,7 +563,7 @@ bool EventHandler::scroll(ScrollDirection direction, ScrollGranularity granulari
LayoutBox* curBox = node->layoutObject()->enclosingBox();
while (curBox && !curBox->isLayoutView()) {
- ScrollDirection physicalDirection = toPhysicalDirection(
+ ScrollDirectionPhysical physicalDirection = toPhysicalDirection(
direction, curBox->isHorizontalWritingMode(), curBox->style()->isFlippedBlocksWritingMode());
// If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
@@ -606,7 +606,7 @@ bool EventHandler::bubblingScroll(ScrollDirection direction, ScrollGranularity g
LocalFrame* frame = m_frame;
FrameView* view = frame->view();
if (view) {
- ScrollDirection physicalDirection =
+ ScrollDirectionPhysical physicalDirection =
toPhysicalDirection(direction, view->isVerticalDocument(), view->isFlippedDocument());
if (view->scrollableArea()->scroll(physicalDirection, granularity)) {
setFrameWasScrolledByUser();
@@ -1793,11 +1793,11 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
// FIXME: enable scroll customization in this case. See crbug.com/410974.
if (wheelEvent->railsMode() != Event::RailsModeVertical
- && scroll(ScrollRight, granularity, startNode, &stopNode, wheelEvent->deltaX(), absolutePosition))
+ && scroll(ScrollRightIgnoringWritingMode, granularity, startNode, &stopNode, wheelEvent->deltaX(), absolutePosition))
wheelEvent->setDefaultHandled();
if (wheelEvent->railsMode() != Event::RailsModeHorizontal
- && scroll(ScrollDown, granularity, startNode, &stopNode, wheelEvent->deltaY(), absolutePosition))
+ && scroll(ScrollDownIgnoringWritingMode, granularity, startNode, &stopNode, wheelEvent->deltaY(), absolutePosition))
wheelEvent->setDefaultHandled();
if (!m_latchedWheelEventNode)
@@ -2283,10 +2283,10 @@ bool EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gesture
// First try to scroll the closest scrollable LayoutBox ancestor of |node|.
ScrollGranularity granularity = ScrollByPrecisePixel;
- bool horizontalScroll = scroll(ScrollLeft, granularity, node, &stopNode, delta.width());
+ bool horizontalScroll = scroll(ScrollLeftIgnoringWritingMode, granularity, node, &stopNode, delta.width());
if (!gestureEvent.preventPropagation())
stopNode = nullptr;
- bool verticalScroll = scroll(ScrollUp, granularity, node, &stopNode, delta.height());
+ bool verticalScroll = scroll(ScrollUpIgnoringWritingMode, granularity, node, &stopNode, delta.height());
scrolled = horizontalScroll || verticalScroll;
if (gestureEvent.preventPropagation())
@@ -3217,7 +3217,7 @@ void EventHandler::defaultSpaceEventHandler(KeyboardEvent* event)
if (!view)
return;
- ScrollDirection physicalDirection =
+ ScrollDirectionPhysical physicalDirection =
toPhysicalDirection(direction, view->isVerticalDocument(), view->isFlippedDocument());
if (view->scrollableArea()->scroll(physicalDirection, ScrollByPage))
« no previous file with comments | « Source/core/layout/LayoutEmbeddedObject.cpp ('k') | Source/platform/scroll/ScrollTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698