| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| index 031199d6675b7907a7f77c7e2eb8dc81a63a6c7d..bcea454f7557c90093ad816a74a70254c2bb3fc1 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -1512,13 +1512,16 @@ void FrameLoader::processFragment(const KURL& url,
|
| ->setSafeToPropagateScrollToParent(false);
|
| }
|
|
|
| - // If scroll position is restored from history fragment then we should not
|
| - // override it unless this is a same document reload.
|
| + // If scroll position is restored from history fragment or scroll
|
| + // restoration type is manual, then we should not override it unless this
|
| + // is a same document reload.
|
| bool shouldScrollToFragment =
|
| (loadStartType == NavigationWithinSameDocument &&
|
| !isBackForwardLoadType(m_loadType)) ||
|
| (documentLoader() &&
|
| - !documentLoader()->initialScrollState().didRestoreFromHistory);
|
| + !documentLoader()->initialScrollState().didRestoreFromHistory &&
|
| + !(m_currentItem &&
|
| + m_currentItem->scrollRestorationType() == ScrollRestorationManual));
|
|
|
| view->processUrlFragment(url, shouldScrollToFragment
|
| ? FrameView::UrlFragmentScroll
|
|
|