| 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 9985fcf17ee6f5096f710bf35ea8f955a09db7b3..a9b006a5e0fd2e577dc4ce1481377b358d96025b 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -273,6 +273,11 @@ void FrameView::reset() {
|
| m_orthogonalWritingModeRootList.clear();
|
| }
|
|
|
| +void FrameView::setScrollFromNavigation() {
|
| + scrollToFragmentAnchor();
|
| + frame().loader().restoreScrollPositionAndViewState();
|
| +}
|
| +
|
| // Call function for each non-throttled frame view in pre tree order.
|
| // Note it needs a null check of the frame's layoutView to access it in case of
|
| // detached frames.
|
| @@ -547,7 +552,7 @@ void FrameView::setFrameRect(const IntRect& newRect) {
|
| if (m_frame->isMainFrame())
|
| m_frame->host()->visualViewport().mainFrameDidChangeSize();
|
|
|
| - frame().loader().restoreScrollPositionAndViewState();
|
| + setScrollFromNavigation();
|
| }
|
| }
|
|
|
| @@ -668,10 +673,7 @@ void FrameView::setContentsSize(const IntSize& size) {
|
|
|
| page->chromeClient().contentsSizeChanged(m_frame.get(), size);
|
|
|
| - // Ensure the scrollToFragmentAnchor is called before
|
| - // restoreScrollPositionAndViewState when reload
|
| - scrollToFragmentAnchor();
|
| - frame().loader().restoreScrollPositionAndViewState();
|
| + setScrollFromNavigation();
|
| }
|
|
|
| void FrameView::adjustViewSize() {
|
|
|