REGRESSION(r105396): drag state is not cleared after each drag
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 00:47:28 +0000 (00:47 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 00:47:28 +0000 (00:47 +0000)
commit2ce3d18d0e443fc312f95719bbb63c141bffb018
treeefe7c847c9d589a685205a11ac328dd2813d5964
parentd7be204fe6fb158e33179d88f7162f1e08bf0abd
REGRESSION(r105396): drag state is not cleared after each drag
https://bugs.webkit.org/show_bug.cgi?id=76878

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Revert a part of r105396 that made performDragAndDrop not call clearDragState
when the default action was not prevented since it caused a regression.

I'm pretty certain always calling clearDragState in performDragAndDrop is wrong
but I can't think of a test case where this becomes a problem at the moment.
Since this area is not well tested, revert the change instead of making further
changes to the code base.

Tests: fast/events/clear-drag-state.html
       fast/events/clear-edit-drag-state.html

* page/EventHandler.cpp:
(WebCore::EventHandler::performDragAndDrop):

LayoutTests:

Add a regression test to ensure we don't fire extra dragenter event
on the second drag at an element that contains the dragged content.

* fast/events/clear-drag-state-expected.txt: Added.
* fast/events/clear-drag-state.html: Added.
* fast/events/clear-edit-drag-state-expected.txt: Added.
* fast/events/clear-edit-drag-state.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/clear-drag-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/clear-drag-state.html [new file with mode: 0644]
LayoutTests/fast/events/clear-edit-drag-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/clear-edit-drag-state.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp