[webkit-reviews] review granted: [Bug 74189] WebKit should ignore images with @alt matching only whitespace : [Attachment 118595] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 9 11:41:14 PST 2011


Darin Adler <darin at apple.com> has granted chris fleizach
<cfleizach at apple.com>'s request for review:
Bug 74189: WebKit should ignore images with @alt matching only whitespace
https://bugs.webkit.org/show_bug.cgi?id=74189

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

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


> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1900
> +	       if (!alt.string().stripWhiteSpace().isEmpty())

A better way to write this is:

    if (!alt.string().containsOnlyWhitespace())

One subtle issue is that the containsOnlyWhitespace function uses the
isASCIISpace definition of whitespace, not the HTML space definition, and there
are some almost certainly irrelevant subtle differences between the two.


More information about the webkit-reviews mailing list