Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index 9a18d3e1ae0993029e654458ef3012d8c4474731..89b9355d0c018ef76dda3faf8ced4f1011432f9b 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -3063,6 +3063,36 @@ void CSSComputedStyleDeclaration::clearVariables(ExceptionState& es) |
es.throwDOMException(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, |