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

Unified Diff: Source/core/dom/Node.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/Node.h ('k') | Source/core/dom/NodeRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 03cc69cf7767cb26c9c96748663998d771bb7d29..2c8d620ea48559f00c226405bcb8c5dade6e15c4 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -730,7 +730,7 @@ void Node::derefEventTarget()
void Node::setNeedsStyleRecalc(StyleChangeType changeType, StyleChangeSource source)
{
ASSERT(changeType != NoStyleChange);
- if (!attached()) // changed compared to what?
+ if (!confusingAndOftenMisusedAttached()) // changed compared to what?
return;
if (source == StyleChangeFromRenderer)
@@ -960,7 +960,7 @@ inline void Node::detachNode(Node* root, const AttachContext& context)
continue;
}
// Handle normal reattaches from style recalc (ex. display type changes)
- if (node->attached())
+ if (node->confusingAndOftenMisusedAttached())
node->detach(context);
node = NodeTraversal::nextSkippingChildren(node, root);
}
@@ -978,7 +978,7 @@ void Node::reattach(const AttachContext& context)
void Node::attach(const AttachContext&)
{
ASSERT(document().inStyleRecalc() || isDocumentNode());
- ASSERT(!attached());
+ ASSERT(!confusingAndOftenMisusedAttached());
ASSERT(!renderer() || (renderer()->style() && (renderer()->parent() || renderer()->isRenderView())));
setAttached();
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/NodeRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698