Bug 168097 - [Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
Summary: [Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 17:38 PST by mitz
Modified: 2017-02-10 14:18 PST (History)
1 user (show)

See Also:


Attachments
Add new delegate method and make sure it is called for user-initiated changes on iOS as well (16.85 KB, patch)
2017-02-10 14:06 PST, mitz
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2017-02-09 17:38:34 PST
Expose InjectedBundle::EditorClient::shouldChangeSelectedRange via WKWebProcessPlugInEditingDelegate.
Comment 1 mitz 2017-02-10 14:06:04 PST
Created attachment 301198 [details]
Add new delegate method and make sure it is called for user-initiated changes on iOS as well
Comment 2 WebKit Commit Bot 2017-02-10 14:07:53 PST
Attachment 301198 [details] did not pass style-queue:


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


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2017-02-10 14:08:35 PST
Comment on attachment 301198 [details]
Add new delegate method and make sure it is called for user-initiated changes on iOS as well

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

> Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:621
> +                toRange:toRange ? adoptNS([[WKDOMRange alloc] _initWithImpl:toRange]).get() : nil affinity:cocoaAffinity stillSelecting:stillSelecting];

Can we pull the range out into a variable so as not to have this insane syntax?
Comment 4 mitz 2017-02-10 14:18:14 PST
(In reply to comment #3)
> Comment on attachment 301198 [details]
> Add new delegate method and make sure it is called for user-initiated
> changes on iOS as well
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301198&action=review
> 
> > Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:621
> > +                toRange:toRange ? adoptNS([[WKDOMRange alloc] _initWithImpl:toRange]).get() : nil affinity:cocoaAffinity stillSelecting:stillSelecting];
> 
> Can we pull the range out into a variable so as not to have this insane
> syntax?

OK.

Committed <https://trac.webkit.org/r212149>.