[webkit-reviews] review granted: [Bug 43996] Add ability to count text matches without marking : [Attachment 66072] Updated Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 31 10:47:29 PDT 2010


Darin Adler <darin at apple.com> has granted Sam Weinig <sam at webkit.org>'s request
for review:
Bug 43996: Add ability to count text matches without marking
https://bugs.webkit.org/show_bug.cgi?id=43996

Attachment 66072: Updated Patch
https://bugs.webkit.org/attachment.cgi?id=66072&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +	   // Do a "fake" paint in order to execute the code that computes the
rendered rect for
> +	   // each text match.

Merge comment into one line?

> +	   Document* doc = document();
> +	   if (m_view && contentRenderer()) {
> +	       doc->updateLayout(); // Ensure layout is up to date.

Get rid of pointless local variable "doc"?

> -	   unsigned markAllMatchesForText(const String&, bool caseFlag,
unsigned limit);
> +	   unsigned countMatchesForText(const String&, bool caseFlag, unsigned
limit, bool markMatches);

A boolean for this is not great, since we’re often passing a constant. I
suppose we can live with this, but it’s ugly.


More information about the webkit-reviews mailing list