Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: Source/core/css/CSSVariablesMap.h

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and review changes Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSVariablesIterator.h ('k') | Source/core/css/CSSVariablesMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSVariablesMap.h
diff --git a/Source/core/css/CSSVariablesMap.h b/Source/core/css/CSSVariablesMap.h
index 5c236953923220715d8ce5c7385611094001fd59..3bd94604b79ad56744e0fcf4d7dd86c3595f941d 100644
--- a/Source/core/css/CSSVariablesMap.h
+++ b/Source/core/css/CSSVariablesMap.h
@@ -29,12 +29,14 @@
#define CSSVariablesMap_h
#include "RuntimeEnabledFeatures.h"
+#include "core/css/CSSVariablesMapForEachCallback.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
class CSSStyleDeclaration;
+class CSSVariablesIterator;
class ExceptionState;
class CSSVariablesMap : public RefCounted<CSSVariablesMap> {
@@ -49,9 +51,11 @@ public:
unsigned size() const;
String get(const AtomicString& name) const;
bool has(const AtomicString& name) const;
- void set(const AtomicString& name, const String& value, ExceptionState&) const;
- bool remove(const AtomicString& name) const;
- void clear(ExceptionState&) const;
+ void set(const AtomicString& name, const String& value, ExceptionState&);
+ bool remove(const AtomicString& name);
+ void clear(ExceptionState&);
+ void forEach(PassRefPtr<CSSVariablesMapForEachCallback>, ScriptValue& thisArg) const;
+ void forEach(PassRefPtr<CSSVariablesMapForEachCallback>) const;
void clearStyleDeclaration() { m_styleDeclaration = 0; }
@@ -62,7 +66,11 @@ private:
ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
}
+ void forEach(PassRefPtr<CSSVariablesMapForEachCallback>, ScriptValue* thisArg) const;
+
CSSStyleDeclaration* m_styleDeclaration;
+ typedef Vector<CSSVariablesIterator*> Iterators;
+ mutable Iterators m_activeIterators;
};
} // namespace WebCore
« no previous file with comments | « Source/core/css/CSSVariablesIterator.h ('k') | Source/core/css/CSSVariablesMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698