Avoid unnecessary full style resolution in getComputedStyle for non-inherited properties
[WebKit-https.git] / Source / WebCore / css / StyleResolver.cpp
index b41738f..de294da 100644 (file)
@@ -1817,6 +1817,8 @@ Color StyleResolver::colorFromPrimitiveValue(const CSSPrimitiveValue& value, boo
     case CSSValueWebkitFocusRingColor:
         return RenderTheme::focusRingColor();
     case CSSValueCurrentcolor:
+        // Color is an inherited property so depending on it effectively makes the property inherited.
+        state.style()->setHasExplicitlyInheritedProperties();
         return state.style()->color();
     default: {
         return StyleColor::colorFromKeyword(ident);