-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=99355 Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-10-17 Reviewed by Tony Chang. Source/WebCore: When doing a drag over a plugin, ask the plugin whether it can accept drag/drop to decide whether drag/drop is possible or not. At present, plugins do not receive drag events through WebCore (i.e. various implementations of PluginView::handleMouseEvent ignores the drop-events). This change makes it possible for the ports to ask the plugin first to decide whether it can (or wants to) accept drag events. The default implementation remains the same, i.e. plugins do not receive drag events. For chromium, the overridden implementation uses the WebPlugin interface to check whether the plugin can accept drag events. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::canProcessDrag): (WebCore): * html/HTMLPlugInElement.h: (WebCore): (HTMLPlugInElement): * page/DragController.cpp: (WebCore::DragController::canProcessDrag): * plugins/PluginViewBase.h: (WebCore): (WebCore::PluginViewBase::canProcessDrag): Source/WebKit/chromium: Introduce WebPlugin::canProcessDrag() and use that to implement PluginViewBase::canProcessDrag. * public/WebPlugin.h: (WebKit::WebPlugin::canProcessDrag): (WebPlugin): * src/WebPluginContainerImpl.cpp: (WebKit::WebPluginContainerImpl::canProcessDrag): (WebKit): (WebKit::WebPluginContainerImpl::handleMouseEvent): * src/WebPluginContainerImpl.h: (WebPluginContainerImpl): Tools: Update the TestWebPlugin to implement the new |canProcessDrag| interface. * DumpRenderTree/chromium/TestWebPlugin.h: (TestWebPlugin::canProcessDrag): LayoutTests: Update test to not set contentEditable on the plugin anymore. * platform/chromium/plugins/drag-events-expected.txt: * platform/chromium/plugins/drag-events.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ed2e01ec