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

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

Issue 208853006: Drop event should generate user gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 46cc10ac68d72c386d2dc518a8ae9a8ca2a49562..e0d374aeacf123108ec999f3d9a6166e4514a53a 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -68,6 +68,7 @@
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
#include "platform/DragImage.h"
+#include "platform/UserGestureIndicator.h"
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/Image.h"
#include "platform/graphics/ImageOrientation.h"
@@ -237,6 +238,8 @@ DragSession DragController::dragUpdated(DragData* dragData)
bool DragController::performDrag(DragData* dragData)
abarth-chromium 2014/03/24 03:51:29 Are you sure this can't be triggered by script?
wjywbs 2014/03/24 12:14:10 I tried to use script to trigger this function and
{
ASSERT(dragData);
+ UserGestureIndicator gesture(DefinitelyProcessingNewUserGesture);
+
m_documentUnderMouse = m_page->mainFrame()->documentAtPoint(dragData->clientPosition());
if ((m_dragDestinationAction & DragDestinationActionDHTML) && m_documentIsHandlingDrag) {
RefPtr<LocalFrame> mainFrame = m_page->mainFrame();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698