RESOLVED FIXED 33635
[DnD] effectAllowed and dropEffect can be set to bogus values
https://bugs.webkit.org/show_bug.cgi?id=33635
Summary [DnD] effectAllowed and dropEffect can be set to bogus values
Brian Weinstein
Reported 2010-01-13 16:04:16 PST
event.dataTransfer.dropEffect = "bogus" and event.dataTransfer.effectAllowed = "bogus" Both work, and can cause strange behavior in drag and drop behavior.
Attachments
[PATCH] Fix (13.59 KB, patch)
2010-01-13 16:26 PST, Brian Weinstein
bweinstein: commit-queue-
[PATCH] Fix without breaking Mac (13.60 KB, patch)
2010-01-13 16:34 PST, Brian Weinstein
no flags
[PATCH] Fix + Fixed Layout Tests (19.92 KB, patch)
2010-01-14 11:49 PST, Brian Weinstein
no flags
Patch (1.44 KB, patch)
2010-01-14 13:06 PST, Brian Weinstein
no flags
Patch (1.59 KB, patch)
2010-01-14 13:12 PST, Brian Weinstein
aroben: review+
Brian Weinstein
Comment 1 2010-01-13 16:26:00 PST
Created attachment 46524 [details] [PATCH] Fix
Eric Seidel (no email)
Comment 2 2010-01-13 16:30:37 PST
Brian Weinstein
Comment 3 2010-01-13 16:34:09 PST
Created attachment 46526 [details] [PATCH] Fix without breaking Mac
Oliver Hunt
Comment 4 2010-01-13 22:56:36 PST
Comment on attachment 46526 [details] [PATCH] Fix without breaking Mac r=me
Eric Seidel (no email)
Comment 5 2010-01-14 10:39:05 PST
Eric Seidel (no email)
Comment 6 2010-01-14 10:40:06 PST
And one test on Qt: http://build.webkit.org/results/Qt%20Linux%20Release/r53270%20(5993)/fast/events/bogus-dropEffect-effectAllowed-pretty-diff.html I expect Brian is fully aware of the issues. :) Just noticed and thought I should record them on the off chance he missed them.
Brian Weinstein
Comment 7 2010-01-14 10:49:34 PST
Comment on attachment 46526 [details] [PATCH] Fix without breaking Mac This broke 5 layout tests on Mac, it was landed in r53270, but rolled out in r53272. I will fix the tests, and upload new results for Mac + GTK + Qt.
Brian Weinstein
Comment 8 2010-01-14 11:49:09 PST
Created attachment 46591 [details] [PATCH] Fix + Fixed Layout Tests
Oliver Hunt
Comment 9 2010-01-14 12:33:49 PST
Comment on attachment 46591 [details] [PATCH] Fix + Fixed Layout Tests r=me
Brian Weinstein
Comment 10 2010-01-14 12:48:30 PST
Landed in r53287.
Brian Weinstein
Comment 11 2010-01-14 13:06:31 PST
Adam Roben (:aroben)
Comment 12 2010-01-14 13:08:17 PST
Comment on attachment 46601 [details] Patch r=me Can we make an even stronger assertion: that m_effectAllowed and m_dropEffect are one of the allowed values?
Brian Weinstein
Comment 13 2010-01-14 13:12:47 PST
Adam Roben (:aroben)
Comment 14 2010-01-14 13:15:15 PST
Comment on attachment 46602 [details] Patch This looks OK. r=me. But now these functions always return true. Let's get rid of the boolean return value and just return a DragOperation!
Eric Seidel (no email)
Comment 15 2010-01-14 16:21:25 PST
This broke Leopard Debug due to a bad ASSERT: http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r53288%20(9281)/fast/events/drag-and-drop-stderr.txt ASSERTION FAILED: op == DragOperationCopy || op == DragOperationNone || op == DragOperationLink || op == DragOperationMove (/Volumes/Big/WebKit-BuildSlave/leopard-intel-debug/build/WebCore/dom/Clipboard.cpp:113 bool WebCore::Clipboard::destinationOperation(WebCore::DragOperation&) const) Perhaps this was fixed in http://trac.webkit.org/changeset/53296?
Eric Seidel (no email)
Comment 16 2010-01-14 16:21:53 PST
Actually, this broke all debug builds. :(
Brian Weinstein
Comment 17 2010-01-14 16:23:52 PST
(In reply to comment #16) > Actually, this broke all debug builds. :( I have a fix, but am trying to figure out why dragOpFromIEOp returns DragOperationGeneric instead of DragOperationMove.
noel gordon
Comment 18 2010-02-24 07:23:46 PST
(In reply to comment #16) > Actually, this broke all debug builds. :( Is it still in that state? And I noticed your reference to a related change http://trac.webkit.org/changeset/53296, which removed some old IE compat code. So does http://www.whatwg.org/demos/2008-sept/dnd/dnd.html work for you on a webkit nightly? Broken on chrome-dev for me, works fine in Chrome4, Firefox 3.5.7/3.6, and IE6. Other examples: http://html5demos.com/drag#
Note You need to log in before you can comment on or make changes to this bug.