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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2898423002: Reset scroll and scale while toggling "Request desktop site" (Closed)
Patch Set: [WIP] Page is zoomed in while toggling "Request desktop site" 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/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 25ac5094e6346d6e8c8e380599cbe1ed867760e5..3f3ec4a69eb24a87555176a97befe349c65c982d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -79,6 +79,7 @@
#include "core/layout/TextAutosizer.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
+#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderStateMachine.h"
@@ -3314,6 +3315,9 @@ void WebViewImpl::ResetScrollAndScaleState() {
scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll);
}
+ if (Document* document = ToLocalFrame(GetPage()->MainFrame())->GetDocument())
+ document->Loader()->GetHistoryItem()->SetDidSaveScrollOrScaleState(false);
aelias_OOO_until_Jul13 2017/06/06 02:57:30 This seems reasonable to me. Could you add a unit
+
GetPageScaleConstraintsSet().SetNeedsReset(true);
}
« 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