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

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

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a Created 4 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
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 983da54d2946b42c414fe22086963c0c496f1dbd..7ba56550c6e2e770195322252ca587a055f7fe84 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -395,7 +395,7 @@ void FrameLoader::setHistoryItemStateForCommit(
HistoryNavigationType navigationType) {
if (m_frame->settings()->historyEntryRequiresUserGesture() &&
historyCommitType == StandardCommit)
- UserGestureIndicator::clearProcessedUserGestureSinceLoad();
+ m_frame->document()->clearHasReceivedUserGesture();
HistoryItem* oldItem = m_currentItem;
if (isBackForwardLoadType(loadType) && m_provisionalItem)
@@ -784,8 +784,7 @@ void FrameLoader::updateForSameDocumentNavigation(
if (!m_currentItem)
historyCommitType = HistoryInertCommit;
if (m_frame->settings()->historyEntryRequiresUserGesture() &&
- !UserGestureIndicator::processedUserGestureSinceLoad() &&
- initiatingDocument)
+ !m_frame->document()->hasReceivedUserGesture() && initiatingDocument)
ojan 2016/10/18 16:39:49 What happens in this case? 1. Load a top-level pag
Nate Chapin 2016/10/18 23:26:33 Hrm. This should probably be using initiatingDocum
ojan 2016/10/18 23:40:25 Right. And that means it gets a history entry?
historyCommitType = HistoryInertCommit;
setHistoryItemStateForCommit(
@@ -931,7 +930,7 @@ FrameLoadType FrameLoader::determineFrameLoadType(
return FrameLoadTypeReload;
if (m_frame->settings()->historyEntryRequiresUserGesture() &&
- !UserGestureIndicator::processedUserGestureSinceLoad() &&
+ !m_frame->document()->hasReceivedUserGesture() &&
request.originDocument())
return FrameLoadTypeReplaceCurrentItem;

Powered by Google App Engine
This is Rietveld 408576698