I've filed https://bugs.webkit.org/show_bug.cgi?id=37012 for dragenter /
dragover.
Fixing drop / dragend will require some Chrome plumbing changes though.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #7 on issue 39399 by dch...@chromium.org: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399
I gave a bit more thought about fixing drop/dragend.
Chromium.org has this to say about IPC:
"Synchronous browser-to-renderer IPC is disallowed to prevent blocking the
user-
interface on a potentially flaky renderer."
But by definition, doesn't that make it impossible for drag and drop to
conform to
the spec? We dispatch an IPC drop to the renderer. The event could be
cancelled, in
which case the drop succeeded. The drop event handler can set whatever it
wants as
the dropEffect, but the drag source (browser or not) will never know. Right
now, we
lie and claim that the drag never happened.
dragend is easy enough to fix, but it will be imperfect for DOM -> DOM
dragging
unless we fix the drop event. Am I missing something obvious here?
Yes, I think it's impossible for us to send the right value back to the
browser process on a drop event. What are
the consequences of not being able to do this? I know of issue 38989, but
are there others?
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=43925
------------------------------------------------------------------------
r43925 | dch...@chromium.org | 2010-04-07 22:09:49 -0700 (Wed, 07 Apr 2010)
| 8 lines
Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drag_utils_win.cc?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drag_utils_win.h?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/web_drop_target_win.cc?r1=43925&r2=43924
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/views/tab_contents/tab_contents_drag_win.cc?r1=43925&r2=43924
Return an approximately correct drop effect from WebDragTarget::OnDrop.
This isn't actually guaranteed to be correct, since it's the cached value
from previous dragenter / dragover results, but hopefully it's somewhat
correct part of the time. To prevent potential data loss, all moves are
mapped to copies. A future improvement might to fire a
ViewHostMsg_UpdateDragCursor after the renderer processes the drop event.
BUG=39399
TEST=Manual testing using the attached test case on the bug.
Review URL: http://codereview.chromium.org/1572027
------------------------------------------------------------------------
Comment #14 on issue 39399 by dch...@google.com: dataTransfer.dropEffect
not properly set on dragEnter, dragOver, drop, dragEnd
http://code.google.com/p/chromium/issues/detail?id=39399
Fixing dragenter / dragover / drop requires pinging WHATWG on what the
correct behavior ought to be. The spec might be right, but it'd be good to
confirm, since the currently specced behavior differs from every known
browser. It's not high-priority at the moment since most authors explicitly
set the dropEffect themselves in the event handlers.
I'm confused what the problem is? If dropEffect is set then dropEffect in
dragend should return the same value so that the source can do the correct
thing.
There's two separate issues in this bug now.
1. Per the spec, dragenter / dragover / drop should have dropEffect
initialized to certain values depending on the value of effectAllowed. This
is what's up for debate, since the mapping of defaults (see
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dropEffect-initialization)
does not corresponding to any known browser.
2. dragend should have the proper dropEffect value. This is only partially
fixed by my patches, but it's better than what we had before. The reason a
full fix is hard is being completely accurate when dispatching dragEnd
events would force the drop handlers in the browser to wait for the
renderer IPC to complete. Since this is commented as something we
explicitly don't want to do, I'm not sure how we can fix it (see the
comment on line 136 in
http://src.chromium.org/cgi-bin/gitweb.cgi?p=chromium.git;a=blob;f=chrome/browser/tab_contents/web_drop_target_win.cc;hb=HEAD).
Issue 96395 has been merged into this issue.
Yup, this bug is definitely still there on Windows. I'll leave it up to
dcheng to decide whether he want to flip to just OS-Windows or not (for
now).