Index: Source/core/xml/parser/XMLDocumentParser.cpp |
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
index bb534c2b7fd416cf53a5dbc0fd2ea9c604932de1..48ffd716061d48b477547a81c4ae603f66ba0605 100644 |
--- a/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -812,15 +812,13 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent |
for (; !elemStack.isEmpty(); elemStack.removeLast()) { |
Element* element = elemStack.last(); |
- if (element->hasAttributes()) { |
- AttributeCollection attributes = element->attributes(); |
- AttributeCollection::const_iterator end = attributes.end(); |
- for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) { |
- if (it->localName() == xmlnsAtom) |
- m_defaultNamespaceURI = it->value(); |
- else if (it->prefix() == xmlnsAtom) |
- m_prefixToNamespaceMap.set(it->localName(), it->value()); |
- } |
+ AttributeCollection attributes = element->attributes(); |
+ AttributeCollection::const_iterator end = attributes.end(); |
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) { |
+ if (it->localName() == xmlnsAtom) |
+ m_defaultNamespaceURI = it->value(); |
+ else if (it->prefix() == xmlnsAtom) |
+ m_prefixToNamespaceMap.set(it->localName(), it->value()); |
} |
} |