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

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

Issue 2320303002: Reset VisualViewport position after same page navigation (Closed)
Patch Set: change test to async test Created 4 years, 3 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/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index fe3e99ea8e0f9a28f94f496c9aba209c8ad98917..ea5b0c15824ec920aaf888c67505387995d6d29d 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -436,6 +436,11 @@ void Page::didCommitLoad(LocalFrame* frame)
useCounter().didCommitLoad();
deprecation().clearSuppression();
frameHost().visualViewport().sendUMAMetrics();
+
+ // Need reset visual viewport position here since before this will change the history current item,
bokan 2016/09/15 18:27:32 Nit: "Need reset visual" -> "Need to reset the vis
+ // Page::didCommitLoad is after a new history item is created in FrameLoader.
bokan 2016/09/15 18:27:32 Nit: "didCommitLoad is after" -> "didCommitLoad is
+ // fix for crbug.com/642279
+ frameHost().visualViewport().setScrollPosition(DoublePoint(), ProgrammaticScroll);
m_hostsUsingFeatures.updateMeasurementsAndClear();
UserGestureIndicator::clearProcessedUserGestureSinceLoad();
}

Powered by Google App Engine
This is Rietveld 408576698