| Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
|
| index 82ea6b579e55780face6522c3080f98bcacd106a..3d99435c8069fac2aca872ef843e88d51483808c 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
|
| @@ -988,6 +988,20 @@ void InspectorCSSAgent::getComputedStyleForNode(ErrorString* errorString, int no
|
| RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(node, true);
|
| RefPtrWillBeRawPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(computedStyleInfo, nullptr, nullptr);
|
| style = inspectorStyle->buildArrayForComputedStyle();
|
| +
|
| + if (!RuntimeEnabledFeatures::cssVariablesEnabled())
|
| + return;
|
| +
|
| + const HashMap<AtomicString, RefPtr<CSSVariableData>>* variables = computedStyleInfo->getVariables();
|
| +
|
| + if (variables && !variables->isEmpty()) {
|
| + for (const auto& it : *variables) {
|
| + RefPtr<TypeBuilder::CSS::CSSComputedStyleProperty> entry = TypeBuilder::CSS::CSSComputedStyleProperty::create()
|
| + .setName(it.key)
|
| + .setValue(it.value->tokenRange().serialize());
|
| + style->addItem(entry);
|
| + }
|
| + }
|
| }
|
|
|
| void InspectorCSSAgent::collectPlatformFontsForLayoutObject(LayoutObject* layoutObject, HashCountedSet<String>* fontStats)
|
|
|