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

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

Issue 840463002: Fix assert when interpolating using unset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unset handling code in StyleResolver::applyProperties Created 5 years, 11 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/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 0ea74c8b91951609e415fbba9d498879b601cca0..fc5273603e85be231764eacedf217ace179b24d6 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -121,8 +121,15 @@ void StyleBuilder::applyProperty(CSSPropertyID id, StyleResolverState& state, CS
return;
}
- if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() && !CSSPropertyMetadata::isInheritedProperty(id))
+ if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() && !CSSPropertyMetadata::isInheritedProperty(id)) {
state.parentStyle()->setHasExplicitlyInheritedProperties();
+ } else if (value->isUnsetValue()) {
+ ASSERT(!isInherit && !isInitial);
+ if (CSSPropertyMetadata::isInheritedProperty(id))
+ isInherit = true;
+ else
+ isInitial = true;
+ }
StyleBuilder::applyProperty(id, state, value, isInitial, isInherit);
}

Powered by Google App Engine
This is Rietveld 408576698