Bug 212075

Summary: [macOS] Drag and drop within a contenteditable area duplicates attachment-backed images
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, megan_gardner, thorton, timothy, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
aestes: review+
Fix WPE build none

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].