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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2392773002: Reenable framebusting deprecation, change it to allow navigation if iframe has ever had a user gestu (Closed)
Patch Set: TODOs and TouchEventmanager 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 5606598fa859438ab1a364163af1311c9c551b49..333bb5da9caa62fe6921a40f72b008c921b710c9 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -465,6 +465,7 @@ Document::Document(const DocumentInit& initializer,
m_hasXMLDeclaration(0),
m_designMode(false),
m_isRunningExecCommand(false),
+ m_hasReceivedUserGesture(false),
m_hasAnnotatedRegions(false),
m_annotatedRegionsDirty(false),
m_useSecureKeyboardEntryWhenActive(false),
@@ -3386,6 +3387,10 @@ MouseEventWithHitTestResults Document::performMouseEventHitTest(
const LayoutPoint& documentPoint,
const PlatformMouseEvent& event) {
DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView());
+ // TODO(japhet): UserGestureIndicator should setHasReceivedUserGesture()
+ // on the Document.
+ if (UserGestureIndicator::processingUserGesture())
+ m_hasReceivedUserGesture = true;
// LayoutView::hitTest causes a layout, and we don't want to hit that until
// the first layout because until then, there is nothing shown on the screen -

Powered by Google App Engine
This is Rietveld 408576698