Bug 173238 - [iOS DnD] Allow the injected bundle to add client data when writing an image to the pasteboard
Summary: [iOS DnD] Allow the injected bundle to add client data when writing an image ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-11 08:49 PDT by Wenson Hsieh
Modified: 2017-06-14 11:57 PDT (History)
6 users (show)

See Also:


Attachments
Patch (16.06 KB, patch)
2017-06-11 09:04 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix GTK build (16.09 KB, patch)
2017-06-11 10:01 PDT, Wenson Hsieh
rniwa: review+
Details | Formatted Diff | Diff
Patch for landing (16.26 KB, patch)
2017-06-12 12:25 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 2017-06-11 08:49:34 PDT
<rdar://problem/31943370>
Comment 1 Wenson Hsieh 2017-06-11 09:04:01 PDT
Created attachment 312600 [details]
Patch
Comment 2 Wenson Hsieh 2017-06-11 10:01:59 PDT
Created attachment 312604 [details]
Fix GTK build
Comment 3 Ryosuke Niwa 2017-06-11 18:55:59 PDT
Comment on attachment 312604 [details]
Fix GTK build

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

> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1431
> +    encoder << types;

We should assert that the size of data & types are the same.

> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1433
> +    for (size_t i = 0; i < data.size(); i++)

Why don't we save the size like you did in PlatformPasteboardIOS.mm?
Comment 4 Wenson Hsieh 2017-06-12 08:51:33 PDT
Comment on attachment 312604 [details]
Fix GTK build

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

Thanks Ryosuke! I think we'll still need a WK2 reviewer to rubberstamp this though, since it touches WebKit2.

>> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1431
>> +    encoder << types;
> 
> We should assert that the size of data & types are the same.

Good idea -- added an assert.

>> Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:1433
>> +    for (size_t i = 0; i < data.size(); i++)
> 
> Why don't we save the size like you did in PlatformPasteboardIOS.mm?

Done!
Comment 5 Tim Horton 2017-06-12 11:01:24 PDT
Comment on attachment 312604 [details]
Fix GTK build

wk2r=me
Comment 6 Wenson Hsieh 2017-06-12 12:25:56 PDT
Created attachment 312684 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-06-12 13:05:11 PDT
Comment on attachment 312684 [details]
Patch for landing

Clearing flags on attachment: 312684

Committed r218128: <http://trac.webkit.org/changeset/218128>