| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| index 27e94c1c960cfbbddb30e11ab4d2babdc55b6f5f..214ef250ca12f5e08abf752f40e4ab5d89e043f4 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "core/css/CSSBorderImageSliceValue.h"
|
| #include "core/css/CSSCounterValue.h"
|
| #include "core/css/CSSCustomIdentValue.h"
|
| +#include "core/css/CSSCustomPropertyDeclaration.h"
|
| #include "core/css/CSSFontFeatureValue.h"
|
| #include "core/css/CSSFunctionValue.h"
|
| #include "core/css/CSSGridLineNamesValue.h"
|
| @@ -1353,6 +1354,11 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapCoordinate(const Vecto
|
| return list.release();
|
| }
|
|
|
| +PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style)
|
| +{
|
| + return CSSCustomPropertyDeclaration::create(customPropertyName, style.variables()->getVariable(customPropertyName));
|
| +}
|
| +
|
| PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| const SVGComputedStyle& svgStyle = style.svgStyle();
|
| @@ -2696,7 +2702,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return list.release();
|
| }
|
| case CSSPropertyVariable:
|
| - // TODO(leviw): We should have a way to retrive variables here.
|
| + // Variables are retrieved via get(AtomicString).
|
| ASSERT_NOT_REACHED();
|
| return nullptr;
|
| case CSSPropertyAll:
|
|
|