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

Unified Diff: Source/core/dom/Element.h

Issue 1099963003: Support type selector for camel-cased SVG elements in HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review issues. Created 5 years, 7 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
« no previous file with comments | « Source/core/css/SelectorFilter.cpp ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 7eb6e4569fd61e548d60539d9e787152bcddb314..5a9b6d0fc6f2e2ee5c14685dcd39ca93f4df2e98 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -239,6 +239,7 @@ public:
bool hasLocalName(const AtomicString& other) const { return m_tagName.localName() == other; }
virtual const AtomicString& localName() const override final { return m_tagName.localName(); }
+ AtomicString localNameForSelectorMatching() const;
const AtomicString& prefix() const { return m_tagName.prefix(); }
virtual const AtomicString& namespaceURI() const override final { return m_tagName.namespaceURI(); }
@@ -846,6 +847,13 @@ inline void Element::setTagNameForCreateElementNS(const QualifiedName& tagName)
m_tagName = tagName;
}
+inline AtomicString Element::localNameForSelectorMatching() const
+{
+ if (isHTMLElement() || !document().isHTMLDocument())
+ return localName();
+ return localName().lower();
+}
+
inline bool isShadowHost(const Node* node)
{
return node && node->isElementNode() && toElement(node)->shadow();
« no previous file with comments | « Source/core/css/SelectorFilter.cpp ('k') | Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698