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

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

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a 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 8c090076b48b4fd2d09587626eda78be510a0625..ce1647623a9e497abc02b92c44c079e3526757ea 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) {
ASSERT(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