[Webkit-unassigned] [Bug 215032] REGRESSION(r261570): [GTK] Fails to send drop event to JavaScript

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 12 00:27:44 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=215032

--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 406378
  --> https://bugs.webkit.org/attachment.cgi?id=406378
Patch

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

Thanks for the review!

>> Source/WebCore/platform/gtk/PasteboardGtk.cpp:337
>> +                    types.add(type);
> 
> Are these guaranteed to be ASCII lowercase?

Yes, DataTransfer normalizes the given types.

>> Source/WebCore/platform/gtk/PasteboardGtk.cpp:348
>> +        return copyToVector(types);
> 
> This will yield the types in a random order, based on hashing. I think we probably want this sorted.

Why? types is a ListHashSet, not a HashSet.

>> Source/WebCore/platform/gtk/PasteboardGtk.cpp:462
>> +            const auto& customData = data[0];
> 
> Why is it correct to look only at the first item?

It's not necessarily correct, but we don't support multiple items in the pasteboard, neither for clipboard nor for drag and drop. In this case it's correct, because writeCustomData is only called for dnd operations from DataTransfer::commitToPasteboard() that always passes a vector with a single element.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200812/2c0e4ddc/attachment-0001.htm>


More information about the webkit-unassigned mailing list