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

Unified Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 15871005: Avoid N^2 walk placing renderers when building the render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Again, updating to ToT. Created 7 years, 7 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
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ShadowRoot.cpp
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index fc01f8ee4fffeaf8fa59d3013b84204dd9ac5038..83df7d57a0ac95fe239537683a356d2a6f242638 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -142,6 +142,12 @@ void ShadowRoot::recalcStyle(StyleChange change)
StyleResolver* styleResolver = document()->styleResolver();
styleResolver->pushParentShadowRoot(this);
+ // When we're set to lazyAttach we'll have a FullStyleChange and we'll need
+ // to promote the change to a Force for all our descendants so they get a
+ // recalc and will attach.
+ if (styleChangeType() == FullStyleChange)
ojan 2013/06/03 23:03:29 Did you mean to include this in this patch?
+ change = Force;
+
for (Node* child = firstChild(); child; child = child->nextSibling()) {
if (child->isElementNode())
toElement(child)->recalcStyle(change);
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698