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

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

Issue 16951003: Fix broken AttachContext from r152289 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unwanted comments and passed context to Shadow DOM elements Created 7 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
Index: Source/core/dom/shadow/ElementShadow.cpp
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
index ec30bd6535872d8ca0034ea802178af075185b1e..0942a47a6b8c2db7db4ebded9d878c16c298c3f3 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -78,21 +78,27 @@ void ElementShadow::removeAllShadowRoots()
m_distributor.invalidateDistribution(shadowHost);
}
-void ElementShadow::attach()
+void ElementShadow::attach(const Node::AttachContext& context)
{
ContentDistributor::ensureDistribution(youngestShadowRoot());
+ Node::AttachContext childrenContext(context);
+ childrenContext.resolvedStyle = 0;
+
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
if (!root->attached())
- root->attach();
+ root->attach(childrenContext);
}
}
-void ElementShadow::detach()
+void ElementShadow::detach(const Node::AttachContext& context)
{
+ Node::AttachContext childrenContext(context);
+ childrenContext.resolvedStyle = 0;
+
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
if (root->attached())
- root->detach();
+ root->detach(childrenContext);
}
}
« Source/core/dom/shadow/ElementShadow.h ('K') | « Source/core/dom/shadow/ElementShadow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698