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

Unified Diff: Source/core/frame/RootFrameViewport.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/frame/RootFrameViewport.cpp
diff --git a/Source/core/frame/RootFrameViewport.cpp b/Source/core/frame/RootFrameViewport.cpp
index e4bb2ae60eb5777fe8a20f3f53ea339fb35d7cd0..4d9db6c637bbb0b968f78cd36b83047d2a50924f 100644
--- a/Source/core/frame/RootFrameViewport.cpp
+++ b/Source/core/frame/RootFrameViewport.cpp
@@ -276,15 +276,13 @@ GraphicsLayer* RootFrameViewport::layerForVerticalScrollbar() const
return layoutViewport().layerForVerticalScrollbar();
}
-bool RootFrameViewport::scroll(ScrollDirection direction, ScrollGranularity granularity, float delta)
+bool RootFrameViewport::scroll(ScrollDirectionPhysical direction, ScrollGranularity granularity, float delta)
{
- ASSERT(!isLogical(direction));
-
updateScrollAnimator();
ScrollbarOrientation orientation;
- if (direction == ScrollUp || direction == ScrollDown)
+ if (direction == ScrollPhysicalUp || direction == ScrollPhysicalDown)
orientation = VerticalScrollbar;
else
orientation = HorizontalScrollbar;

Powered by Google App Engine
This is Rietveld 408576698