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

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

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 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 | « Source/core/dom/Document.cpp ('k') | Source/core/html/HTMLAppletElement.h » ('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 c868cbbbb050274867022c60ca5f9d8d92214c58..618c188be3debceb6f49fe6b39d41a2a0c94dd75 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -222,6 +222,9 @@ public:
String tagName() const { return nodeName(); }
bool hasTagName(const QualifiedName& tagName) const { return m_tagName.matches(tagName); }
+ // Should be called only by Document::createElementNS to fix up m_tagName immediately after construction.
+ void setTagNameForCreateElementNS(const QualifiedName&);
+
// A fast function for checking the local name against another atomic string.
bool hasLocalName(const AtomicString& other) const { return m_tagName.localName() == other; }
bool hasLocalName(const QualifiedName& other) const { return m_tagName.localName() == other.localName(); }
@@ -861,6 +864,14 @@ inline const StylePropertySet* Element::presentationAttributeStyle()
return elementData()->presentationAttributeStyle();
}
+inline void Element::setTagNameForCreateElementNS(const QualifiedName& tagName)
eseidel 2013/11/11 23:31:04 We could also just call this setPrefix... :)
adamk 2013/11/11 23:33:04 I agree that the name could use improvement...but
+{
+ // We expect this method to be called only to reset the prefix.
+ ASSERT(tagName.localName() == m_tagName.localName());
+ ASSERT(tagName.namespaceURI() == m_tagName.namespaceURI());
+ m_tagName = tagName;
+}
+
inline bool isShadowHost(const Node* node)
{
return node && node->isElementNode() && toElement(node)->shadow();
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698