[webkit-reviews] review granted: [Bug 235830] Add SPI to retrieve the rect of a found text range : [Attachment 450273] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 28 15:58:28 PST 2022


Wenson Hsieh <wenson_hsieh at apple.com> has granted Aditya Keerthi
<akeerthi at apple.com>'s request for review:
Bug 235830: Add SPI to retrieve the rect of a found text range
https://bugs.webkit.org/show_bug.cgi?id=235830

Attachment 450273: Patch

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




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

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:343
> + at property (nonatomic, readonly) NSArray<UITextRange *>* foundRanges;

Nit - the *s are inconsistent here.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:501
> +    auto ranges = adoptNS(getTextRangesForQueryString(webView.get(),
@"Sapien"));

Nit - functions that return +1 Objective-C ids usually start with names like
"copy" or "new".

Perhaps, `copyTextRangesForQueryString`? (Or you could just move the adoptNS
into the helper function itself, and return a RetainPtr instead).


More information about the webkit-reviews mailing list