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

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

Issue 2257743002: Restore user state on ReloadwithoutSubResourceCacheRevalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix webkit_unit_tests Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | 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 0eb7138c45286ea4e9666d26bf2644b00a2aa9fc..6f21d56f6997cd27b46b5101326c1b9ff206b619 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -122,11 +122,8 @@ bool isReloadLoadType(FrameLoadType type)
static bool needsHistoryItemRestore(FrameLoadType type)
{
- // TODO(toyoshim): Check if this should return true for
- // FrameLoadTypeReloadMainResource.
- return type == FrameLoadTypeBackForward
- || type == FrameLoadTypeReload
- || type == FrameLoadTypeReloadBypassingCache;
+ // TODO(toyoshim): Shall we return true for FrameLoadTypeInitialHistoryLoad too?
+ return type == FrameLoadTypeBackForward || isReloadLoadType(type);
}
// static
@@ -1200,7 +1197,7 @@ void FrameLoader::restoreScrollPositionAndViewState()
return;
bool shouldRestoreScroll = m_currentItem->scrollRestorationType() != ScrollRestorationManual;
- bool shouldRestoreScale = m_currentItem->pageScaleFactor();
+ bool shouldRestoreScale = m_currentItem->pageScaleFactor() && !(m_frame->page()->settings().loadWithOverviewMode() && isReloadLoadType(m_loadType));
Takashi Toyoshima 2016/08/29 06:42:04 In terms of UI design policy to handle scroll posi
// This tries to balance:
// 1. restoring as soon as possible
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698