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

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

Issue 2490393002: Match camelCased SVG attributes selectors in html documents. (Closed)
Patch Set: Rebased and fixed return statement Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Attribute.h
diff --git a/third_party/WebKit/Source/core/dom/Attribute.h b/third_party/WebKit/Source/core/dom/Attribute.h
index f207741ae562d9bcfaaa79571e73627833076dd6..8779f88c8fd71c686dcb089b54ddf3e575e0433f 100644
--- a/third_party/WebKit/Source/core/dom/Attribute.h
+++ b/third_party/WebKit/Source/core/dom/Attribute.h
@@ -53,6 +53,7 @@ class Attribute {
bool isEmpty() const { return m_value.isEmpty(); }
bool matches(const QualifiedName&) const;
+ bool matchesCaseInsensitive(const QualifiedName&) const;
void setValue(const AtomicString& value) { m_value = value; }
@@ -79,6 +80,13 @@ inline bool Attribute::matches(const QualifiedName& qualifiedName) const {
qualifiedName.namespaceURI() == namespaceURI();
}
+inline bool Attribute::matchesCaseInsensitive(
+ const QualifiedName& qualifiedName) const {
+ return qualifiedName.localNameUpper() == m_name.localNameUpper() &&
+ (qualifiedName.prefix() == starAtom ||
+ qualifiedName.namespaceURI() == namespaceURI());
+}
+
} // namespace blink
#endif // Attribute_h
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698