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 4d733338f433de011ed701f0c4b22f310c0471a6..0c3dda6c8401ab771c079841d111cfb583c0b6a5 100644 |
--- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -531,12 +531,18 @@ Node* CSSComputedStyleDeclaration::styledNode() const |
PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(AtomicString customPropertyName) const |
{ |
- return ComputedStyleCSSValueMapping::get(customPropertyName, *computeComputedStyle()); |
+ const ComputedStyle* style = computeComputedStyle(); |
+ if (!style) |
+ return nullptr; |
+ return ComputedStyleCSSValueMapping::get(customPropertyName, *style); |
} |
const HashMap<AtomicString, RefPtr<CSSVariableData>>* CSSComputedStyleDeclaration::getVariables() const |
{ |
- return ComputedStyleCSSValueMapping::getVariables(*computeComputedStyle()); |
+ const ComputedStyle* style = computeComputedStyle(); |
+ if (!style) |
+ return nullptr; |
+ return ComputedStyleCSSValueMapping::getVariables(*style); |
} |
PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID) const |