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

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

Issue 2445193005: Route setHasReceivedUserGesture() state for RemoteFrames (Closed)
Patch Set: 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/DocumentUserGestureToken.h
diff --git a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
index fda12fb8b215bc702c3048b350d4a0270fc53322..a5e7ef5530edfc61c76becda8f691f7265065246 100644
--- a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
+++ b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
@@ -28,14 +28,12 @@ class DocumentUserGestureToken final : public UserGestureToken {
private:
DocumentUserGestureToken(Document* document, Status status)
: UserGestureToken(status) {
- if (!document)
+ if (!document || document->hasReceivedUserGesture())
return;
document->setHasReceivedUserGesture();
for (Frame* frame = document->frame()->tree().parent(); frame;
frame = frame->tree().parent()) {
- // TODO(japhet): Make this work for RemoteFrames: http://crbug.com/658800
- if (frame->isLocalFrame())
- toLocalFrame(frame)->document()->setHasReceivedUserGesture();
+ frame->setDocumentHasReceivedUserGesture();
}
}
};

Powered by Google App Engine
This is Rietveld 408576698