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

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

Issue 1151593005: Mark host for style recalc (and child recalc) whenever adding a ShadowRoot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/fast/dom/shadow/shadow-added-display-none-host-expected.txt ('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/ElementShadow.cpp
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
index a11b94627e18f0af0578138171da152443bcc9fb..78c619d2d0bc87ea53f2bae4af4098b124a9e138 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -169,6 +169,9 @@ ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRoot::Shadow
setNeedsDistributionRecalc();
shadowRoot->insertedInto(&shadowHost);
+ shadowHost.setChildNeedsStyleRecalc();
+ shadowHost.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Shadow));
+
InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot.get());
return *shadowRoot;
« no previous file with comments | « LayoutTests/fast/dom/shadow/shadow-added-display-none-host-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698