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

Unified Diff: Source/web/WebPluginContainerImpl.cpp

Issue 1232003009: Implement DragEvent and move MouseEvent.dataTransfer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix plugin failure of LayoutTest Created 5 years, 4 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/ContextMenuControllerTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « Source/core/page/ContextMenuControllerTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698