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

Unified Diff: Source/core/frame/PinchViewport.cpp

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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/frame/PinchViewport.h ('k') | Source/core/frame/RootFrameViewport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/PinchViewport.cpp
diff --git a/Source/core/frame/PinchViewport.cpp b/Source/core/frame/PinchViewport.cpp
index 55aa69ab3e549818e28c92c09a95b35d534c42d4..73b443b684c7fc3c8dea81644d36bdb38185d9d5 100644
--- a/Source/core/frame/PinchViewport.cpp
+++ b/Source/core/frame/PinchViewport.cpp
@@ -243,7 +243,7 @@ bool PinchViewport::magnifyScaleAroundAnchor(float magnifyDelta, const FloatPoin
FloatSize anchorDeltaUnusedByScroll = anchorDelta;
FrameView* view = mainFrame()->view();
DoublePoint oldPosition = view->scrollPositionDouble();
- view->scrollBy(DoubleSize(anchorDelta.width(), anchorDelta.height()));
+ view->scrollBy(DoubleSize(anchorDelta.width(), anchorDelta.height()), UserScroll);
DoublePoint newPosition = view->scrollPositionDouble();
anchorDeltaUnusedByScroll = anchorDelta - toFloatSize(newPosition - oldPosition);
@@ -526,12 +526,12 @@ void PinchViewport::invalidateScrollbarRect(Scrollbar*, const IntRect&)
// be updated when the viewport is synced to the CC.
}
-void PinchViewport::setScrollOffset(const IntPoint& offset)
+void PinchViewport::setScrollOffset(const IntPoint& offset, ScrollType scrollType)
{
- setScrollOffset(DoublePoint(offset));
+ setScrollOffset(DoublePoint(offset), scrollType);
}
-void PinchViewport::setScrollOffset(const DoublePoint& offset)
+void PinchViewport::setScrollOffset(const DoublePoint& offset, ScrollType)
{
setLocation(toFloatPoint(offset));
}
« no previous file with comments | « Source/core/frame/PinchViewport.h ('k') | Source/core/frame/RootFrameViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698