Bug 194670 - [iOS] Support pasting item-provider-backed data on the pasteboard as attachment elements
Summary: [iOS] Support pasting item-provider-backed data on the pasteboard as attachme...
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: 2019-02-14 13:51 PST by Wenson Hsieh
Modified: 2019-02-18 16:43 PST (History)
6 users (show)

See Also:


Attachments
First pass (66.98 KB, patch)
2019-02-14 15:51 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for EWS (65.04 KB, patch)
2019-02-18 14:51 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for EWS (64.13 KB, patch)
2019-02-18 14:57 PST, 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 2019-02-14 13:51:23 PST
<rdar://problem/39066529>
Comment 1 Wenson Hsieh 2019-02-14 15:51:31 PST
Created attachment 362074 [details]
First pass
Comment 2 Tim Horton 2019-02-18 13:22:00 PST
Comment on attachment 362074 [details]
First pass

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

> Source/WebCore/platform/ios/PasteboardIOS.mm:291
> +        bool canReadAttachment = policy == WebContentReadingPolicy::AnyType && RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled();

Maybe put attachmentELementEnabled outside the loop and bail from this whole section if it's not set?

> Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:34
> -    typedef std::tuple<WKBundlePageEditorClientV0, WKBundlePageEditorClientV1, WKBundlePageEditorClientV2> Versions;
> +    typedef std::tuple<WKBundlePageEditorClientV0, WKBundlePageEditorClientV1> Versions;

Did we ever ship this? I think you noted that nobody adopted, but did we ship it?
Comment 3 Wenson Hsieh 2019-02-18 13:50:13 PST
Comment on attachment 362074 [details]
First pass

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

>> Source/WebCore/platform/ios/PasteboardIOS.mm:291
>> +        bool canReadAttachment = policy == WebContentReadingPolicy::AnyType && RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled();
> 
> Maybe put attachmentELementEnabled outside the loop and bail from this whole section if it's not set?

👍

>> Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:34
>> +    typedef std::tuple<WKBundlePageEditorClientV0, WKBundlePageEditorClientV1> Versions;
> 
> Did we ever ship this? I think you noted that nobody adopted, but did we ship it?

Regrettably, this did ship :(

Per IRC conversation, I'll maintain bincompat in this patch, and then see if I can remove it in a separate patch.
Comment 4 Wenson Hsieh 2019-02-18 14:51:11 PST
Created attachment 362338 [details]
Patch for EWS
Comment 5 Wenson Hsieh 2019-02-18 14:57:04 PST
Created attachment 362341 [details]
Patch for EWS
Comment 6 WebKit Commit Bot 2019-02-18 16:43:47 PST
Comment on attachment 362341 [details]
Patch for EWS

Clearing flags on attachment: 362341

Committed r241749: <https://trac.webkit.org/changeset/241749>
Comment 7 WebKit Commit Bot 2019-02-18 16:43:48 PST
All reviewed patches have been landed.  Closing bug.