Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 4d598a4c03e7faeb1e9fdba027f45413d6f12f23..fcdf98954c7f252e9a1b67e2077cec46b3b44cec 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -131,7 +131,7 @@ void Range::setDocument(Document* document) |
Node* Range::startContainer(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -141,7 +141,7 @@ Node* Range::startContainer(ExceptionCode& ec) const |
int Range::startOffset(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -151,7 +151,7 @@ int Range::startOffset(ExceptionCode& ec) const |
Node* Range::endContainer(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -161,7 +161,7 @@ Node* Range::endContainer(ExceptionCode& ec) const |
int Range::endOffset(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -171,7 +171,7 @@ int Range::endOffset(ExceptionCode& ec) const |
Node* Range::commonAncestorContainer(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -192,7 +192,7 @@ Node* Range::commonAncestorContainer(Node* containerA, Node* containerB) |
bool Range::collapsed(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -214,7 +214,7 @@ static inline bool checkForDifferentRootContainer(const RangeBoundaryPoint& star |
void Range::setStart(PassRefPtr<Node> refNode, int offset, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -243,7 +243,7 @@ void Range::setStart(PassRefPtr<Node> refNode, int offset, ExceptionCode& ec) |
void Range::setEnd(PassRefPtr<Node> refNode, int offset, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -284,7 +284,7 @@ void Range::setEnd(const Position& end, ExceptionCode& ec) |
void Range::collapse(bool toStart, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -297,7 +297,7 @@ void Range::collapse(bool toStart, ExceptionCode& ec) |
bool Range::isPointInRange(Node* refNode, int offset, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return false; |
} |
@@ -326,7 +326,7 @@ short Range::comparePoint(Node* refNode, int offset, ExceptionCode& ec) const |
// refNode node and an offset within the node is before, same as, or after the range respectively. |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -372,7 +372,7 @@ Range::CompareResults Range::compareNode(Node* refNode, ExceptionCode& ec) const |
} |
if (!m_start.container() && refNode->attached()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return NODE_BEFORE; |
} |
@@ -410,7 +410,7 @@ Range::CompareResults Range::compareNode(Node* refNode, ExceptionCode& ec) const |
short Range::compareBoundaryPoints(CompareHow how, const Range* sourceRange, ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -454,7 +454,7 @@ short Range::compareBoundaryPoints(CompareHow how, const Range* sourceRange, Exc |
return compareBoundaryPoints(m_start, sourceRange->m_end, ec); |
} |
- ec = SYNTAX_ERR; |
+ ec = SyntaxError; |
return 0; |
} |
@@ -578,7 +578,7 @@ bool Range::intersectsNode(Node* refNode, ExceptionCode& ec) |
// Throw exception if the range is already detached. |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return false; |
} |
if (!refNode) { |
@@ -930,7 +930,7 @@ PassRefPtr<DocumentFragment> Range::extractContents(ExceptionCode& ec) |
PassRefPtr<DocumentFragment> Range::cloneContents(ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -944,7 +944,7 @@ void Range::insertNode(PassRefPtr<Node> prpNewNode, ExceptionCode& ec) |
ec = 0; |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1049,7 +1049,7 @@ void Range::insertNode(PassRefPtr<Node> prpNewNode, ExceptionCode& ec) |
String Range::toString(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return String(); |
} |
@@ -1089,7 +1089,7 @@ String Range::text() const |
PassRefPtr<DocumentFragment> Range::createContextualFragment(const String& markup, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -1111,7 +1111,7 @@ void Range::detach(ExceptionCode& ec) |
{ |
// Check first to see if we've already detached: |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1206,7 +1206,7 @@ void Range::checkNodeBA(Node* n, ExceptionCode& ec) const |
PassRefPtr<Range> Range::cloneRange(ExceptionCode& ec) const |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return 0; |
} |
@@ -1216,7 +1216,7 @@ PassRefPtr<Range> Range::cloneRange(ExceptionCode& ec) const |
void Range::setStartAfter(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1236,7 +1236,7 @@ void Range::setStartAfter(Node* refNode, ExceptionCode& ec) |
void Range::setEndBefore(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1256,7 +1256,7 @@ void Range::setEndBefore(Node* refNode, ExceptionCode& ec) |
void Range::setEndAfter(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1276,7 +1276,7 @@ void Range::setEndAfter(Node* refNode, ExceptionCode& ec) |
void Range::selectNode(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1339,7 +1339,7 @@ void Range::selectNode(Node* refNode, ExceptionCode& ec) |
void Range::selectNodeContents(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1382,7 +1382,7 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec) |
RefPtr<Node> newParent = passNewParent; |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1440,7 +1440,7 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec) |
if (endNonTextContainer->nodeType() == Node::TEXT_NODE) |
endNonTextContainer = endNonTextContainer->parentNode(); |
if (startNonTextContainer != endNonTextContainer) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1465,7 +1465,7 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec) |
void Range::setStartBefore(Node* refNode, ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |
@@ -1485,7 +1485,7 @@ void Range::setStartBefore(Node* refNode, ExceptionCode& ec) |
void Range::checkDeleteExtract(ExceptionCode& ec) |
{ |
if (!m_start.container()) { |
- ec = INVALID_STATE_ERR; |
+ ec = InvalidStateError; |
return; |
} |