Bug 174082 - Pasting single words copied to UIPasteboard inserts URLs in editable areas
Summary: Pasting single words copied to UIPasteboard inserts URLs in editable areas
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: InRadar
Depends on:
Blocks:
 
Reported: 2017-07-02 19:20 PDT by Wenson Hsieh
Modified: 2017-07-05 09:23 PDT (History)
8 users (show)

See Also:


Attachments
Patch (15.98 KB, patch)
2017-07-02 20:17 PDT, Wenson Hsieh
thorton: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.15 MB, application/zip)
2017-07-02 21:23 PDT, Build Bot
no flags Details
Patch for landing (15.91 KB, patch)
2017-07-02 23: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-07-02 19:20:56 PDT
<rdar://problem/33046992>
Comment 1 Wenson Hsieh 2017-07-02 20:17:47 PDT
Created attachment 314437 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2017-07-02 20:18:39 PDT
<rdar://problem/33101038>
Comment 3 Tim Horton 2017-07-02 20:28:34 PDT
Comment on attachment 314437 [details]
Patch

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

> Source/WebCore/ChangeLog:13
> +        be read back as NSURLs for "public.url". This currently causes bugs shipping software: e.g. copying and pasting

Bugs shipping software
Comment 4 Wenson Hsieh 2017-07-02 21:00:26 PDT
Comment on attachment 314437 [details]
Patch

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

Thanks Tim!

>> Source/WebCore/ChangeLog:13
>> +        be read back as NSURLs for "public.url". This currently causes bugs shipping software: e.g. copying and pasting
> 
> Bugs shipping software

Good catch -- fixed.
Comment 5 Build Bot 2017-07-02 21:23:49 PDT
Comment on attachment 314437 [details]
Patch

Attachment 314437 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4040879

New failing tests:
workers/bomb.html
Comment 6 Build Bot 2017-07-02 21:23:50 PDT
Created attachment 314441 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 7 Wenson Hsieh 2017-07-02 23:20:51 PDT
(In reply to Build Bot from comment #6)
> Created attachment 314441 [details]
> Archive of layout-test-results from ews106 for mac-elcapitan-wk2
> 
> The attached test failures were seen while running run-webkit-tests on the
> mac-wk2-ews.
> Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6

Test failure looks unrelated -- this patch only affects iOS-specific code, and this is the Mac bot; also, the failing test doesn't appear to exercise pasting codepaths.
Comment 8 Tim Horton 2017-07-02 23:24:26 PDT
Also, I’ve seen that test failing on other EWS runs.
Comment 9 Wenson Hsieh 2017-07-02 23:25:51 PDT
Created attachment 314453 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2017-07-03 00:14:08 PDT
The commit-queue encountered the following flaky tests while processing attachment 314453 [details]:

imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm bug 174090 (author: youennf@gmail.com)
The commit-queue is continuing to process your patch.
Comment 11 WebKit Commit Bot 2017-07-03 04:26:39 PDT
Comment on attachment 314453 [details]
Patch for landing

Clearing flags on attachment: 314453

Committed r219070: <http://trac.webkit.org/changeset/219070>
Comment 12 mitz 2017-07-03 06:44:18 PDT
Comment on attachment 314437 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:38
> +SOFT_LINK_FRAMEWORK(UIKit)

Why is this needed here and not everywhere else TestWebKitAPI uses UIKit?
Comment 13 Wenson Hsieh 2017-07-03 09:50:52 PDT
(In reply to mitz from comment #12)
> Comment on attachment 314437 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314437&action=review
> 
> > Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:38
> > +SOFT_LINK_FRAMEWORK(UIKit)
> 
> Why is this needed here and not everywhere else TestWebKitAPI uses UIKit?

This is here because we want to build for OpenSource and UIApplicationInitialize is SPI, but as you mentioned on IRC, there's a better (more canonical) way to accomplish this by introducing UIKitSPI.h.
Comment 15 Matt Lewis 2017-07-05 08:59:50 PDT
Reverted r219070 for reason:

This revision caused consistent failures of the API test UIPasteboardTests.DoNotPastePlainTextAsURL on iOS.

Committed r219128: <http://trac.webkit.org/changeset/219128>
Comment 16 Wenson Hsieh 2017-07-05 09:07:10 PDT
The new unit test uses a codepath that depends on -[UIPasteboard itemProviders] which is available on iOS 11+, so this isn't going to pass on the OpenSource bots, which are still on iOS 10. Furthermore, this is passing consistently on the internal bots on build-safari. These tests just need to be guarded by iOS 11+.
Comment 17 Matt Lewis 2017-07-05 09:07:31 PDT
Reverted r219128 for reason:

Spoke with engineer who originally submitted, Patch for APi test to follow.

Committed r219129: <http://trac.webkit.org/changeset/219129>
Comment 18 Wenson Hsieh 2017-07-05 09:23:33 PDT
Guarded the failing test in https://trac.webkit.org/r219131.