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

Unified Diff: Source/core/dom/Element.cpp

Issue 1133263003: Maintain child dependent ComputedStyle flags if propagation stops. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index ddee2df92be60fbc5fc8bbdf42b2c34de427e6f0..61ceb92aba054197167f2a807c902e5e528aaeb6 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1743,8 +1743,15 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
if (change > Inherit || localChange > Inherit)
return max(localChange, change);
- if (localChange < Inherit && (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle()))
- return UpdatePseudoElements;
+ if (localChange < Inherit) {
+ if (oldStyle->hasChildDependentFlags()) {
+ if (childNeedsStyleRecalc())
+ return Inherit;
+ newStyle->copyChildDependentFlagsFrom(*oldStyle);
+ }
+ if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle())
+ return UpdatePseudoElements;
+ }
return localChange;
}
« no previous file with comments | « LayoutTests/fast/css/invalidation/explicit-inheritance-flag-expected.txt ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698