Optimizations to Element::getAttribute
authorsnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Nov 2009 22:03:20 +0000 (22:03 +0000)
committersnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Nov 2009 22:03:20 +0000 (22:03 +0000)
commit63ac18ecca050fd50894fc319e37893fa0255905
tree16bde6809817b539cea7a97f3ee950ec0856a193
parent5fa47869c4c14ea516aef9472d1cd59568b6013e
Optimizations to Element::getAttribute
https://bugs.webkit.org/show_bug.cgi?id=30926

Reviewed by Darin Adler.

* dom/Element.cpp:
(WebCore::Element::getAttribute):  User case-insensitive compare instead of lowercasing the name.
* dom/NamedAttrMap.cpp:
(WebCore::NamedNodeMap::getAttributeItem):  Avoid redundant compares, and do fast/likely compares first.
* platform/text/PlatformString.h:
(WebCore::equalPossiblyIgnoringCase):  New inline method, used by both of the above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Element.cpp
WebCore/dom/NamedAttrMap.cpp
WebCore/platform/text/PlatformString.h