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(); |