REGRESSION: SVG does not support link dragging
https://bugs.webkit.org/show_bug.cgi?id=141597
Reviewed by Darin Adler.
Source/WebCore:
Fixes an issue where a SVG hyperlink cannot be dragged. We should support
dragging an SVG A element just as we support dragging an HTML A element.
Test: fast/events/drag-and-drop-link.html
* page/DragController.cpp: Removed explicit include of header Element.h as it will
be ultimately included by HTMLAnchorElement.h, among other headers.
(WebCore::isDraggableLink): Added. Extracted code from HitTestResult::isLiveLink().
(WebCore::DragController::draggableElement): Call WebCore::isDraggableLink() to
determine whether a element is a hyperlink that can be dragged.
* page/DragController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Write code in terms of
WebCore::isDraggableLink().
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isLiveLink): Deleted.
* rendering/HitTestResult.h:
Source/WebKit/mac:
Write -[WebElementDictionary _isLiveLink] in terms of WebCore::isDraggableLink().
* Misc/WebElementDictionary.mm:
(-[WebElementDictionary _isLiveLink]):
LayoutTests:
Add a test to ensure we do not regress dragging of a HTML hyperlink or a SVG hyperlink.
* fast/events/drag-and-drop-link-expected.txt: Added.
* fast/events/drag-and-drop-link.html: Added.
* platform/efl/TestExpectations: Mark the test as "failure" since EFL does not support drag-and-drop.
* platform/gtk/TestExpectations: Mark the test as "failure" until we implement drag-and-drop support for
GTK+ as part of fixing <https://bugs.webkit.org/show_bug.cgi?id=42194>.
* platform/ios-simulator/TestExpectations: Skip the test since iOS does not implement
drag-and-drop support.
* platform/mac-wk2/TestExpectations: Skip the test until we implement drag-and-drop support in EventSender
for Mac as part of fixing <https://bugs.webkit.org/show_bug.cgi?id=42194>.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182957
268f45cc-cd09-0410-ab3c-
d52691b4dbfc