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

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

Issue 1899653002: Support slotchange event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: 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 aa11696e48e513f271c11440900cbd4e7b20a427..3ec5ffdba9003c54ff332adab1ec6d32a8b21cef 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
@@ -30,6 +30,7 @@
#include "core/dom/ElementTraversal.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/StyleChangeReason.h"
+#include "core/dom/StyleEngine.h"
#include "core/dom/shadow/DistributedNodes.h"
#include "core/frame/Deprecation.h"
#include "core/html/HTMLContentElement.h"
@@ -170,6 +171,8 @@ ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRootType typ
shadowRoot->setParentTreeScope(shadowHost.treeScope());
m_shadowRoots.push(shadowRoot);
setNeedsDistributionRecalc();
+ if (shadowHost.document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1)
+ shadowHost.document().updateAssignment();
shadowRoot->insertedInto(&shadowHost);
shadowHost.setChildNeedsStyleRecalc();
@@ -348,6 +351,8 @@ void ElementShadow::willAffectSelector()
shadow->setNeedsSelectFeatureSet();
}
setNeedsDistributionRecalc();
+ if (host()->document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1)
+ host()->document().updateAssignment();
}
void ElementShadow::clearDistribution()

Powered by Google App Engine
This is Rietveld 408576698