Chromium Code Reviews| Index: Source/core/css/CSSComputedStyleDeclaration.h |
| diff --git a/Source/core/css/CSSComputedStyleDeclaration.h b/Source/core/css/CSSComputedStyleDeclaration.h |
| index 6116b50d2b46c1099f5b1245253533ed98b74071..ef546cd02697f813a94f05040bb010a06ff2aaae 100644 |
| --- a/Source/core/css/CSSComputedStyleDeclaration.h |
| +++ b/Source/core/css/CSSComputedStyleDeclaration.h |
| @@ -49,6 +49,22 @@ class StylePropertyShorthand; |
| 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; |
|
esprehn
2013/09/12 01:13:42
A typedef HashMap<AtomicString, String> VariablesM
alancutter (OOO until 2018)
2013/09/13 03:06:14
Done.
|
| + HashMap<AtomicString, String>::const_iterator m_end; |
| + }; |
| + |
| public: |
| static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = String()) |
| { |
| @@ -106,6 +122,7 @@ private: |
| virtual void setVariableValue(const AtomicString& name, const String& value, ExceptionState&) OVERRIDE; |
| virtual bool removeVariable(const AtomicString& name) OVERRIDE; |
| virtual void clearVariables(ExceptionState&) OVERRIDE; |
| + virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE { return ComputedCSSVariablesIterator::create(variableMap()); } |
| virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRIDE; |