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

Unified Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Rebase 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/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index 5f2b5a7af08209d10865e5562a07c4b49745ad10..36f46d356c2d51687be1819b9512ea0b436b2309 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -34,6 +34,7 @@
#include "core/clipboard/DataTransferAccessPolicy.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentFragment.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "core/dom/Element.h"
#include "core/dom/Node.h"
#include "core/dom/Text.h"
@@ -241,6 +242,8 @@ bool DragController::performDrag(DragData* dragData) {
DCHECK(dragData);
m_documentUnderMouse = m_page->deprecatedLocalMainFrame()->documentAtPoint(
dragData->clientPosition());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(
+ m_documentUnderMouse, UserGestureToken::NewGesture));
if ((m_dragDestinationAction & DragDestinationActionDHTML) &&
m_documentIsHandlingDrag) {
LocalFrame* mainFrame = m_page->deprecatedLocalMainFrame();

Powered by Google App Engine
This is Rietveld 408576698