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

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: 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 e6e061fd43441c0744f6756e3e144a599401666e..6be792f3adad27dde1371b8def2c19f719cfe199 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -43,6 +43,7 @@ using namespace HTMLNames;
inline HTMLSlotElement::HTMLSlotElement(Document& document)
: HTMLElement(slotTag, document)
{
+ setHasCustomStyleCallbacks();
}
DEFINE_NODE_FACTORY(HTMLSlotElement);
@@ -201,6 +202,15 @@ void HTMLSlotElement::removedFrom(ContainerNode* insertionPoint)
HTMLElement::removedFrom(insertionPoint);
}
+void HTMLSlotElement::willRecalcStyle(StyleRecalcChange change)
+{
+ if (change < Inherit && styleChangeType() < SubtreeStyleChange)
+ return;
+
+ for (Node* node : m_distributedNodes)
kochi 2016/02/19 08:04:56 Hmm, this should have been RefPtrWillBeRawPtr<Node
+ 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