| Index: Source/core/style/ComputedStyle.cpp
|
| diff --git a/Source/core/style/ComputedStyle.cpp b/Source/core/style/ComputedStyle.cpp
|
| index 2a794d9b9ffcf0615e5f60a824cafb78d3d7db61..2d77834d9d9176e4191f1d0a5e7f98976a521069 100644
|
| --- a/Source/core/style/ComputedStyle.cpp
|
| +++ b/Source/core/style/ComputedStyle.cpp
|
| @@ -1252,6 +1252,37 @@ const Vector<AppliedTextDecoration>& ComputedStyle::appliedTextDecorations() con
|
| return rareInheritedData->appliedTextDecorations->vector();
|
| }
|
|
|
| +StyleVariableData* ComputedStyle::variables() const
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + return rareInheritedData->variables.get();
|
| +}
|
| +
|
| +void ComputedStyle::setVariables(PassRefPtr<StyleVariableData> variableData)
|
| +{
|
| + rareInheritedData.access()->variables = variableData;
|
| +}
|
| +
|
| +void ComputedStyle::setVariable(const AtomicString& name, CSSVariableData* value)
|
| +{
|
| + RefPtr<StyleVariableData>& variables = rareInheritedData.access()->variables;
|
| + if (!variables)
|
| + variables = StyleVariableData::create();
|
| + else if (!variables->hasOneRef())
|
| + variables = variables->copy();
|
| + variables->setVariable(name, value);
|
| +}
|
| +
|
| +void ComputedStyle::removeVariable(const AtomicString& name)
|
| +{
|
| + RefPtr<StyleVariableData>& variables = rareInheritedData.access()->variables;
|
| + if (!variables)
|
| + return;
|
| + if (!variables->hasOneRef())
|
| + variables = variables->copy();
|
| + variables->removeVariable(name);
|
| +}
|
| +
|
| float ComputedStyle::wordSpacing() const { return fontDescription().wordSpacing(); }
|
| float ComputedStyle::letterSpacing() const { return fontDescription().letterSpacing(); }
|
|
|
|
|