[webkit-reviews] review denied: [Bug 25452] AX: Don't create addition space AXStaticText element for every bold or link tag : [Attachment 29855] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 28 11:51:52 PDT 2009


Darin Adler <darin at apple.com> has denied chris fleizach <cfleizach at apple.com>'s
request for review:
Bug 25452: AX: Don't create addition space AXStaticText element for every bold
or link tag
https://bugs.webkit.org/show_bug.cgi?id=25452

Attachment 29855: patch 
https://bugs.webkit.org/attachment.cgi?id=29855&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +	   // text elements that are just empty whitespace should not be
returned
> +	   String text = renderText->text()->simplifyWhiteSpace();
> +	   if (text.isNull() || text.isEmpty())
> +	       return true;
> +	   return false;

This should just be:

    return renderText->text()->simplifyWhiteSpace().isEmpty();

There's no need for a separate isNull check since null strings are also
guaranteed to be empty. But really, to be efficient, it should be:

    return renderText->text()->containsOnlyWhitespace();

Unfortunately, that function is currently defined for StringImpl* but not for
String. Since RenderText guarantees that text() will never return null (you can
see assertions to that effect inside the class), you can do this:

    return renderText->text()->impl()->containsOnlyWhitespace();

I’ll say review- because it would be better to do the more efficient version.


More information about the webkit-reviews mailing list