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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 1708213002: Propagate inherited properties into slotted elements on recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed non-oilpan build Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698