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

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: 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/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index d26cd614a18903911ad11f4746158ee73bb540f4..be71ef73b40fa8580b11558f8c0293949443cb6b 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -942,7 +942,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
@@ -984,7 +984,9 @@ bool EventHandler::bubblingScroll(ScrollDirection direction, ScrollGranularity g
return true;
LocalFrame* frame = m_frame;
FrameView* view = frame->view();
- if (view && view->scrollableArea()->scroll(direction, granularity)) {
+ ScrollDirectionPhysical physicalDirection =
+ toPhysicalDirection(direction, view->isVerticalDocument(), view->isFlippedDocument());
+ if (view && view->scrollableArea()->scroll(physicalDirection, granularity)) {
setFrameWasScrolledByUser();
return true;
}
@@ -3650,7 +3652,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))

Powered by Google App Engine
This is Rietveld 408576698