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

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

Issue 23874007: Rename AttachBehavior to RecalcStyleBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix enum usage 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/Node.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 e648d8f4f273c970bccbe54d877995643a01687e..e8c957c302535f39be8641be62ce7392c4b25d72 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -64,15 +64,12 @@ ChildNodesLazySnapshot* ChildNodesLazySnapshot::latestSnapshot = 0;
unsigned NoEventDispatchAssertion::s_count = 0;
#endif
-static inline void attachAfterInsertion(Node* node, AttachBehavior attachBehavior = AttachLazily)
+static inline void attachAfterInsertion(Node* node)
{
if (node->attached() || !node->parentNode() || !node->parentNode()->attached())
return;
- if (attachBehavior == AttachLazily)
- node->lazyAttach();
- else
- node->attach();
+ node->lazyAttach();
if (StyleResolver* resolver = node->document().styleResolverIfExists())
resolver->clearStyleSharingList();
@@ -318,7 +315,7 @@ void ContainerNode::insertBeforeCommon(Node* nextChild, Node* newChild)
newChild->setNextSibling(nextChild);
}
-void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChild, AttachBehavior attachBehavior)
+void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChild)
{
ASSERT(newChild);
ASSERT(nextChild);
@@ -342,7 +339,7 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChil
ChildNodeInsertionNotifier(this).notify(newChild.get());
- attachAfterInsertion(newChild.get(), attachBehavior);
+ attachAfterInsertion(newChild.get());
}
void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState& es)
@@ -657,7 +654,7 @@ void ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionState& es)
dispatchSubtreeModifiedEvent();
}
-void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild, AttachBehavior attachBehavior)
+void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild)
{
ASSERT(newChild);
ASSERT(!newChild->parentNode()); // Use appendChild if you need to handle reparenting (and want DOM mutation events).
@@ -682,7 +679,7 @@ void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild, AttachBehavior
childrenChanged(true, last, 0, 1);
ChildNodeInsertionNotifier(this).notify(newChild.get());
- attachAfterInsertion(newChild.get(), attachBehavior);
+ attachAfterInsertion(newChild.get());
}
void ContainerNode::suspendPostAttachCallbacks()
« no previous file with comments | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698