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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 #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.
2 #define CSSStyleVariableReferenceValue_h
3
4 #include "bindings/core/v8/ScriptWrappable.h"
5 #include "core/CSSPropertyNames.h"
6 #include "core/CoreExport.h"
7 #include "core/css/CSSValue.h"
8
9 namespace blink {
10
11 class CORE_EXPORT CSSStyleVariableReferenceValue final : public GarbageCollected Finalized<CSSStyleVariableReferenceValue>, public ScriptWrappable {
12 WTF_MAKE_NONCOPYABLE(CSSStyleVariableReferenceValue);
13 DEFINE_WRAPPERTYPEINFO();
14 public:
15 virtual ~CSSStyleVariableReferenceValue() { }
16
17 static CSSStyleVariableReferenceValue* create()
18 {
19 return new CSSStyleVariableReferenceValue();
20 }
21
22 // TODO(anthonyhkf): add fallback: create(variable, fallback)
23 static CSSStyleVariableReferenceValue* create(const String& variable)
24 {
25 return new CSSStyleVariableReferenceValue(variable);
26 }
27
28 DEFINE_INLINE_TRACE() { }
29
30 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.
31
32 protected:
33 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.
34
35 CSSStyleVariableReferenceValue(String variable)
36 {
Timothy Loh 2016/07/07 05:40:26 Use an initializer list here, e.g. CSSStyl..(..)
anthonyhkf 2016/07/08 00:17:17 Done.
37 m_variable = variable;
38 }
39
40 String m_variable;
41
42 };
43
44 }
Timothy Loh 2016/07/07 05:40:26 prevalent style is to write } // namespace blink
anthonyhkf 2016/07/08 00:17:17 Done.
45
46 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698