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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2445193005: Route setHasReceivedUserGesture() state for RemoteFrames (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 // Generate start and stop notifications only when loader is completed so that 778 // Generate start and stop notifications only when loader is completed so that
779 // we don't fire them for fragment redirection that happens in window.onload 779 // we don't fire them for fragment redirection that happens in window.onload
780 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838 780 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838
781 if (m_frame->document()->loadEventFinished()) 781 if (m_frame->document()->loadEventFinished())
782 client()->didStartLoading(NavigationWithinSameDocument); 782 client()->didStartLoading(NavigationWithinSameDocument);
783 783
784 HistoryCommitType historyCommitType = loadTypeToCommitType(type); 784 HistoryCommitType historyCommitType = loadTypeToCommitType(type);
785 if (!m_currentItem) 785 if (!m_currentItem)
786 historyCommitType = HistoryInertCommit; 786 historyCommitType = HistoryInertCommit;
787 if (m_frame->settings()->historyEntryRequiresUserGesture()) { 787 if (m_frame->settings()->historyEntryRequiresUserGesture() &&
788 if (initiatingDocument && !initiatingDocument->hasReceivedUserGesture()) 788 initiatingDocument && !initiatingDocument->hasReceivedUserGesture()) {
789 historyCommitType = HistoryInertCommit; 789 historyCommitType = HistoryInertCommit;
790 else if (historyCommitType == StandardCommit)
791 m_frame->document()->clearHasReceivedUserGesture();
792 } 790 }
793 791
794 setHistoryItemStateForCommit( 792 setHistoryItemStateForCommit(
795 type, historyCommitType, 793 type, historyCommitType,
796 sameDocumentNavigationSource == SameDocumentNavigationHistoryApi 794 sameDocumentNavigationSource == SameDocumentNavigationHistoryApi
797 ? HistoryNavigationType::HistoryApi 795 ? HistoryNavigationType::HistoryApi
798 : HistoryNavigationType::Fragment); 796 : HistoryNavigationType::Fragment);
799 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { 797 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) {
800 m_currentItem->setStateObject(std::move(data)); 798 m_currentItem->setStateObject(std::move(data));
801 m_currentItem->setScrollRestorationType(scrollRestorationType); 799 m_currentItem->setScrollRestorationType(scrollRestorationType);
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 m_documentLoader ? m_documentLoader->url() : String()); 1931 m_documentLoader ? m_documentLoader->url() : String());
1934 return tracedValue; 1932 return tracedValue;
1935 } 1933 }
1936 1934
1937 inline void FrameLoader::takeObjectSnapshot() const { 1935 inline void FrameLoader::takeObjectSnapshot() const {
1938 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1936 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1939 toTracedValue()); 1937 toTracedValue());
1940 } 1938 }
1941 1939
1942 } // namespace blink 1940 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698