Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index fe8f945943988dc2dfd501ec228d51f66d6d92c7..1a5accb21ff73fceb930953ceea1b22bb6fe2b1a 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1140,8 +1140,10 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ol |
if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow, name, newValue)) |
parentElementShadow->setNeedsDistributionRecalc(); |
} |
- if (name == HTMLNames::slotAttr && isChildOfV1ShadowHost()) |
+ if (name == HTMLNames::slotAttr && isChildOfV1ShadowHost()) { |
parentElementShadow()->setNeedsDistributionRecalc(); |
+ document().updateAssignment(); |
+ } |
parseAttribute(name, oldValue, newValue); |
@@ -2069,8 +2071,13 @@ void Element::childrenChanged(const ChildrenChange& change) |
if (!change.byParser && change.isChildElementChange()) |
checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingElementRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAfterChange); |
- if (ElementShadow* shadow = this->shadow()) |
+ if (ElementShadow* shadow = this->shadow()) { |
shadow->setNeedsDistributionRecalc(); |
+ if (document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1) { |
+ if ((isShadowHost(*this) && shadowRoot()->isV1()) || isHTMLSlotElement(*this)) |
+ document().updateAssignment(); |
+ } |
+ } |
} |
void Element::finishParsingChildren() |