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

Unified Diff: Source/core/layout/style/LayoutStyle.cpp

Issue 921843004: Stop explicit inheritance if LayoutStyle doesn't change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
Index: Source/core/layout/style/LayoutStyle.cpp
diff --git a/Source/core/layout/style/LayoutStyle.cpp b/Source/core/layout/style/LayoutStyle.cpp
index 3915a94c7683873de695056165c52574f38d721e..ac558d30afd62db3b0d6b8bae062d5f16c219cbd 100644
--- a/Source/core/layout/style/LayoutStyle.cpp
+++ b/Source/core/layout/style/LayoutStyle.cpp
@@ -188,14 +188,15 @@ StyleRecalcChange LayoutStyle::stylePropagationDiff(const LayoutStyle* oldStyle,
|| oldStyle->alignItems() != newStyle->alignItems())
return Reattach;
- if (oldStyle->inheritedNotEqual(*newStyle)
- || oldStyle->hasExplicitlyInheritedProperties()
- || newStyle->hasExplicitlyInheritedProperties())
+ if (oldStyle->inheritedNotEqual(*newStyle))
return Inherit;
if (*oldStyle == *newStyle)
return diffPseudoStyles(*oldStyle, *newStyle);
+ if (oldStyle->hasExplicitlyInheritedProperties())
+ return Inherit;
+
return NoInherit;
}
@@ -251,7 +252,6 @@ void LayoutStyle::copyNonInheritedFrom(const LayoutStyle& other)
noninherited_flags.pageBreakBefore = other.noninherited_flags.pageBreakBefore;
noninherited_flags.pageBreakAfter = other.noninherited_flags.pageBreakAfter;
noninherited_flags.pageBreakInside = other.noninherited_flags.pageBreakInside;
- noninherited_flags.explicitInheritance = other.noninherited_flags.explicitInheritance;
esprehn 2015/02/13 02:29:13 Why is it okay not to copy this bit? This seems to
noninherited_flags.hasViewportUnits = other.noninherited_flags.hasViewportUnits;
if (m_svgStyle != other.m_svgStyle)
m_svgStyle.access()->copyNonInheritedFrom(other.m_svgStyle.get());
« Source/core/layout/style/LayoutStyle.h ('K') | « Source/core/layout/style/LayoutStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698