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

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

Issue 23528005: Revert "Remove ShouldSetAttached flag to lazyAttach" (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/html/HTMLFrameElementBase.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 7a883fbbb0dc81a1e703bce489c5f29ead8bdea9..c9323b3dbb7fa6990d8fde759c80e59733f85c6b 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -775,16 +775,18 @@ void Node::setNeedsStyleRecalc(StyleChangeType changeType, StyleChangeSource sou
markAncestorsWithChildNeedsStyleRecalc();
}
-void Node::lazyAttach()
+void Node::lazyAttach(ShouldSetAttached shouldSetAttached)
{
markAncestorsWithChildNeedsStyleRecalc();
for (Node* node = this; node; node = NodeTraversal::next(node, this)) {
node->setStyleChange(LazyAttachStyleChange);
if (node->isContainerNode())
node->setChildNeedsStyleRecalc();
- node->setAttached();
+ // FIXME: This flag is only used by HTMLFrameElementBase and doesn't look needed.
+ if (shouldSetAttached == SetAttached)
+ node->setAttached();
for (ShadowRoot* root = node->youngestShadowRoot(); root; root = root->olderShadowRoot())
- root->lazyAttach();
+ root->lazyAttach(shouldSetAttached);
}
}
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/html/HTMLFrameElementBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698