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

Unified Diff: Source/core/page/Page.cpp

Issue 1277583003: Restore scale even if scroll is not restored (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve readability Created 5 years, 4 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/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 7e853b78301b4311241797a0ac3a484bc4881356..4bd0a6802466e444b29da60d01b09e339281c1ea 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -304,24 +304,13 @@ void Page::setDefersLoading(bool defers)
}
}
-void Page::setPageScaleFactor(float scale, const IntPoint& origin)
+void Page::setPageScaleFactor(float scale)
{
if (!mainFrame()->isLocalFrame())
Nate Chapin 2015/08/06 21:02:00 This early exit looks like it's no longer necessar
majidvp 2015/08/06 21:25:36 Acknowledged.
return;
- FrameView* view = deprecatedLocalMainFrame()->view();
VisualViewport& viewport = frameHost().visualViewport();
-
- if (scale != viewport.scale()) {
- viewport.setScale(scale);
-
- chromeClient().pageScaleFactorChanged();
-
- deprecatedLocalMainFrame()->loader().saveScrollState();
- }
-
- if (view && view->scrollPosition() != origin)
- view->setScrollPosition(origin, ProgrammaticScroll);
+ viewport.setScale(scale);
Nate Chapin 2015/08/06 21:02:00 I think this function is now only called by Intern
majidvp 2015/08/06 21:25:36 That is true. The reasons I like to keep it are: 1
bokan 2015/08/07 15:08:01 I agree with Nate, these methods should be removed
}
float Page::pageScaleFactor() const

Powered by Google App Engine
This is Rietveld 408576698