| Index: Source/core/dom/Range.cpp
|
| diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
|
| index 9ebe446b439aad5d830470d9558174ff25ffbd54..62de735ae2c19be23b20f00fff73f99a88820370 100644
|
| --- a/Source/core/dom/Range.cpp
|
| +++ b/Source/core/dom/Range.cpp
|
| @@ -293,49 +293,6 @@ short Range::comparePoint(Node* refNode, int offset, ExceptionState& exceptionSt
|
| return 0;
|
| }
|
|
|
| -Range::CompareResults Range::compareNode(Node* refNode, ExceptionState& exceptionState) const
|
| -{
|
| - // http://developer.mozilla.org/en/docs/DOM:range.compareNode
|
| - // This method returns 0, 1, 2, or 3 based on if the node is before, after,
|
| - // before and after(surrounds), or inside the range, respectively
|
| -
|
| - if (!refNode) {
|
| - // FIXME: Generated bindings code never calls with null, and neither should other callers!
|
| - exceptionState.throwTypeError("The node provided is null.");
|
| - return NODE_BEFORE;
|
| - }
|
| -
|
| - if (!refNode->inActiveDocument()) {
|
| - // Firefox doesn't throw an exception for this case; it returns 0.
|
| - return NODE_BEFORE;
|
| - }
|
| -
|
| - if (refNode->document() != m_ownerDocument) {
|
| - // Firefox doesn't throw an exception for this case; it returns 0.
|
| - return NODE_BEFORE;
|
| - }
|
| -
|
| - ContainerNode* parentNode = refNode->parentNode();
|
| - int nodeIndex = refNode->nodeIndex();
|
| -
|
| - if (!parentNode) {
|
| - // if the node is the top document we should return NODE_BEFORE_AND_AFTER
|
| - // but we throw to match firefox behavior
|
| - exceptionState.throwDOMException(NotFoundError, "The provided node has no parent.");
|
| - return NODE_BEFORE;
|
| - }
|
| -
|
| - if (comparePoint(parentNode, nodeIndex, exceptionState) < 0) { // starts before
|
| - if (comparePoint(parentNode, nodeIndex + 1, exceptionState) > 0) // ends after the range
|
| - return NODE_BEFORE_AND_AFTER;
|
| - return NODE_BEFORE; // ends before or in the range
|
| - }
|
| - // starts at or after the range start
|
| - if (comparePoint(parentNode, nodeIndex + 1, exceptionState) > 0) // ends after the range
|
| - return NODE_AFTER;
|
| - return NODE_INSIDE; // ends inside the range
|
| -}
|
| -
|
| short Range::compareBoundaryPoints(unsigned how, const Range* sourceRange, ExceptionState& exceptionState) const
|
| {
|
| if (!(how == START_TO_START || how == START_TO_END || how == END_TO_END || how == END_TO_START)) {
|
|
|