Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 4fa8b8b9c967ac96e518ae08f00915e822a667e9..8ab9700a48a5c0c303ca51d19fdd55a244ce2c91 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -1080,26 +1080,7 @@ void Range::selectNode(Node* refNode, ExceptionState& exceptionState) |
return; |
} |
- // InvalidNodeTypeError: Raised if an ancestor of refNode is an Entity, Notation or |
- // DocumentType node or if refNode is a Document, DocumentFragment, ShadowRoot, Attr, Entity, or Notation |
- // node. |
- for (ContainerNode* anc = refNode->parentNode(); anc; anc = anc->parentNode()) { |
- switch (anc->nodeType()) { |
- case Node::ATTRIBUTE_NODE: |
- case Node::CDATA_SECTION_NODE: |
- case Node::COMMENT_NODE: |
- case Node::DOCUMENT_FRAGMENT_NODE: |
- case Node::DOCUMENT_NODE: |
- case Node::ELEMENT_NODE: |
- case Node::PROCESSING_INSTRUCTION_NODE: |
- case Node::TEXT_NODE: |
- break; |
- case Node::DOCUMENT_TYPE_NODE: |
- exceptionState.throwDOMException(InvalidNodeTypeError, "The node provided has an ancestor of type '" + anc->nodeName() + "'."); |
- return; |
- } |
- } |
- |
+ // INVALID_NODE_TYPE_ERR: Raised if refNode is a Document, DocumentFragment or Attr node. |
sof
2015/09/23 10:01:39
InvalidNodeTypeError, not INVALID_NODE_TYPE_ERR, b
pals
2015/09/23 11:34:35
Done.
|
switch (refNode->nodeType()) { |
case Node::CDATA_SECTION_NODE: |
case Node::COMMENT_NODE: |