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

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

Issue 2780953002: When historyEntryRequiresUserGesture is enabled, exempt docs that have been committed for 5 seconds (Closed)
Patch Set: Centralize checking the setting Created 3 years, 9 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
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 9bf96ddcd733106da3f6ae343384375306b4939f..b498b010d20dcd151648dfd55ade1647521d0210 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -714,9 +714,7 @@ void FrameLoader::updateForSameDocumentNavigation(
HistoryCommitType historyCommitType = loadTypeToCommitType(type);
if (!m_currentItem)
historyCommitType = HistoryInertCommit;
- if (m_frame->settings()->getHistoryEntryRequiresUserGesture() &&
- initiatingDocument &&
- !initiatingDocument->frame()->hasReceivedUserGesture()) {
+ if (initiatingDocument && !initiatingDocument->canCreateHistoryEntry()) {
historyCommitType = HistoryInertCommit;
}
@@ -860,9 +858,8 @@ FrameLoadType FrameLoader::determineFrameLoadType(
m_documentLoader->loadType() == FrameLoadTypeReload)
return FrameLoadTypeReload;
- if (m_frame->settings()->getHistoryEntryRequiresUserGesture() &&
- request.originDocument() &&
- !request.originDocument()->frame()->hasReceivedUserGesture())
+ if (request.originDocument() &&
+ !request.originDocument()->canCreateHistoryEntry())
return FrameLoadTypeReplaceCurrentItem;
return FrameLoadTypeStandard;

Powered by Google App Engine
This is Rietveld 408576698