[Webkit-unassigned] [Bug 29264] |pdwEffect| passed to WebView::Drop is incorrect.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 1 11:28:38 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29264





--- Comment #3 from Daniel Bates <dbates at webkit.org>  2009-10-01 11:28:38 PDT ---
Oops, I misspoke. It "may" be a Microsoft bug.

I say may because it is not explicitly clear from the DoDragDrop API
<http://msdn.microsoft.com/en-us/library/ms678486%28VS.85%29.aspx> what the
value of pdwEffect will be when Drop is called.

The API states that:
"If the return value is DRAGDROP_S_DROP, DoDragDrop calls IDropTarget::Drop.
The DoDragDrop function returns the last effect code to the source, so the
source application can perform the appropriate operation on the source data,
for example, cut the data if the operation was a move."

But does not elaborate what "last effect code" means. On first read, I took it
to mean the last effect code as set by some function (either DragEnter,
DragOver, or Drop) during the course of the drag-and-drop operation. That is,
suppose only one of the aforementioned functions sets the drop effect code, say
DragEnter, and that the drop effect is set to DROPEFFECT_COPY. Then, the
pdwEffect passed to DragOver, and Drop will be DROPEFFECT_COPY and unless these
functions explicitly change it, DROPEFFECT_COPY would be the last effect code.

This is not the case. From working in the debugger, it appears that the "last
effect code" means the value of the parameter dwOKEffects (as passed to
DoDragDrop) unless changed in the Drop function (by setting pdwEffect to
something else). (i.e. by default, Drop is passed pdwEffect = dwOKEffects).

(In reply to comment #2)
> How can we fix this? WebKit isn't calling WebView::Drop itself. Isn't this a
> bug in the caller of WebView::Drop?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list