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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
Index: Source/core/frame/LocalFrame.cpp
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
index edd58bd52392b820387fa793d139f5e92d9a2a43..4dde004b38cfdd3eedb4703ec2ffa8caac0dc458 100644
--- a/Source/core/frame/LocalFrame.cpp
+++ b/Source/core/frame/LocalFrame.cpp
@@ -520,7 +520,9 @@ void LocalFrame::setPageAndTextZoomFactors(float pageZoomFactor, float textZoomF
// Update the scroll position when doing a full page zoom, so the content stays in relatively the same position.
LayoutPoint scrollPosition = view->scrollPosition();
float percentDifference = (pageZoomFactor / m_pageZoomFactor);
- view->setScrollPosition(DoublePoint(scrollPosition.x() * percentDifference, scrollPosition.y() * percentDifference));
+ view->setScrollPosition(
+ DoublePoint(scrollPosition.x() * percentDifference, scrollPosition.y() * percentDifference),
+ ProgrammaticScroll);
skobes 2015/06/04 23:35:47 Why is this a programmatic scroll? It seems conce
bokan 2015/06/05 15:15:23 I guess it could be argued either way, my view is
skobes 2015/06/05 15:53:57 It would be nice to have a comment on the ScrollTy
bokan 2015/06/05 20:35:35 Good point, I'll add it once the rest of my patche
}
}

Powered by Google App Engine
This is Rietveld 408576698