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

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

Issue 52893003: scrollTop and scrollLeft always 0 in DOMContentLoaded handler on a scrolled page (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 4b3db84303fd77417009ede4fe373fbce15d4802..92e386aa7c3c50281f65539cf2a9217fc95a32a8 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1041,7 +1041,10 @@ void FrameLoader::checkLoadCompleteForThisFrame()
void FrameLoader::didFirstLayout()
{
- if (m_frame->page() && isBackForwardLoadType(m_loadType))
+ if (!m_frame->page())
+ return;
+
+ if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
history()->restoreScrollPositionAndViewState();
}
« no previous file with comments | « LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698