Title: [212457] trunk/Source/WebCore
- Revision
- 212457
- Author
- [email protected]
- Date
- 2017-02-16 12:09:04 -0800 (Thu, 16 Feb 2017)
Log Message
Set the DHTML drag image in the DHTML type check
https://bugs.webkit.org/show_bug.cgi?id=168451
Reviewed by Wenson Hsieh.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (212456 => 212457)
--- trunk/Source/WebCore/ChangeLog 2017-02-16 20:08:56 UTC (rev 212456)
+++ trunk/Source/WebCore/ChangeLog 2017-02-16 20:09:04 UTC (rev 212457)
@@ -1,5 +1,15 @@
2017-02-16 Anders Carlsson <[email protected]>
+ Set the DHTML drag image in the DHTML type check
+ https://bugs.webkit.org/show_bug.cgi?id=168451
+
+ Reviewed by Wenson Hsieh.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag):
+
+2017-02-16 Anders Carlsson <[email protected]>
+
Begin removing EFL code from WebCore.
Rubber-stamped by Alex Christensen.
Modified: trunk/Source/WebCore/page/DragController.cpp (212456 => 212457)
--- trunk/Source/WebCore/page/DragController.cpp 2017-02-16 20:08:56 UTC (rev 212456)
+++ trunk/Source/WebCore/page/DragController.cpp 2017-02-16 20:09:04 UTC (rev 212457)
@@ -798,19 +798,21 @@
ASSERT(state.dataTransfer);
DataTransfer& dataTransfer = *state.dataTransfer;
- if (state.type == DragSourceActionDHTML)
+ if (state.type == DragSourceActionDHTML) {
dragImage = DragImage { dataTransfer.createDragImage(dragImageOffset) };
- if (state.type == DragSourceActionSelection || !imageURL.isEmpty() || !linkURL.isEmpty())
+ // We allow DHTML/JS to set the drag image, even if its a link, image or text we're dragging.
+ // This is in the spirit of the IE API, which allows overriding of pasteboard data and DragOp.
+ if (dragImage) {
+ dragLoc = dragLocForDHTMLDrag(mouseDraggedPoint, dragOrigin, dragImageOffset, !linkURL.isEmpty());
+ m_dragOffset = dragImageOffset;
+ }
+ }
+
+ if (state.type == DragSourceActionSelection || !imageURL.isEmpty() || !linkURL.isEmpty()) {
// Selection, image, and link drags receive a default set of allowed drag operations that
// follows from:
// http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebHTMLView.mm?rev=48526#L3430
m_sourceDragOperation = static_cast<DragOperation>(m_sourceDragOperation | DragOperationGeneric | DragOperationCopy);
-
- // We allow DHTML/JS to set the drag image, even if its a link, image or text we're dragging.
- // This is in the spirit of the IE API, which allows overriding of pasteboard data and DragOp.
- if (dragImage) {
- dragLoc = dragLocForDHTMLDrag(mouseDraggedPoint, dragOrigin, dragImageOffset, !linkURL.isEmpty());
- m_dragOffset = dragImageOffset;
}
ASSERT(state.source);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes