Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: Source/core/dom/Range.cpp

Issue 24773003: Rename Node::attached() to confusingAndOftenMisusedAttached() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/NodeRenderingContext.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index 9c1900ac364f568fc4c29bd2e19b8cf0e650a68a..6dbb4423e59210e1df4c454a8e19200a668da4f2 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -304,7 +304,7 @@ bool Range::isPointInRange(Node* refNode, int offset, ExceptionState& es)
return false;
}
- if (!refNode->attached() || &refNode->document() != m_ownerDocument) {
+ if (!refNode->confusingAndOftenMisusedAttached() || &refNode->document() != m_ownerDocument) {
return false;
}
@@ -332,7 +332,7 @@ short Range::comparePoint(Node* refNode, int offset, ExceptionState& es) const
return 0;
}
- if (!refNode->attached() || &refNode->document() != m_ownerDocument) {
+ if (!refNode->confusingAndOftenMisusedAttached() || &refNode->document() != m_ownerDocument) {
es.throwUninformativeAndGenericDOMException(WrongDocumentError);
return 0;
}
@@ -367,12 +367,12 @@ Range::CompareResults Range::compareNode(Node* refNode, ExceptionState& es) cons
return NODE_BEFORE;
}
- if (!m_start.container() && refNode->attached()) {
+ if (!m_start.container() && refNode->confusingAndOftenMisusedAttached()) {
es.throwUninformativeAndGenericDOMException(InvalidStateError);
return NODE_BEFORE;
}
- if (m_start.container() && !refNode->attached()) {
+ if (m_start.container() && !refNode->confusingAndOftenMisusedAttached()) {
// Firefox doesn't throw an exception for this case; it returns 0.
return NODE_BEFORE;
}
@@ -581,7 +581,7 @@ bool Range::intersectsNode(Node* refNode, ExceptionState& es)
return false;
}
- if (!refNode->attached() || &refNode->document() != m_ownerDocument) {
+ if (!refNode->confusingAndOftenMisusedAttached() || &refNode->document() != m_ownerDocument) {
// Firefox doesn't throw an exception for these cases; it returns false.
return false;
}
« no previous file with comments | « Source/core/dom/NodeRenderingContext.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698