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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSStyleVariableReferenceValue.h

Issue 2126713002: [Typed-OM] Add CSSVariableReferenceValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 5 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/css/cssom/CSSStyleVariableReferenceValue.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSStyleVariableReferenceValue.h b/third_party/WebKit/Source/core/css/cssom/CSSStyleVariableReferenceValue.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d609ad4f939d6812c675b5fcb1d5829627724c7
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleVariableReferenceValue.h
@@ -0,0 +1,49 @@
+#ifndef CSSStyleVariableReferenceValue_h
+#define CSSStyleVariableReferenceValue_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/CSSPropertyNames.h"
+#include "core/CoreExport.h"
+#include "core/css/CSSValue.h"
+
+namespace blink {
+
+// TODO: change the data type of fallback as in the draft
meade_UTC10 2016/07/06 05:40:11 You don't need to have two TODO's, just the second
anthonyhkf 2016/07/08 00:17:17 Done.
+
+class CORE_EXPORT CSSStyleVariableReferenceValue : public GarbageCollectedFinalized<CSSStyleVariableReferenceValue>, public ScriptWrappable {
meade_UTC10 2016/07/06 05:40:11 Please make this class final.
+ DEFINE_WRAPPERTYPEINFO();
meade_UTC10 2016/07/06 05:40:12 This class shouldn't be copyable. Please add the m
+public:
+ virtual ~CSSStyleVariableReferenceValue() { }
+
+ static CSSStyleVariableReferenceValue* create()
+ {
+ return new CSSStyleVariableReferenceValue();
+ }
+
+ // TODO: add fallback: create(variable, fallback)
meade_UTC10 2016/07/06 05:40:12 Make this // TODO(anthonyhkf): Add fallback: crea
+ static CSSStyleVariableReferenceValue* create(const String& variable)
+ {
+ return new CSSStyleVariableReferenceValue(variable);
+ }
+
+ DEFINE_INLINE_TRACE() { }
+
+ void setVariable(String variable) { m_variable = variable; }
meade_UTC10 2016/07/06 05:40:11 StyleValues should be read-only - please remove th
+
+ String variable() const { return m_variable; }
+
+protected:
+ CSSStyleVariableReferenceValue() { }
+
+ CSSStyleVariableReferenceValue(String variable)
+ {
+ m_variable = variable;
+ }
+
+ String m_variable;
+
+};
+
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698