Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 00d15ffe33f87e86972771db485079ebb87c8f66..38179ffa1d15af2f96a63e8847bd0eb7f08e4af7 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -1483,7 +1483,7 @@ static void appendTextContent(const Node* node, bool convertBRsToNewlines, bool& |
case Node::ATTRIBUTE_NODE: |
case Node::DOCUMENT_FRAGMENT_NODE: |
isNullString = false; |
- for (Node* child = node->firstChild(); child; child = child->nextSibling()) { |
+ for (Node* child = toContainerNode(node)->firstChild(); child; child = child->nextSibling()) { |
Node::NodeType childNodeType = child->nodeType(); |
if (childNodeType == Node::COMMENT_NODE || childNodeType == Node::PROCESSING_INSTRUCTION_NODE) |
continue; |