| Summary: | Cursor count badge reverts to Zero during Drag & Drop of multiple items | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||
| Component: | WebCore Misc. | Assignee: | Timothy Hatcher <timothy> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | chudesno, commit-queue, dbates, jonlee, thorton, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Local Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=181081 | ||||||
| Attachments: |
|
||||||
|
Description
Timothy Hatcher
2019-04-02 15:41:44 PDT
Created attachment 366545 [details]
Patch
Comment on attachment 366545 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366545&action=review Bade is UI. So, likely no way to test. > Source/WebCore/page/DragController.cpp:-464 > - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this Comment on attachment 366545 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366545&action=review >> Source/WebCore/page/DragController.cpp:-464 >> - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; > > I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out. https://trac.webkit.org/changeset/99108/webkit Comment on attachment 366545 [details] Patch Clearing flags on attachment: 366545 Committed r243785: <https://trac.webkit.org/changeset/243785> All reviewed patches have been landed. Closing bug. Comment on attachment 366545 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366545&action=review >>> Source/WebCore/page/DragController.cpp:-464 >>> - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; >> >> I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this > > This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out. > > https://trac.webkit.org/changeset/99108/webkit We should ensure that dragging multiple files over a regular input type=file does not cause the drop to occur. (In reply to Wenson Hsieh from comment #6) > Comment on attachment 366545 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366545&action=review > > >>> Source/WebCore/page/DragController.cpp:-464 > >>> - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; > >> > >> I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this > > > > This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out. > > > > https://trac.webkit.org/changeset/99108/webkit > > We should ensure that dragging multiple files over a regular input type=file > does not cause the drop to occur. (Regular file input, as opposed to an <input type=file multiple>) (In reply to Wenson Hsieh from comment #7) > (In reply to Wenson Hsieh from comment #6) > > Comment on attachment 366545 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=366545&action=review > > > > >>> Source/WebCore/page/DragController.cpp:-464 > > >>> - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; > > >> > > >> I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this > > > > > > This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out. > > > > > > https://trac.webkit.org/changeset/99108/webkit > > > > We should ensure that dragging multiple files over a regular input type=file > > does not cause the drop to occur. > > (Regular file input, as opposed to an <input type=file multiple>) Oh sorry, I misread the branch. The change looks right — I can't think of any reason why we wouldn't want to update m_numberOfItemsToBeAccepted when dragging a single file, when we're not dropping over a file input. Comment on attachment 366545 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366545&action=review >>>>>> Source/WebCore/page/DragController.cpp:-464 >>>>>> - m_numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1; >>>>> >>>>> I can’t help but wonder, why? Why did we do this? I so want to understand the comment, but it is broken English. Could this be a platform/port-specific hack? Windows? GTK? If so, need to move hack. <—- not cq’ing because of this >>>> >>>> This was added by Jon Lee 7 years ago. It was to provide more info to the user what might happen when the drag moves over elements in the page. I think it just wasn’t fully thought out. >>>> >>>> https://trac.webkit.org/changeset/99108/webkit >>> >>> We should ensure that dragging multiple files over a regular input type=file does not cause the drop to occur. >> >> (Regular file input, as opposed to an <input type=file multiple>) > > Oh sorry, I misread the branch. The change looks right — I can't think of any reason why we wouldn't want to update m_numberOfItemsToBeAccepted when dragging a single file, when we're not dropping over a file input. Yep, the if (m_fileInputElementUnderMouse) block handles that. Is this the same as bug 181081? *** Bug 181081 has been marked as a duplicate of this bug. *** (In reply to Alexey Proskuryakov from comment #10) > Is this the same as bug 181081? Yes. |