Index: Source/core/page/DOMSelection.cpp |
diff --git a/Source/core/page/DOMSelection.cpp b/Source/core/page/DOMSelection.cpp |
index fb95fefd6336c95c867903e4134b691e43b274f0..13cc50a45e8aa6a15f705572d9be81b7bbbbc97d 100644 |
--- a/Source/core/page/DOMSelection.cpp |
+++ b/Source/core/page/DOMSelection.cpp |
@@ -336,7 +336,7 @@ void DOMSelection::extend(Node* node, int offset, ExceptionState& exceptionState |
exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is not a valid offset."); |
return; |
} |
- if (offset > (node->offsetInCharacters() ? caretMaxOffset(node) : (int)node->childNodeCount())) { |
+ if (offset > (node->offsetInCharacters() ? caretMaxOffset(node) : (int)node->countChildren())) { |
exceptionState.throwDOMException(IndexSizeError, String::number(offset) + " is larger than the given node's length."); |
return; |
} |
@@ -481,7 +481,7 @@ void DOMSelection::selectAllChildren(Node* n, ExceptionState& exceptionState) |
return; |
// This doesn't (and shouldn't) select text node characters. |
- setBaseAndExtent(n, 0, n, n->childNodeCount(), exceptionState); |
+ setBaseAndExtent(n, 0, n, n->countChildren(), exceptionState); |
} |
String DOMSelection::toString() |