Bug 212075 - [macOS] Drag and drop within a contenteditable area duplicates attachment-backed images
Summary: [macOS] Drag and drop within a contenteditable area duplicates attachment-bac...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-19 08:27 PDT by Wenson Hsieh
Modified: 2020-05-19 12:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.61 KB, patch)
2020-05-19 09:32 PDT, Wenson Hsieh
aestes: review+
Details | Formatted Diff | Diff
Fix WPE build (12.74 KB, patch)
2020-05-19 10:34 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-05-19 08:27:14 PDT
<rdar://problem/62434146>
Comment 1 Wenson Hsieh 2020-05-19 09:32:23 PDT
Created attachment 399742 [details]
Patch
Comment 2 Andy Estes 2020-05-19 10:00:15 PDT
Comment on attachment 399742 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399742&action=review

> Source/WebKit/UIProcess/WebPageProxy.cpp:2458
> +        m_mouseEventQueue.takeLast();

Maybe you want removeLast instead since you aren’t actually taking?
Comment 3 Wenson Hsieh 2020-05-19 10:34:27 PDT
Created attachment 399749 [details]
Fix WPE build
Comment 4 Wenson Hsieh 2020-05-19 10:35:11 PDT
Comment on attachment 399742 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399742&action=review

>> Source/WebKit/UIProcess/WebPageProxy.cpp:2458
>> +        m_mouseEventQueue.takeLast();
> 
> Maybe you want removeLast instead since you aren’t actually taking?

Good call — changed this to:

while (m_mouseEventQueue.size() > 1)
    m_mouseEventQueue.removeLast();
Comment 5 EWS 2020-05-19 11:40:27 PDT
Committed r261875: <https://trac.webkit.org/changeset/261875>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399749 [details].