Forbid setDragImage after dragstart
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Aug 2017 06:40:30 +0000 (06:40 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Aug 2017 06:40:30 +0000 (06:40 +0000)
commit2a2d73bc2e4b62b2cbe988ecd66338295b527d06
tree9bd99dc3b6e2f3d0307861c7504c8b02ccc5453b
parent8bcad08a1416b206d82a86d4fdd2de80ed4f72c5
Forbid setDragImage after dragstart
https://bugs.webkit.org/show_bug.cgi?id=175751

Reviewed by Wenson Hsieh.

Removed the code to allow setting the drag mage after dragstart had happened.

The feature was apparently used in Mac WebKit1 port but using it today causes the drag image
to disapepar while the user is moving the mouse cursor and being drawn once it's stopped
and results in the contionus flickering of the drag image.

The feaure was never supported in WebKit2 and doesn't match the HTML5 specification:
https://html.spec.whatwg.org/multipage/dnd.html#concept-dnd-rw
https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage
or the behaviors of other browsers such as Chrome and Firefox.

No new tests. This patch simply removes code.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::setDragImage):
(WebCore::DataTransfer::canSetDragImage const): Deleted.
* dom/DataTransfer.h:
(WebCore::DataTransfer::makeDragImageWritable): Deleted.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/DataTransfer.h
Source/WebCore/page/EventHandler.cpp