Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index 6fdc5a27e8a8d8aefd43e57b1169c926f1d73537..324e95107b80f1de0be3dfda250358a6f147b4e7 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -3069,6 +3069,36 @@ void CSSComputedStyleDeclaration::clearVariables(ExceptionCode& ec) |
ec = NoModificationAllowedError; |
} |
+CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesIterator(const HashMap<AtomicString, String>* variables) |
+ : m_active(variables) |
+{ |
+ ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
+ if (m_active) { |
+ m_it = variables->begin(); |
+ m_end = variables->end(); |
+ } |
+} |
+ |
+void CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::advance() |
+{ |
+ ASSERT(m_active); |
+ ++m_it; |
+ m_active = !atEnd(); |
+} |
+ |
+AtomicString CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::name() const |
+{ |
+ ASSERT(m_active); |
+ return m_it->key; |
+} |
+ |
+String CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::value() const |
+{ |
+ ASSERT(m_active); |
+ return m_it->value; |
+} |
+ |
+ |
PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValue() const |
{ |
static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, |