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"...
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.
Created attachment 348340 [details] Part 1
Created attachment 348341 [details] Part 1 (rebased)
Comment on attachment 348341 [details] Part 1 (rebased) Clearing flags on attachment: 348341 Committed r235448: <https://trac.webkit.org/changeset/235448>
All reviewed patches have been landed. Closing bug.
<rdar://problem/43819779>
Reopening, since this was only the first part — there's more to come…
Created attachment 348524 [details] Patch
Created attachment 348526 [details] Try to fix the WPE build.
Comment on attachment 348526 [details] Try to fix the WPE build. Clearing flags on attachment: 348526 Committed r235574: <https://trac.webkit.org/changeset/235574>