Index: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp |
index 2fa0a8ddcda2544784bae1ab2d174b9588abdf70..b694c014da6ea8c718477c86838cb7dcb9685e45 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp |
@@ -45,6 +45,7 @@ using namespace HTMLNames; |
inline HTMLSlotElement::HTMLSlotElement(Document& document) |
: HTMLElement(slotTag, document) |
{ |
+ setHasCustomStyleCallbacks(); |
} |
DEFINE_NODE_FACTORY(HTMLSlotElement); |
@@ -214,6 +215,15 @@ void HTMLSlotElement::removedFrom(ContainerNode* insertionPoint) |
HTMLElement::removedFrom(insertionPoint); |
} |
+void HTMLSlotElement::willRecalcStyle(StyleRecalcChange change) |
+{ |
+ if (change < Inherit && styleChangeType() < SubtreeStyleChange) |
+ return; |
+ |
+ for (auto& node : m_distributedNodes) |
+ node->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributedNodes)); |
+} |
+ |
void HTMLSlotElement::updateDistributedNodesWithFallback() |
{ |
if (!m_distributedNodes.isEmpty()) |