Chromium Code Reviews| Index: Source/core/dom/Range.cpp |
| diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
| index 9c9ac3466ca2d477fbb7498f479c7d8c5a8071f1..458e7924d7a51f5e07133c5435916d894e547802 100644 |
| --- a/Source/core/dom/Range.cpp |
| +++ b/Source/core/dom/Range.cpp |
| @@ -657,9 +657,10 @@ static inline unsigned lengthOfContentsInNode(Node* node) |
| case Node::ELEMENT_NODE: |
| case Node::ATTRIBUTE_NODE: |
| case Node::DOCUMENT_NODE: |
| - case Node::DOCUMENT_TYPE_NODE: |
| case Node::DOCUMENT_FRAGMENT_NODE: |
| - return node->childNodeCount(); |
| + return toContainerNode(node)->childNodeCount(); |
|
Inactive
2014/02/19 04:13:33
Those are all ContainerNodes so we can cast and by
|
| + case Node::DOCUMENT_TYPE_NODE: |
|
Inactive
2014/02/19 04:13:33
DocumentType is not a ContainerNode and thus canno
|
| + return 0; |
| } |
| ASSERT_NOT_REACHED(); |
| return 0; |