Bug 189054 - [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
Summary: [iOS] Consolidate the implementations of readString, stringForType, and readU...
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: 2018-08-28 13:32 PDT by Wenson Hsieh
Modified: 2018-08-31 16:18 PDT (History)
7 users (show)

See Also:


Attachments
Part 1 (18.29 KB, patch)
2018-08-28 14:06 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Part 1 (rebased) (16.03 KB, patch)
2018-08-28 14:11 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (10.65 KB, patch)
2018-08-30 12:04 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Try to fix the WPE build. (11.58 KB, patch)
2018-08-30 12:14 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 2018-08-28 13:32:19 PDT
There shouldn't be two different implementations in the same place for reading a value for a given type from the platform pasteboard on iOS. Furthermore, there shouldn't be three (!!!) different implementations in the same file for reading a URL from the pasteboard on iOS.

It's also unclear why readURL even takes a type identifier as an argument, if our code only ever hands it "public.url"...
Comment 1 Wenson Hsieh 2018-08-28 13:37:56 PDT
This code has been like this for many years now, and changing this probably carries some risk. But at the very least, unifying these codepaths to all funnel into the same implementations on iOS would make it much, much easier to hack on this code moving forward.

I would like to try and resolve this before introducing any more complexity to this area, en route to supporting multiple entries in DataTransfer.getData("text/uri-list") on iOS when dropping or pasting multiple URLs.
Comment 2 Wenson Hsieh 2018-08-28 14:06:25 PDT
Created attachment 348340 [details]
Part 1
Comment 3 Wenson Hsieh 2018-08-28 14:11:37 PDT
Created attachment 348341 [details]
Part 1 (rebased)
Comment 4 WebKit Commit Bot 2018-08-28 16:28:27 PDT
Comment on attachment 348341 [details]
Part 1 (rebased)

Clearing flags on attachment: 348341

Committed r235448: <https://trac.webkit.org/changeset/235448>
Comment 5 WebKit Commit Bot 2018-08-28 16:28:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-08-28 16:29:17 PDT
<rdar://problem/43819779>
Comment 7 Wenson Hsieh 2018-08-28 20:15:35 PDT
Reopening, since this was only the first part — there's more to come…
Comment 8 Wenson Hsieh 2018-08-30 12:04:33 PDT
Created attachment 348524 [details]
Patch
Comment 9 Wenson Hsieh 2018-08-30 12:14:12 PDT
Created attachment 348526 [details]
Try to fix the WPE build.
Comment 10 WebKit Commit Bot 2018-08-31 16:18:37 PDT
Comment on attachment 348526 [details]
Try to fix the WPE build.

Clearing flags on attachment: 348526

Committed r235574: <https://trac.webkit.org/changeset/235574>
Comment 11 WebKit Commit Bot 2018-08-31 16:18:38 PDT
All reviewed patches have been landed.  Closing bug.