Bug 190232

Summary: [iOS] [WK2] Expose some more editing SPI on WKWebView
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, enrica, mitz, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Update ChangeLog
none
Add setFontSize:sender:
thorton: review+
Patch for landing none

Wenson Hsieh
Reported 2018-10-02 20:29:46 PDT
Expose more editing SPI on WKWebView, for internal use by rich text editors on iOS.
Attachments
Patch (39.16 KB, patch)
2018-10-02 21:01 PDT, Wenson Hsieh
no flags
Patch (39.78 KB, patch)
2018-10-02 21:53 PDT, Wenson Hsieh
no flags
Update ChangeLog (39.75 KB, patch)
2018-10-02 21:55 PDT, Wenson Hsieh
no flags
Add setFontSize:sender: (40.84 KB, patch)
2018-10-03 10:51 PDT, Wenson Hsieh
thorton: review+
Patch for landing (40.81 KB, patch)
2018-10-04 19:24 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2018-10-02 20:30:13 PDT
This includes a way to specify font colors, as well as a UIFont.
Radar WebKit Bug Importer
Comment 2 2018-10-02 20:31:25 PDT
Wenson Hsieh
Comment 3 2018-10-02 21:01:18 PDT
mitz
Comment 4 2018-10-02 21:07:06 PDT
Comment on attachment 351474 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351474&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:371 > +@interface WKWebView (EditActions) <UIResponderStandardEditActions> Unprefixed category names on API classes are reserved for client apps. WebKit’s categories should be prefixed WK. Although this could just be a class extension rather than a named category. > Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:382 > +- (void)setFont:(UIFont *)font withSender:(id)sender; > +- (void)setTextColor:(UIColor *)color withSender:(id)sender; Not sure how “with” fits here.
Wenson Hsieh
Comment 5 2018-10-02 21:10:42 PDT
Comment on attachment 351474 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351474&action=review >> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:371 >> +@interface WKWebView (EditActions) <UIResponderStandardEditActions> > > Unprefixed category names on API classes are reserved for client apps. WebKit’s categories should be prefixed WK. Although this could just be a class extension rather than a named category. Good point! I'll change this to just be a class extension (i.e. WKWebView () <…>) >> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:382 >> +- (void)setTextColor:(UIColor *)color withSender:(id)sender; > > Not sure how “with” fits here. I suppose the "with" doesn't add anything here except more keystrokes :P Removed the "with"
Wenson Hsieh
Comment 6 2018-10-02 21:14:48 PDT
Comment on attachment 351474 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351474&action=review >>> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:382 >>> +- (void)setTextColor:(UIColor *)color withSender:(id)sender; >> >> Not sure how “with” fits here. > > I suppose the "with" doesn't add anything here except more keystrokes :P > > Removed the "with" (Ah, I recall now — I was initially inspired to add the "with" by `- (BOOL)canPerformAction:(SEL)action withSender:(nullable id)sender` on UIResponder).
Wenson Hsieh
Comment 7 2018-10-02 21:53:07 PDT
Wenson Hsieh
Comment 8 2018-10-02 21:55:37 PDT
Created attachment 351479 [details] Update ChangeLog
Wenson Hsieh
Comment 9 2018-10-03 10:51:49 PDT
Created attachment 351535 [details] Add setFontSize:sender:
Wenson Hsieh
Comment 10 2018-10-04 19:24:13 PDT
Created attachment 351649 [details] Patch for landing
WebKit Commit Bot
Comment 11 2018-10-04 20:03:28 PDT
Comment on attachment 351649 [details] Patch for landing Clearing flags on attachment: 351649 Committed r236867: <https://trac.webkit.org/changeset/236867>
Note You need to log in before you can comment on or make changes to this bug.