Bug 212685

Summary: dataTransfer.types is empty when handling the "dragstart" event
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, cdumez, esprehn+autocc, ews-watchlist, kangil.han, megan_gardner, mifenton, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
For EWS
aestes: review+
Patch for landing none

Description Wenson Hsieh 2020-06-02 22:25:17 PDT
In Chrome and Firefox, the types (and their data) are accessible during dragstart.
Comment 1 Wenson Hsieh 2020-06-02 22:25:34 PDT
<rdar://problem/61368402>
Comment 2 Wenson Hsieh 2020-06-02 23:10:53 PDT
Created attachment 400900 [details]
For EWS
Comment 3 Andy Estes 2020-06-03 10:16:53 PDT
Comment on attachment 400900 [details]
For EWS

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

> Source/WebCore/platform/StaticPasteboard.cpp:104
> +    m_customData.writeString("text/html", markup);

Could append _s to the string literal.

> Source/WebCore/platform/StaticPasteboard.cpp:109
> +    m_customData.writeString("text/plain", text);

Ditto.

> Source/WebCore/platform/StaticPasteboard.cpp:114
> +    m_customData.writeString("text/uri-list", url.url.string());

Ditto.
Comment 4 Wenson Hsieh 2020-06-03 11:43:39 PDT
Comment on attachment 400900 [details]
For EWS

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

>> Source/WebCore/platform/StaticPasteboard.cpp:104
>> +    m_customData.writeString("text/html", markup);
> 
> Could append _s to the string literal.

Done!

>> Source/WebCore/platform/StaticPasteboard.cpp:109
>> +    m_customData.writeString("text/plain", text);
> 
> Ditto.

👍🏻

>> Source/WebCore/platform/StaticPasteboard.cpp:114
>> +    m_customData.writeString("text/uri-list", url.url.string());
> 
> Ditto.

👍🏻
Comment 5 Wenson Hsieh 2020-06-03 11:44:21 PDT
Created attachment 400950 [details]
Patch for landing
Comment 6 EWS 2020-06-03 12:41:54 PDT
Committed r262507: <https://trac.webkit.org/changeset/262507>

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