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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h

Issue 2625773002: Reenable framebusting (Closed)
Patch Set: Created 3 years, 11 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/DocumentUserGestureToken.h
diff --git a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
index d4cd560b21112be05f6d9490d75fc9094af9825b..0c47ab2a64071a25f87ab322aebdee6923860a53 100644
--- a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
+++ b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
@@ -36,9 +36,12 @@ class DocumentUserGestureToken final : public UserGestureToken {
DocumentUserGestureToken(Status status) : UserGestureToken(status) {}
static void setHasReceivedUserGesture(Document* document) {
- if (!document || document->hasReceivedUserGesture())
+ if (!document || !document->frame() ||
+ document->frame()->hasReceivedUserGesture()) {
return;
- document->setHasReceivedUserGesture();
+ }
+
+ document->frame()->setDocumentHasReceivedUserGesture();
dcheng 2017/01/12 10:41:00 Nit: perhaps remove 'document' from the name, sinc
for (Frame* frame = document->frame()->tree().parent(); frame;
frame = frame->tree().parent()) {
frame->setDocumentHasReceivedUserGesture();

Powered by Google App Engine
This is Rietveld 408576698