WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
75220
Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220
Summary
Find indicators overlap when a match spans multiple text boxes
mitz
Reported
2011-12-25 20:49:34 PST
Find indicators overlap when a match spans multiple text boxes
Attachments
If find indicators for individual text boxes would overlap, use a single find indicator encompassing all text boxes
(6.96 KB, patch)
2011-12-25 20:57 PST
,
mitz
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2011-12-25 20:57:21 PST
Created
attachment 120522
[details]
If find indicators for individual text boxes would overlap, use a single find indicator encompassing all text boxes
Darin Adler
Comment 2
2011-12-25 21:00:40 PST
Comment on
attachment 120522
[details]
If find indicators for individual text boxes would overlap, use a single find indicator encompassing all text boxes 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?
mitz
Comment 3
2011-12-25 21:21:49 PST
(In reply to
comment #2
)
> (From update of
attachment 120522
[details]
) > 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
Fixed.
> > Source/WebKit2/UIProcess/FindIndicator.cpp:90 > > +static bool findIndicatorsForTextRectsOverlap(const Vector<WebCore::FloatRect>& textRects) > > No need for WebCore:: prefix here.
Fixed.
> > > 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?
Sadly, I don’t know the answer. Thanks for the review! Landed in <
http://trac.webkit.org/r103677
>.
Alexey Proskuryakov
Comment 4
2011-12-25 21:23:48 PST
***
Bug 69816
has been marked as a duplicate of this bug. ***
mitz
Comment 5
2012-04-11 09:54:42 PDT
<
rdar://problem/11215218
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug