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

Unified Diff: Source/core/dom/ContainerNode.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/ContainerNode.h ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 62e29ffee2d1cea0caf797efdb01f0748f10398c..702e74d314f2820b1b61ed19b01c7f93837699d9 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -76,7 +76,7 @@ void ContainerNode::removeDetachedChildren()
for (Node* child = firstChild(); child; child = child->nextSibling())
child->updateAncestorConnectedSubframeCountForRemoval();
}
- // FIXME: We should be able to ASSERT(!attached()) here: https://bugs.webkit.org/show_bug.cgi?id=107801
+ // FIXME: We should be able to ASSERT(!confusingAndOftenMisusedAttached()) here: https://bugs.webkit.org/show_bug.cgi?id=107801
removeDetachedChildrenInContainer<Node, ContainerNode>(this);
}
@@ -97,7 +97,7 @@ void ContainerNode::takeAllChildrenFrom(ContainerNode* oldParent)
oldParent->removeDetachedChildren();
for (unsigned i = 0; i < children.size(); ++i) {
- if (children[i]->attached())
+ if (children[i]->confusingAndOftenMisusedAttached())
children[i]->detach();
// FIXME: We need a no mutation event version of adoptNode.
RefPtr<Node> child = document().adoptNode(children[i].release(), ASSERT_NO_EXCEPTION);
@@ -499,7 +499,7 @@ void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node* ol
ASSERT(oldChild->parentNode() == this);
// Remove from rendering tree
- if (oldChild->attached())
+ if (oldChild->confusingAndOftenMisusedAttached())
oldChild->detach();
if (nextChild)
« no previous file with comments | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698