[webkit-reviews] review denied: [Bug 190119] [iOS] Add SPI to expose typing attributes at the current selection on WKWebView : [Attachment 351524] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 3 11:07:40 PDT 2018


Alex Christensen <achristensen at apple.com> has denied Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 190119: [iOS] Add SPI to expose typing attributes at the current selection
on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=190119

Attachment 351524: Patch

https://bugs.webkit.org/attachment.cgi?id=351524&action=review




--- Comment #2 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 351524
  --> https://bugs.webkit.org/attachment.cgi?id=351524
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:124
> +- (void)_webView:(WKWebView *)webView
fontAttributesDidChange:(NSDictionary<NSString *, id> *)fontAttributes
WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));

Why not use a KVO observable property on the WKWebView?  This sounds exactly
like what KVO is for.

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1264
> +    if ([uiDelegate
respondsToSelector:@selector(_webView:fontAttributesDidChange:)]) {

We cache the results of all the respondsToSelector booleans in UIDelegate.h for
performance.  Reading 1 bit is much faster than respondsToSelector.


More information about the webkit-reviews mailing list