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>
Mon, 2 Apr 2012 22:33:42 +0000 (22:33 +0000)
committerdcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 22:33:42 +0000 (22:33 +0000)
commit16fda8b731e4ad86d786b2ee32978f063650b170
tree99b751a453049c29735ca2b5d1c8446101c413c1
parentcec961cc8585b5b3a6903a88ee7b9c1de5139a9a
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.

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

* page/DragController.cpp:
(WebCore::DragController::performDrag):

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