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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2467433002: Check scrollRestorationType explicitly in FrameLoader::processFragment() (Closed)
Patch Set: fix Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698