| Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp
|
| diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
|
| index a78d436011ca9d59c36c1d23deb14489f688ed7d..74a46aaa852638cb69e579722f60b32bbc7f2a1a 100644
|
| --- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp
|
| +++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
|
| @@ -23,6 +23,7 @@
|
| #include "core/css/PropertySetCSSStyleDeclaration.h"
|
|
|
| #include "HTMLNames.h"
|
| +#include "RuntimeEnabledFeatures.h"
|
| #include "core/css/CSSParser.h"
|
| #include "core/css/CSSStyleSheet.h"
|
| #include "core/css/StylePropertySet.h"
|
| @@ -271,6 +272,52 @@ void PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyI
|
| mutationScope.enqueueMutationRecord();
|
| }
|
|
|
| +unsigned PropertySetCSSStyleDeclaration::variableCount() const
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + return m_propertySet->variableCount();
|
| +}
|
| +
|
| +String PropertySetCSSStyleDeclaration::variableValue(const AtomicString& name) const
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + return m_propertySet->variableValue(name);
|
| +}
|
| +
|
| +void PropertySetCSSStyleDeclaration::setVariableValue(const AtomicString& name, const String& value, ExceptionCode&)
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + StyleAttributeMutationScope mutationScope(this);
|
| + willMutate();
|
| + bool changed = m_propertySet->setVariableValue(name, value);
|
| + didMutate(changed ? PropertyChanged : NoChanges);
|
| + if (changed)
|
| + mutationScope.enqueueMutationRecord();
|
| +}
|
| +
|
| +bool PropertySetCSSStyleDeclaration::removeVariable(const AtomicString& name)
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + StyleAttributeMutationScope mutationScope(this);
|
| + willMutate();
|
| + bool changed = m_propertySet->removeVariable(name);
|
| + didMutate(changed ? PropertyChanged : NoChanges);
|
| + if (changed)
|
| + mutationScope.enqueueMutationRecord();
|
| + return changed;
|
| +}
|
| +
|
| +void PropertySetCSSStyleDeclaration::clearVariables(ExceptionCode&)
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
|
| + StyleAttributeMutationScope mutationScope(this);
|
| + willMutate();
|
| + bool changed = m_propertySet->clearVariables();
|
| + didMutate(changed ? PropertyChanged : NoChanges);
|
| + if (changed)
|
| + mutationScope.enqueueMutationRecord();
|
| +}
|
| +
|
| CSSValue* PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM(CSSValue* internalValue)
|
| {
|
| if (!internalValue)
|
|
|