[webkit-reviews] review granted: [Bug 237408] [iOS] Support PDF search when using a find interaction : [Attachment 453699] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 08:49:07 PDT 2022


Wenson Hsieh <wenson_hsieh at apple.com> has granted Aditya Keerthi
<akeerthi at apple.com>'s request for review:
Bug 237408: [iOS] Support PDF search when using a find interaction
https://bugs.webkit.org/show_bug.cgi?id=237408

Attachment 453699: Patch

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




--- Comment #4 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 453699
  --> https://bugs.webkit.org/attachment.cgi?id=453699
Patch

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

> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:787
> +	   if ([_customContentView
conformsToProtocol:@protocol(_UITextSearching)])
> +	       [_findInteraction
setSearchableObject:(id<_UITextSearching>)_customContentView.get()];
> +	   else
> +	       [_findInteraction setSearchableObject:_contentView.get()];

Nit - perhaps you could factor this out into a helper function, and use it both
here and in `-_setFindInteractionEnabled:` below.

> Source/WebKit/UIProcess/ios/WKPDFView.mm:101
> +    auto pos = adoptNS([[WKPDFFoundTextPosition alloc] init]);

Nit - we usually don't abbreviate local variable names. Maybe rename to
`position`?


More information about the webkit-reviews mailing list