Index: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
index d48c9b646cb182520c5e8bf76115bfd3637220e8..da497fdda56c1c08a7122a6283a7926e3abd0a7b 100644 |
--- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -641,9 +641,12 @@ String CSSComputedStyleDeclaration::getPropertyValue(const String& propertyName) |
{ |
CSSPropertyID propertyID = cssPropertyID(propertyName); |
if (!propertyID) { |
- if (!RuntimeEnabledFeatures::cssVariablesEnabled() || !CSSVariableParser::isValidVariableName(propertyName)) |
- return String(); |
- return getPropertyCSSValue(AtomicString(propertyName))->cssText(); |
+ if (RuntimeEnabledFeatures::cssVariablesEnabled() && CSSVariableParser::isValidVariableName(propertyName)) { |
+ RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(AtomicString(propertyName)); |
+ if (value) |
+ return value->cssText(); |
+ } |
+ return String(); |
} |
ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID)); |
return getPropertyValue(propertyID); |