[Webkit-unassigned] [Bug 28902] Windows DumpRenderTree should properly set the drop effect for a drag-and-drop operation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 27 12:53:24 PDT 2009


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





--- Comment #6 from Daniel Bates <dbates at webkit.org>  2009-09-27 12:53:24 PDT ---
Notice, Win DRT emulates the drag-and-drop event loop implemented in DoDragDrop
<http://msdn.microsoft.com/en-us/library/ms678486%28VS.85%29.aspx>. For any
drag-and-drop operation that ends with a successful drop on the target, the
correct call flow in Win DRT is: webViewDropTarget->DragEnter,
webViewDropTarget->DragOver, webViewDropTarget->Drop (*).

Suppose there are two such drag-and-drop operations A, B on the same page.
Tracing through the EventSender code, the call flow for A will be: (*) (and
will set |didDragEnter| to true). But the call flow for B will be:
webViewDropTarget->DragOver, webViewDropTarget->Drop (because |didDragEnter| is
still true!; that is, it is never set to false after A completes). This is
incorrect. The call flow should be the same for both operations and it should
be (*).

There is no bug filed about this. A better idea is to file a new bug for this
issue with the fix (setting didDragEnter to false), and remove this change from
the fix for this bug (#28902). Let me know your thoughts.

(In reply to comment #5)
> (From update of attachment 40183 [details])
> > +            // Reset |didDragEnter| so that another drag started within the same frame works properly.
> > +            //
> > +            // Notice, WebView::DragEnter (i.e. webViewDropTarget->DragEnter) initializes the field
> > +            // |WebView::m_dragData|, which is checked in WebView::DragOver (i.e. webViewDropTarget->DragOver).
> > +            //
> > +            // If |didDragEnter| == false, then |WebView::m_dragData| is uninitialized, and by
> > +            // <http://trac.webkit.org/browser/trunk/WebKit/win/WebView.cpp?rev=48754#L4657>
> > +            // WebView::DragOver returns the drop effect DROPEFFECT_NONE, which is incorrect.
> > +            // Hence, we set |didDragEnter| = false on a mouse up to reset the DRT drag-and-drop
> > +            // machinery.
> 
> I don't understand this comment. You say that the behavior of WebView::DragOver
> "is incorrect". Is there a bug filed about this incorrectness? If so, it would
> probably be better to reference that bug instead of the Trac link you have now.
> What is the correct behavior? Maybe this will all become clear when I see the
> bug.

-- 
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