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

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: Try to fix the layout 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..85626ad6e0deccd416c171cc07b3c1af742b3327
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleVariableReferenceValue.h
@@ -0,0 +1,46 @@
+#ifndef CSSStyleVariableReferenceValue_h
Timothy Loh 2016/07/07 05:40:26 There's a 3-line license header to add on new file
anthonyhkf 2016/07/08 00:17:17 Done.
+#define CSSStyleVariableReferenceValue_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/CSSPropertyNames.h"
+#include "core/CoreExport.h"
+#include "core/css/CSSValue.h"
+
+namespace blink {
+
+class CORE_EXPORT CSSStyleVariableReferenceValue final : public GarbageCollectedFinalized<CSSStyleVariableReferenceValue>, public ScriptWrappable {
+ WTF_MAKE_NONCOPYABLE(CSSStyleVariableReferenceValue);
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ virtual ~CSSStyleVariableReferenceValue() { }
+
+ static CSSStyleVariableReferenceValue* create()
+ {
+ return new CSSStyleVariableReferenceValue();
+ }
+
+ // TODO(anthonyhkf): add fallback: create(variable, fallback)
+ static CSSStyleVariableReferenceValue* create(const String& variable)
+ {
+ return new CSSStyleVariableReferenceValue(variable);
+ }
+
+ DEFINE_INLINE_TRACE() { }
+
+ String variable() const { return m_variable; }
Timothy Loh 2016/07/07 05:40:26 const String& is probably more common (maybe avoid
anthonyhkf 2016/07/08 00:17:17 Done.
+
+protected:
+ CSSStyleVariableReferenceValue() { }
meade_UTC10 2016/07/07 05:30:30 We shouldn't have this empty constructor - m_varia
anthonyhkf 2016/07/08 00:17:17 Done.
+
+ CSSStyleVariableReferenceValue(String variable)
+ {
Timothy Loh 2016/07/07 05:40:26 Use an initializer list here, e.g. CSSStyl..(..)
anthonyhkf 2016/07/08 00:17:17 Done.
+ m_variable = variable;
+ }
+
+ String m_variable;
+
+};
+
+}
Timothy Loh 2016/07/07 05:40:26 prevalent style is to write } // namespace blink
anthonyhkf 2016/07/08 00:17:17 Done.
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698