Bug 189054

Summary: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, commit-queue, rniwa, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Part 1
none
Part 1 (rebased)
none
Patch
none
Try to fix the WPE build. none

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.