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

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

Issue 2780953002: When historyEntryRequiresUserGesture is enabled, exempt docs that have been committed for 5 seconds (Closed)
Patch Set: Address ojan's comments Created 3 years, 8 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/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index b8767260da3b54447598a4982e67326047400931..b6f33410b2bf41cacbd87db7861192bb9aa81735 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -301,11 +301,8 @@ void DocumentLoader::updateForSameDocumentNavigation(
HistoryScrollRestorationType scrollRestorationType,
FrameLoadType type,
Document* initiatingDocument) {
- if (m_frame->settings()->getHistoryEntryRequiresUserGesture() &&
- initiatingDocument &&
- !initiatingDocument->frame()->hasReceivedUserGesture()) {
+ if (initiatingDocument && !initiatingDocument->canCreateHistoryEntry())
type = FrameLoadTypeReplaceCurrentItem;
- }
KURL oldURL = m_request.url();
m_originalRequest.setURL(newURL);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698