[webkit-reviews] review granted: [Bug 75220] Find indicators overlap when a match spans multiple text boxes : [Attachment 120522] If find indicators for individual text boxes would overlap, use a single find indicator encompassing all text boxes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 25 21:00:40 PST 2011


Darin Adler <darin at apple.com> has granted mitz at webkit.org's request for review:
Bug 75220: Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220

Attachment 120522: If find indicators for individual text boxes would overlap,
use a single find indicator encompassing all text boxes
https://bugs.webkit.org/attachment.cgi?id=120522&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=120522&action=review


> Source/WebCore/ChangeLog:8
> +	   * WebCore.exp.in: Exported new unionRect(const Vector<FloatRect>&)
and exisitng

Typo: exisitng

> Source/WebCore/platform/graphics/FloatRect.h:243
> +FloatRect unionRect(const Vector<FloatRect>&);

Wish there was a generic way to make this take any collection with begin/end
instead of just a Vector specifically.

> Source/WebKit2/UIProcess/FindIndicator.cpp:90
> +static bool findIndicatorsForTextRectsOverlap(const
Vector<WebCore::FloatRect>& textRects)

No need for WebCore:: prefix here.

> Source/WebKit2/UIProcess/FindIndicator.cpp:108
> +	   for (size_t j = indicatorRects.size(); j; ) {
> +	       --j;
> +	       if (indicatorRect.intersects(indicatorRects[j]))
> +		   return true;
> +	   }

Is there any way to mitigate the n^2 nature of this algorithm?


More information about the webkit-reviews mailing list