Bug 172992 - [iOS DnD] Add a hook to perform two-step drops in editable content
Summary: [iOS DnD] Add a hook to perform two-step drops in editable content
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: 2017-06-06 09:16 PDT by Wenson Hsieh
Modified: 2017-06-10 03:43 PDT (History)
11 users (show)

See Also:


Attachments
Patch (13.45 KB, patch)
2017-06-06 09:32 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (13.70 KB, patch)
2017-06-06 15:53 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Add WK2 injected bundle support and tests. (32.70 KB, patch)
2017-06-09 10:42 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix WebKitTestRunner build. (33.55 KB, patch)
2017-06-09 11:00 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-06-06 09:16:06 PDT
Add support for overriding default drops in editable elements with two-step drops. See performsTwoStepPaste: for reference.
Comment 1 Wenson Hsieh 2017-06-06 09:32:16 PDT
Created attachment 312080 [details]
Patch
Comment 2 Wenson Hsieh 2017-06-06 09:33:08 PDT
<rdar://problem/32590174>
Comment 3 Wenson Hsieh 2017-06-06 15:53:25 PDT
Created attachment 312132 [details]
Patch
Comment 4 Sam Weinig 2017-06-06 21:29:40 PDT
Can this be tested?
Comment 5 Wenson Hsieh 2017-06-06 22:20:21 PDT
(In reply to Sam Weinig from comment #4)
> Can this be tested?

Unfortunately, I'm not sure how to test this. One thing I thought of is also adding injected bundle SPI to WK2 to handle the two-step paste, and then add a TestWebKitAPI test that exercises the codepath in WebCore. This would allow us to test the WebCore change (which is really the meat of what changed). However, this approach would also mean that this new injected bundle SPI would only be used for testing -- at least, until Mail adopts WK2 :). Perhaps it's not a bad idea to add an injected bundle version of performTwoStepDrop: if we know we'll need it for WK2 soon anyways.

What do you think?
Comment 6 Tim Horton 2017-06-08 18:04:35 PDT
I think you should add the API test you mention, as discussed in person.
Comment 7 Wenson Hsieh 2017-06-09 10:42:36 PDT
Created attachment 312454 [details]
Add WK2 injected bundle support and tests.
Comment 8 Build Bot 2017-06-09 10:44:33 PDT
Attachment 312454 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:663:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Wenson Hsieh 2017-06-09 11:00:37 PDT
Created attachment 312458 [details]
Fix WebKitTestRunner build.
Comment 10 Build Bot 2017-06-09 11:02:49 PDT
Attachment 312458 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:663:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 WebKit Commit Bot 2017-06-09 13:11:03 PDT
Comment on attachment 312458 [details]
Fix WebKitTestRunner build.

Clearing flags on attachment: 312458

Committed r218014: <http://trac.webkit.org/changeset/218014>