[Webkit-unassigned] [Bug 166955] AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 29 17:40:52 PST 2017


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

Ryosuke Niwa <rniwa at webkit.org> changed:

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

--- Comment #30 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 300064
  --> https://bugs.webkit.org/attachment.cgi?id=300064
patch

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

r=me assuming enrica & darin are happy with this patch as well.

> Source/WebCore/editing/TextIterator.cpp:2675
> +            if (matches(lastCharacterInBufferOffset - matchStartOffset, newMatchLength))

We should probably call this "match" since we usually use a verb for function names.

> Source/WebCore/editing/TextIterator.cpp:2681
> -Ref<Range> findPlainText(const Range& range, const String& target, FindOptions options)
> +static void updateSearchBuffer(SearchBuffer& buffer, const Range& range)

I think it's cleaner if updateSearchBuffer and findIteratorOptions were just merged into findPlainTextMatches
since findClosestPlainText and findPlainText don't need to have access to SearchBuffer at all.
So make findPlainTextMatches take a Range, and options before the adjustment.

> Source/WebCore/editing/TextIterator.cpp:2702
> +static Ref<Range> rangeMatches(const Range& range, TextIteratorBehavior iteratorOptions, size_t matchStart, size_t matchLength, bool searchForward)

We don't have "matches". We have a single match here.
So it's probably more appropriate to call this function rangeForMatch or matchedRange.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1837
> +        send(Messages::WebPageProxy::SelectionRectsCallback(Vector<WebCore::SelectionRect>(), callbackID));

You couldn't just do ({ }, callbackID))?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1846
> +        send(Messages::WebPageProxy::SelectionRectsCallback(Vector<WebCore::SelectionRect>(), callbackID));

Ditto.

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


More information about the webkit-unassigned mailing list