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

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: Fixed failing test (/fast/forms/file/input-file-re-render.html) 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
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/shadow/ElementShadow.h ('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 807aeabab367dea09b26da69ddc729063c0ecc0d..2e988ee0ab78aeedb2595db42ec8879d0a025bdc 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -72,21 +72,27 @@ void ElementShadow::removeAllShadowRoots()
m_distributor.invalidateDistribution(shadowHost);
}
-void ElementShadow::attach()
+void ElementShadow::attach(const Node::AttachContext& context)
{
ContentDistributor::ensureDistribution(host());
+ 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/Document.cpp ('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