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

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

Issue 879333002: Support buttons attribute for drag event (blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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 | « Source/core/page/DragData.cpp ('k') | Source/web/WebInputEventConversion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 7a28dc96a1595b2563160f4a90c81bb79951cbe9..9eb6d7f4b899f794ade84760de6ffd353d3c08d7 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1646,14 +1646,12 @@ bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Node* dragTa
if (!view)
return false;
- // FIXME: The drag event have to support for |buttons| attribute because
- // the event is derived from mouse event. Please see crbug.com/276941.
RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType,
true, true, m_frame->document()->domWindow(),
0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(),
event.movementDelta().x(), event.movementDelta().y(),
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
- 0, 0, nullptr, dataTransfer);
+ 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, dataTransfer);
dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION);
return me->defaultPrevented();
« no previous file with comments | « Source/core/page/DragData.cpp ('k') | Source/web/WebInputEventConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698