Bug 11805
Summary: | Incorrect drag & drop behavior with plug-ins | ||
---|---|---|---|
Product: | WebKit | Reporter: | Vlad Alexander <vlad.alexander> |
Component: | Plug-ins | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Major | CC: | ap |
Priority: | P2 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://misc.xstandard.com/apple/draganddrop.asp |
Vlad Alexander
Not sure if this is a WebKit or Safari issue.
When you drag & drop a file into a plug-in, the drag & drop event is first given to the plug-in but then Safari handles it again and opens the file. The drag & drop event should end with the plug-in.
Here is a test case:
http://misc.xstandard.com/apple/draganddrop.asp
The ability to drag & drop files into our plug-in is a major feature for us.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Could you please describe how the plugin implements drag&drop, to avoid us trying to second-guess?
Vlad Alexander
(In reply to comment #1)
> Could you please describe how the plugin implements drag&drop, to avoid us
> trying to second-guess?
Our plugin uses carbon event to implement it:
Following is the function the plugin called to install event handler
m_TrackingHandler = ::NewDragTrackingHandlerUPP( MyDragTrackingHandler );
m_ReceiverHandler = ::NewDragReceiveHandlerUPP( MyDragReceiveHandler );
InstallTrackingHandler( m_TrackingHandler,GraphicsPort,this );
InstallReceiveHandler( m_ReceiverHandler,GraphicsPort,this );
In the event handler for drag and drop, function returns noErr if event is processed.
OSErr MyDragTrackingHandler( DragTrackingMessage message,WindowRef theWindow,void * handlerRefCon,DragRef theDrag)
{
.......
return noErr;
}
OSErr MyDragReceiveHandler ( WindowRef theWindow,void * handlerRefCon,DragRef theDrag)
{
.......
return noErr;
}
Alexey Proskuryakov
I'm not sure if installing Carbon drag handlers in Cocoa windows is supported - in any case, this looks more like a Carbon/Cocoa issue to me. Please file it via <http://bugreport.apple.com> for Apple engineers to take a look.
For better Cocoa integration, you can probably use a WebPlugin instead of a Netscape-style one.