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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 921843004: Stop explicit inheritance if LayoutStyle doesn't change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected and documented flag copying/comparisons 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/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index b9863ef505bc63654c93f2d5c5104f5c51d4daf8..e8c11ecfd084c9d8e249d6ad1d28577cc44f7ea9 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -1372,7 +1372,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
// We can build up the style by copying non-inherited properties from an earlier style object built using the same exact
// style declarations. We then only need to apply the inherited properties, if any, as their values can depend on the
// element context. This is fast and saves memory by reusing the style data structures.
- state.style()->copyNonInheritedFrom(*cachedMatchedProperties->layoutStyle);
+ state.style()->copyNonInheritedFromCached(*cachedMatchedProperties->layoutStyle);
if (state.parentStyle()->inheritedDataShared(*cachedMatchedProperties->parentLayoutStyle) && !isAtShadowBoundary(element)
&& (!state.distributedToInsertionPoint() || state.style()->userModify() == READ_ONLY)) {
INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheInheritedHit);

Powered by Google App Engine
This is Rietveld 408576698