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

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

Issue 2258793003: Use LocalStyleChange for insertion point inheritance propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/LayoutTests/fast/css/invalidation/inherit-through-insertion-point-v0.html ('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/dom/shadow/InsertionPoint.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
index 4f321667275a6f5cfe8e00efe106feb5b83af72b..3403cf8a33463a9fe8237a128eb166b5c59c0459 100644
--- a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
@@ -122,10 +122,17 @@ void InsertionPoint::detachLayoutTree(const AttachContext& context)
void InsertionPoint::willRecalcStyle(StyleRecalcChange change)
{
- if (change < IndependentInherit && getStyleChangeType() < SubtreeStyleChange)
+ StyleChangeType styleChangeType = NoStyleChange;
+
+ if (change > Inherit || getStyleChangeType() > LocalStyleChange)
+ styleChangeType = SubtreeStyleChange;
+ else if (change > NoInherit)
+ styleChangeType = LocalStyleChange;
+ else
return;
+
for (size_t i = 0; i < m_distributedNodes.size(); ++i)
- m_distributedNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributedNodes));
+ m_distributedNodes.at(i)->setNeedsStyleRecalc(styleChangeType, StyleChangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributedNodes));
}
bool InsertionPoint::canBeActive() const
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/inherit-through-insertion-point-v0.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698