| 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 9b34e0ffcfb6d74f50b31fea2d377a344909514d..21ebb27a45c63282e458d10566a91706d621b098 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -393,10 +393,6 @@ void FrameLoader::setHistoryItemStateForCommit(
|
| FrameLoadType loadType,
|
| HistoryCommitType historyCommitType,
|
| HistoryNavigationType navigationType) {
|
| - if (m_frame->settings()->historyEntryRequiresUserGesture() &&
|
| - historyCommitType == StandardCommit)
|
| - UserGestureIndicator::clearProcessedUserGestureSinceLoad();
|
| -
|
| HistoryItem* oldItem = m_currentItem;
|
| if (isBackForwardLoadType(loadType) && m_provisionalItem)
|
| m_currentItem = m_provisionalItem.release();
|
| @@ -789,10 +785,12 @@ void FrameLoader::updateForSameDocumentNavigation(
|
| HistoryCommitType historyCommitType = loadTypeToCommitType(type);
|
| if (!m_currentItem)
|
| historyCommitType = HistoryInertCommit;
|
| - if (m_frame->settings()->historyEntryRequiresUserGesture() &&
|
| - !UserGestureIndicator::processedUserGestureSinceLoad() &&
|
| - initiatingDocument)
|
| - historyCommitType = HistoryInertCommit;
|
| + if (m_frame->settings()->historyEntryRequiresUserGesture()) {
|
| + if (initiatingDocument && !initiatingDocument->hasReceivedUserGesture())
|
| + historyCommitType = HistoryInertCommit;
|
| + else if (historyCommitType == StandardCommit)
|
| + m_frame->document()->clearHasReceivedUserGesture();
|
| + }
|
|
|
| setHistoryItemStateForCommit(
|
| type, historyCommitType,
|
| @@ -937,8 +935,8 @@ FrameLoadType FrameLoader::determineFrameLoadType(
|
| return FrameLoadTypeReload;
|
|
|
| if (m_frame->settings()->historyEntryRequiresUserGesture() &&
|
| - !UserGestureIndicator::processedUserGestureSinceLoad() &&
|
| - request.originDocument())
|
| + request.originDocument() &&
|
| + !request.originDocument()->hasReceivedUserGesture())
|
| return FrameLoadTypeReplaceCurrentItem;
|
|
|
| return FrameLoadTypeStandard;
|
|
|