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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2541513004: Ensure scrollToFragmentAnchor called before restoreScrollPositionAndViewState. (Closed)
Patch Set: bokan@ comments addressed Created 4 years 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index b42da5159917ed6d0fa5d353d69374a060836dc3..c733773a103c56c20adc4c881007937051a169ec 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -643,6 +643,10 @@ void FrameView::setContentsSize(const IntSize& size) {
updateParentScrollableAreaSet();
page->chromeClient().contentsSizeChanged(m_frame.get(), size);
+
+ // Ensure the scrollToFragmentAnchor is called before
+ // restoreScrollPositionAndViewState when reload
Charlie Reis 2016/12/05 18:54:15 nit: when reloading. nit: End with period.
+ scrollToFragmentAnchor();
frame().loader().restoreScrollPositionAndViewState();
}
@@ -2379,7 +2383,6 @@ void FrameView::performPostLayoutTasks() {
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->notifyGeometryChanged();
- scrollToFragmentAnchor();
sendResizeEventIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698