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

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

Issue 2320303002: Reset VisualViewport position after same page navigation (Closed)
Patch Set: update comments and 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..20e1482c73b00932f4e986601868a090bc57f94e 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 to ensure that the scroll position is correct
+ // when we navigate to same page after scale(zoom-in/zoom-out)
+ // fix for crbug.com/642279
bokan 2016/09/15 16:03:47 This change still doesn't address what I wrote bef
+ frameHost().visualViewport().setScrollPosition(DoublePoint(), ProgrammaticScroll);
m_hostsUsingFeatures.updateMeasurementsAndClear();
UserGestureIndicator::clearProcessedUserGestureSinceLoad();
}

Powered by Google App Engine
This is Rietveld 408576698