[Webkit-unassigned] [Bug 158395] Find on page finds too many matches

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 5 10:13:06 PDT 2016


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

--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 280547
  --> https://bugs.webkit.org/attachment.cgi?id=280547
patch

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

Wow, I am so excited about this one.

> Source/WebCore/editing/TextIterator.cpp:215
> +    return downcast<RenderBox>(*renderer).contentBoxRect().isEmpty();

It’s a shame that this has to compute the position of the content box, since the code doesn’t need it. The width and height are always just contentWidth() and contentHeight(). If there was a helper that just returned that we could have used it.

> Source/WebCore/editing/TextIterator.cpp:254
> +    auto* owner = document.ownerElement();
> +    while (owner) {

I’d like this better as a for loop:

    for (auto* owner = document.ownerElement(); owner; owner = owner->document().ownerElement()) {

> Source/WebCore/editing/TextIterator.cpp:1206
> +    , m_positionNode(nullptr)

I don’t think this is needed. The class definition already sets m_positionNode to nullptr.

> Source/WebCore/editing/TextIteratorBehavior.h:58
> +    // Makes visiblility test take into account the visibility of the frame.

Typo in the first use of the word "visibility".

-- 
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/20160605/a803d438/attachment-0001.html>


More information about the webkit-unassigned mailing list