[Webkit-unassigned] [Bug 201775] FindController::findString always updates foundStringMatchIndex even if match is the same as before

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 11 10:15:16 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=201775

Tim Horton <thorton at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #380349|review?                     |review+
              Flags|                            |

--- Comment #10 from Tim Horton <thorton at apple.com> ---
Comment on attachment 380349
  --> https://bugs.webkit.org/attachment.cgi?id=380349
Patch

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

> Source/WebKit/Shared/API/c/WKFindOptions.h:44
> +    kWKFindOptionsShowHighlight = 1 << 7,
> +    kWKFindOptionsNoIndexChange = 1 << 8

You shouldn't have to add this

> Source/WebKit/Shared/API/c/WKSharedAPICast.h:772
> +    if (wkFindOptions & kWKFindOptionsNoIndexChange)
> +        findOptions |= FindOptionsNoIndexChange;

Or this.

> Source/WebKit/Shared/WebFindOptions.h:40
> +    FindOptionsNoIndexChange = 1 << 8,
> +    FindOptionsDetermineMatchIndex = 1 << 9,

Technically fine in this case because it's internal only but still weird to add things in the middle of the enum.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:192
> +    [firstWebView _findString:@"hello" options:findOptions maxCount:maxCount];

This is ObjC API so it should always take ObjC API enums (_WKFindOptions and _WKFindOptionsNoIndexChange). What went wrong that you have to use the C API constant?! Looking at the implementation of _findString:options:maxCount: in WKWebView, it uses the toFindOptions() function that's right above it, which goes from _WKFindOptions->WebKit::FindOptions, so I think this is just wrong.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191011/0532fc3b/attachment.html>


More information about the webkit-unassigned mailing list