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

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

Issue 2652643004: Make PageScaleFactor work for oopif subframes.
Patch Set: Put function prototype in correct place. 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
if (ScrollingCoordinator* scrollingCoordinator =
m_frame->page()->scrollingCoordinator())
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698