Having a drop handler prevents navigation on drop even if event is not cancelled
authordcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 21:21:46 +0000 (21:21 +0000)
committerdcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 21:21:46 +0000 (21:21 +0000)
commitc5ad721be26cabd20e73357cc412504094791f7c
treed353f82e612efa4f4d9fff46f8e74c7e17cfe45a
parentdba786d553cc2fde2e44a27d4e238f1b6878f1f6
Having a drop handler prevents navigation on drop even if event is not cancelled
https://bugs.webkit.org/show_bug.cgi?id=79172

Reviewed by Ryosuke Niwa.

Source/WebCore:

Only early return if the drop handler prevents the default action.
http://trac.webkit.org/changeset/105396 introduced this issue when fixing some other aspects
of DnD handling.

Test: fast/events/drop-handler-should-not-stop-navigate.html

* page/DragController.cpp:
(WebCore::DragController::performDrag):
(WebCore::DragController::concludeEditDrag): Remove the assert. By definition, we want to
    allow default actions to run now if they weren't explicitly canceled.

LayoutTests:

* fast/events/drag-dataTransferItemList.html: Fix drop handler to prevent default.
* fast/events/drop-handler-should-not-stop-navigate-expected.txt: Added.
* fast/events/drop-handler-should-not-stop-navigate.html: Added.
* http/tests/security/clipboard/clipboard-file-access.html: Change dragover to drop handler
    to prevent bubbled events from causing navigation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/drag-dataTransferItemList.html
LayoutTests/fast/events/drop-handler-should-not-stop-navigate-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/drop-handler-should-not-stop-navigate.html [new file with mode: 0644]
LayoutTests/http/tests/security/clipboard/clipboard-file-access.html
Source/WebCore/ChangeLog
Source/WebCore/page/DragController.cpp