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

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

Issue 2898423002: Reset scroll and scale while toggling "Request desktop site" (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | 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 88a37090d94e7a300e77612224a34c69260eede3..1b6492b2c31aefcf2ac1a872c454ff793dbc7432 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1105,6 +1105,10 @@ void FrameLoader::RestoreScrollPositionAndViewStateForLoadType(
bool should_restore_scroll =
history_item->ScrollRestorationType() != kScrollRestorationManual;
bool should_restore_scale = history_item->PageScaleFactor();
+ if (!frame_->GetSettings()->GetViewportMetaEnabled()) {
aelias_OOO_until_Jul13 2017/05/25 02:56:08 Unfortunately, there are indeed side effects: 1. O
jaebaek 2017/05/25 04:10:34 Does it mean that I must add a parameter which let
+ should_restore_scroll = false;
+ should_restore_scale = false;
+ }
// This tries to balance:
// 1. restoring as soon as possible
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698