Index: Source/web/WebPluginContainerImpl.cpp |
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp |
index a45bde39db962415608adcb93c1e4064fcecabb8..36d8bc1f21239d631294b7e8f4e9c992b92338ed 100644 |
--- a/Source/web/WebPluginContainerImpl.cpp |
+++ b/Source/web/WebPluginContainerImpl.cpp |
@@ -39,6 +39,7 @@ |
#include "core/HTMLNames.h" |
#include "core/clipboard/DataObject.h" |
#include "core/clipboard/DataTransfer.h" |
+#include "core/events/DragEvent.h" |
#include "core/events/GestureEvent.h" |
#include "core/events/KeyboardEvent.h" |
#include "core/events/MouseEvent.h" |
@@ -200,6 +201,8 @@ void WebPluginContainerImpl::handleEvent(Event* event) |
handleTouchEvent(toTouchEvent(event)); |
else if (event->isGestureEvent()) |
handleGestureEvent(toGestureEvent(event)); |
+ else if (event->isDragEvent() && m_webPlugin->canProcessDrag()) |
+ handleDragEvent(toDragEvent(event)); |
// FIXME: it would be cleaner if Widget::handleEvent returned true/false and |
// HTMLPluginElement called setDefaultHandled or defaultEventHandler. |
@@ -755,12 +758,6 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) |
{ |
ASSERT(parent()->isFrameView()); |
- if (event->isDragEvent()) { |
- if (m_webPlugin->canProcessDrag()) |
- handleDragEvent(event); |
- return; |
- } |
- |
// We cache the parent FrameView here as the plugin widget could be deleted |
// in the call to HandleEvent. See http://b/issue?id=1362948 |
FrameView* parentView = toFrameView(parent()); |