Add support for the CSS 'unset' keyword.
[WebKit-https.git] / Source / WebCore / css / StyleResolver.cpp
index f0faf7c..ab8900e 100644 (file)
@@ -1907,7 +1907,14 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
 
     bool isInherit = state.parentStyle() && valueToCheckForInheritInitial->isInheritedValue();
     bool isInitial = valueToCheckForInheritInitial->isInitialValue() || (!state.parentStyle() && valueToCheckForInheritInitial->isInheritedValue());
-
+    
+    if (valueToCheckForInheritInitial->isUnsetValue()) {
+        if (CSSProperty::isInheritedProperty(id))
+            isInherit = true;
+        else
+            isInitial = true;
+    }
+    
     ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
 
     if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {