Title: [243785] trunk/Source/WebCore
Revision
243785
Author
timo...@apple.com
Date
2019-04-02 20:46:37 -0700 (Tue, 02 Apr 2019)

Log Message

Cursor count badge reverts to Zero during Drag & Drop of multiple items.
https://bugs.webkit.org/show_bug.cgi?id=196511

Reviewed by Daniel Bates.

* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag): Don't set m_numberOfItemsToBeAccepted to
zero when dragging to a non-file input element.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (243784 => 243785)


--- trunk/Source/WebCore/ChangeLog	2019-04-03 03:24:29 UTC (rev 243784)
+++ trunk/Source/WebCore/ChangeLog	2019-04-03 03:46:37 UTC (rev 243785)
@@ -1,3 +1,14 @@
+2019-04-02  Timothy Hatcher  <timo...@apple.com>
+
+        Cursor count badge reverts to Zero during Drag & Drop of multiple items.
+        https://bugs.webkit.org/show_bug.cgi?id=196511
+
+        Reviewed by Daniel Bates.
+
+        * page/DragController.cpp:
+        (WebCore::DragController::tryDocumentDrag): Don't set m_numberOfItemsToBeAccepted to
+        zero when dragging to a non-file input element.
+
 2019-04-02  Chris Dumez  <cdu...@apple.com>
 
         HTML Parser: Remove conditional parsing of <noembed> content

Modified: trunk/Source/WebCore/page/DragController.cpp (243784 => 243785)


--- trunk/Source/WebCore/page/DragController.cpp	2019-04-03 03:24:29 UTC (rev 243784)
+++ trunk/Source/WebCore/page/DragController.cpp	2019-04-03 03:46:37 UTC (rev 243785)
@@ -442,7 +442,6 @@
 
         Frame* innerFrame = element->document().frame();
         dragOperation = dragIsMove(innerFrame->selection(), dragData) ? DragOperationMove : DragOperationCopy;
-        m_numberOfItemsToBeAccepted = 0;
 
         unsigned numberOfFiles = dragData.numberOfFiles();
         if (m_fileInputElementUnderMouse) {
@@ -459,9 +458,9 @@
                 dragOperation = DragOperationNone;
             m_fileInputElementUnderMouse->setCanReceiveDroppedFiles(m_numberOfItemsToBeAccepted);
         } else {
-            // We are not over a file input element. The dragged item(s) will only
-            // be loaded into the view the number of dragged items is 1.
-            m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
+            // We are not over a file input element. The dragged item(s) will loaded into the view,
+            // dropped as text paths on other input elements, or handled by script on the page.
+            m_numberOfItemsToBeAccepted = numberOfFiles;
         }
 
         if (m_fileInputElementUnderMouse)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to