Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index ee703d108e29d60f646e6deb6f933e59a52cb1b5..394774904c2f24a96e92f56b2cf906045be1564d 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -3060,6 +3060,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, |