Bug 212685 - dataTransfer.types is empty when handling the "dragstart" event
Summary: dataTransfer.types is empty when handling the "dragstart" event
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-06-02 22:25 PDT by Wenson Hsieh
Modified: 2020-06-03 12:41 PDT (History)
11 users (show)

See Also:


Attachments
For EWS (51.24 KB, patch)
2020-06-02 23:10 PDT, Wenson Hsieh
aestes: review+
Details | Formatted Diff | Diff
Patch for landing (51.24 KB, patch)
2020-06-03 11:44 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-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].