Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: third_party/WebKit/Source/core/dom/AttributeCollection.h

Issue 2814673002: Use ASCII-caseless matching for attribute names. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/AttributeCollection.h
diff --git a/third_party/WebKit/Source/core/dom/AttributeCollection.h b/third_party/WebKit/Source/core/dom/AttributeCollection.h
index 30f1cb591406aff392b883e75bee36d58285c633..304aa899565b9e8aaca1732e00e924135a832623 100644
--- a/third_party/WebKit/Source/core/dom/AttributeCollection.h
+++ b/third_party/WebKit/Source/core/dom/AttributeCollection.h
@@ -142,7 +142,8 @@ AttributeCollectionGeneric<Container, ContainerMemberType>::FindIndex(
iterator end = this->end();
unsigned index = 0;
for (iterator it = begin(); it != end; ++it, ++index) {
- if (it->GetName().MatchesPossiblyIgnoringCase(name, should_ignore_case))
+ if (it->GetName().MatchesPossiblyIgnoringASCIICase(name,
+ should_ignore_case))
return index;
}
return kNotFound;
@@ -204,14 +205,14 @@ size_t AttributeCollectionGeneric<Container, ContainerMemberType>::FindSlowCase(
// and all HTML/SVG attributes have a null namespace!
if (!it->GetName().HasPrefix()) {
if (should_ignore_attribute_case &&
- DeprecatedEqualIgnoringCase(name, it->LocalName()))
+ EqualIgnoringASCIICase(name, it->LocalName()))
return index;
} else {
- // FIXME: Would be faster to do this comparison without calling toString,
+ // FIXME: Would be faster to do this comparison without calling ToString,
// which generates a temporary string by concatenation. But this branch is
// only reached if the attribute name has a prefix, which is rare in HTML.
- if (EqualPossiblyIgnoringCase(name, it->GetName().ToString(),
- should_ignore_attribute_case))
+ if (EqualPossiblyIgnoringASCIICase(name, it->GetName().ToString(),
+ should_ignore_attribute_case))
return index;
}
}

Powered by Google App Engine
This is Rietveld 408576698