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

Unified Diff: third_party/WebKit/Source/core/style/StyleVariableData.h

Issue 2310823002: Skeleton implementation of CSS Properties and Values API (Closed)
Patch Set: fix stylevardata copy ctor Created 4 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
Index: third_party/WebKit/Source/core/style/StyleVariableData.h
diff --git a/third_party/WebKit/Source/core/style/StyleVariableData.h b/third_party/WebKit/Source/core/style/StyleVariableData.h
index 3db5528ca13ddb46fb3f60b468de902b4e02e143..4f9881fcdfb5912c2cf58af6943a64179d90be0e 100644
--- a/third_party/WebKit/Source/core/style/StyleVariableData.h
+++ b/third_party/WebKit/Source/core/style/StyleVariableData.h
@@ -5,6 +5,7 @@
#ifndef StyleVariableData_h
#define StyleVariableData_h
+#include "core/css/CSSValue.h"
#include "core/css/CSSVariableData.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
@@ -24,7 +25,10 @@ public:
void setVariable(const AtomicString& name, PassRefPtr<CSSVariableData> value) { m_data.set(name, value); }
CSSVariableData* getVariable(const AtomicString& name) const;
- void removeVariable(const AtomicString& name) { return setVariable(name, nullptr); }
+ void removeVariable(const AtomicString&);
+
+ void setRegisteredInheritedProperty(const AtomicString&, const CSSValue*);
+ CSSValue* registeredInheritedProperty(const AtomicString& name) const { return m_registeredData.get(name); }
// This map will contain null pointers if variables are invalid due to
// cycles or referencing invalid variables without using a fallback.
@@ -39,6 +43,7 @@ private:
friend class CSSVariableResolver;
HashMap<AtomicString, RefPtr<CSSVariableData>> m_data;
+ HashMap<AtomicString, Persistent<CSSValue>> m_registeredData;
RefPtr<StyleVariableData> m_root;
};
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/StyleVariableData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698