[webkit-reviews] review granted: [Bug 105713] getAttribute does not behave correctly for mixed-case attributes on HTML elements : [Attachment 191201] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 4 06:02:56 PST 2013


Andreas Kling <akling at apple.com> has granted Arpita Bahuguna
<arpitabahuguna at gmail.com>'s request for review:
Bug 105713: getAttribute does not behave correctly for mixed-case attributes on
HTML elements
https://bugs.webkit.org/show_bug.cgi?id=105713

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

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=191201&action=review


r=me with one adjustment:

> Source/WebCore/dom/Element.h:944
> -	       if (name == attribute->localName())
> +	       if ((shouldIgnoreAttributeCase ? name.lower() : name) ==
attribute->localName())

You can avoid creating a temporary string from .lower() by using
WTF::equalPossiblyIgnoringCase:
if (equalPossiblyIgnoringCase(name, attribute->localName(),
shouldIgnoreAttributeCase)


More information about the webkit-reviews mailing list