Title: [99112] trunk/Source/WebKit2
- Revision
- 99112
- Author
- [email protected]
- Date
- 2011-11-02 15:47:28 -0700 (Wed, 02 Nov 2011)
Log Message
Update dragging info on mac when user is dragging files into view
https://bugs.webkit.org/show_bug.cgi?id=71325
<rdar://problem/10379193>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingUpdated:]): Based on the DragSession, we update NSDraggingInfo
to update the badge and dragging formation.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (99111 => 99112)
--- trunk/Source/WebKit2/ChangeLog 2011-11-02 22:44:07 UTC (rev 99111)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-02 22:47:28 UTC (rev 99112)
@@ -1,5 +1,17 @@
2011-11-02 Jon Lee <[email protected]>
+ Update dragging info on mac when user is dragging files into view
+ https://bugs.webkit.org/show_bug.cgi?id=71325
+ <rdar://problem/10379193>
+
+ Reviewed by Darin Adler.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView draggingUpdated:]): Based on the DragSession, we update NSDraggingInfo
+ to update the badge and dragging formation.
+
+2011-11-02 Jon Lee <[email protected]>
+
Expand DragController to provide more information about the dragging session
https://bugs.webkit.org/show_bug.cgi?id=71324
<rdar://problem/10379175>
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (99111 => 99112)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-02 22:44:07 UTC (rev 99111)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-02 22:47:28 UTC (rev 99112)
@@ -1589,6 +1589,17 @@
_data->_page->dragUpdated(&dragData, [[draggingInfo draggingPasteboard] name]);
WebCore::DragSession dragSession = _data->_page->dragSession();
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
+ NSInteger numberOfValidItemsForDrop = dragSession.numberOfItemsToBeAccepted;
+ NSDraggingFormation draggingFormation = NSDraggingFormationNone;
+ if (dragSession.mouseIsOverFileInput && numberOfValidItemsForDrop > 0)
+ draggingFormation = NSDraggingFormationList;
+
+ if ([draggingInfo numberOfValidItemsForDrop] != numberOfValidItemsForDrop)
+ [draggingInfo setNumberOfValidItemsForDrop:numberOfValidItemsForDrop];
+ if ([draggingInfo draggingFormation] != draggingFormation)
+ [draggingInfo setDraggingFormation:draggingFormation];
+#endif
return dragSession.operation;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes