Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index a64631ed2217f5390635c684512b5434b0eb21c6..078238d96f6bf1f53c8888e08dca1ea3a3c44b89 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -3064,6 +3064,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, |