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); |
} |