Index: Source/core/css/CSSComputedStyleDeclaration.h |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.h b/Source/core/css/CSSComputedStyleDeclaration.h |
index 1f2a35fad5209caa3baf78e4472b4b7dbb9121fe..a1e0cc80f7d875f98d44a8297fac13ade93586d2 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.h |
+++ b/Source/core/css/CSSComputedStyleDeclaration.h |
@@ -50,6 +50,22 @@ class CustomFilterParameter; |
enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; |
class CSSComputedStyleDeclaration : public CSSStyleDeclaration { |
+private: |
+ class ComputedCSSVariablesIterator : public CSSVariablesIterator { |
+ public: |
+ virtual ~ComputedCSSVariablesIterator() { } |
+ static PassRefPtr<ComputedCSSVariablesIterator> create(const HashMap<AtomicString, String>* variableMap) { return adoptRef(new ComputedCSSVariablesIterator(variableMap)); } |
+ private: |
+ explicit ComputedCSSVariablesIterator(const HashMap<AtomicString, String>* variableMap); |
+ virtual void advance() OVERRIDE; |
+ virtual bool atEnd() const OVERRIDE { return m_it == m_end; } |
+ virtual AtomicString name() const OVERRIDE; |
+ virtual String value() const OVERRIDE; |
+ bool m_active; |
+ HashMap<AtomicString, String>::const_iterator m_it; |
+ HashMap<AtomicString, String>::const_iterator m_end; |
+ }; |
+ |
public: |
static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = String()) |
{ |
@@ -107,6 +123,7 @@ private: |
virtual void setVariableValue(const AtomicString& name, const String& value, ExceptionCode&) OVERRIDE; |
virtual bool removeVariable(const AtomicString& name) OVERRIDE; |
virtual void clearVariables(ExceptionCode&) OVERRIDE; |
+ virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE { return ComputedCSSVariablesIterator::create(variableMap()); } |
virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRIDE; |