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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp

Issue 2945993002: Experimental: Change LazyReattachIfAttached to SetChildNeedsStyleRecalc
Patch Set: Use SetNeedsStyleRecalc Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
index 8508993596ce62a25cc7ad42f6d81113ddb8f05f..c2719b46de20dc8a6b162babcaf78b434f7d4b57 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
@@ -83,8 +83,11 @@ ShadowRoot& ElementShadow::AddShadowRoot(Element& shadow_host,
if (type == ShadowRootType::V0) {
SetNeedsDistributionRecalc();
} else {
- for (Node& child : NodeTraversal::ChildrenOf(shadow_host))
- child.LazyReattachIfAttached();
+ for (Node& child : NodeTraversal::ChildrenOf(shadow_host)) {
+ child.SetNeedsStyleRecalc(
+ kSubtreeStyleChange,
+ StyleChangeReasonForTracing::Create(StyleChangeReason::kShadow));
+ }
}
shadow_root->InsertedInto(&shadow_host);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698