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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2652643004: Make PageScaleFactor work for oopif subframes.
Patch Set: Fix patch gardening error: GesturePinch routing tests. Created 3 years, 11 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: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 24b4a63d43c5123611eee2045d8400145599a277..d00788375e1777320690be32430200d15521c850 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1442,6 +1442,7 @@ void FrameLoader::restoreScrollPositionAndViewState() {
}
VisualViewport& visualViewport = m_frame->host()->visualViewport();
+ float originalScale = visualViewport.scale();
if (shouldRestoreScale && shouldRestoreScroll) {
visualViewport.setScaleAndLocation(m_currentItem->pageScaleFactor(),
FloatPoint(visualViewportOffset));
@@ -1450,6 +1451,9 @@ void FrameLoader::restoreScrollPositionAndViewState() {
} else if (shouldRestoreScroll) {
visualViewport.setLocation(FloatPoint(visualViewportOffset));
}
+ // If necessary, notify client we've restored page scale.
+ if (shouldRestoreScale && (originalScale != visualViewport.scale()))
+ client()->didRestorePageScaleFactorOnLoad(visualViewport.scale());
kenrb 2017/01/24 17:13:27 I am not clear on why this is necessary. Does this
wjmaclean 2017/01/24 18:24:26 Hmm, I don't think so, otherwise one would not exp
kenrb 2017/01/24 18:47:30 What I meant was, if the frames have been destroye
if (ScrollingCoordinator* scrollingCoordinator =
m_frame->page()->scrollingCoordinator())

Powered by Google App Engine
This is Rietveld 408576698