Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index e9a4172aa4ef341cb4df6eb9872289db5383a129..c9a401485eea2cae98a489199e7ce4ec0180c8e3 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -494,14 +494,13 @@ void Node::normalize() |
while (Node* firstChild = node->firstChild()) |
node = firstChild; |
while (node) { |
- NodeType type = node->nodeType(); |
- if (type == ELEMENT_NODE) |
+ if (node->isElementNode()) |
toElement(node)->normalizeAttributes(); |
if (node == this) |
break; |
- if (type == TEXT_NODE) |
+ if (node->nodeType() == TEXT_NODE) |
aandrey
2014/06/02 14:50:51
node->isTextNode() ?
Inactive
2014/06/02 15:48:02
This is not equivalent, isTextNode() returns true
|
node = toText(node)->mergeNextSiblingNodesIfPossible(); |
else |
node = NodeTraversal::nextPostOrder(*node); |
@@ -1468,7 +1467,8 @@ static void appendTextContent(const Node* node, bool convertBRsToNewlines, bool& |
case Node::DOCUMENT_FRAGMENT_NODE: |
isNullString = false; |
for (Node* child = node->firstChild(); child; child = child->nextSibling()) { |
- if (child->nodeType() == Node::COMMENT_NODE || child->nodeType() == Node::PROCESSING_INSTRUCTION_NODE) |
+ Node::NodeType childNodeType = child->nodeType(); |
+ if (childNodeType == Node::COMMENT_NODE || childNodeType == Node::PROCESSING_INSTRUCTION_NODE) |
continue; |
appendTextContent(child, convertBRsToNewlines, isNullString, content); |
} |