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

Unified Diff: third_party/WebKit/Source/core/css/CSSVariableReferenceValue.h

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use m_unit Created 5 years, 1 month 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/CSSVariableReferenceValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSVariableReferenceValue.h b/third_party/WebKit/Source/core/css/CSSVariableReferenceValue.h
new file mode 100644
index 0000000000000000000000000000000000000000..187c8fb38e5b06ebc08f2e9af38aa13fc00aef54
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSVariableReferenceValue.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CSSVariableReferenceValue_h
+#define CSSVariableReferenceValue_h
+
+#include "core/css/CSSValue.h"
+#include "core/css/CSSVariableData.h"
+#include "wtf/RefPtr.h"
+
+namespace blink {
+
+class CSSVariableReferenceValue : public CSSValue {
+public:
+ static PassRefPtrWillBeRawPtr<CSSVariableReferenceValue> create(PassRefPtr<CSSVariableData> data)
+ {
+ return adoptRefWillBeNoop(new CSSVariableReferenceValue(data));
+ }
+
+ CSSVariableData* variableDataValue() const
+ {
+ return m_data.get();
+ }
+
+ bool equals(const CSSVariableReferenceValue& other) const { return m_data == other.m_data; }
+ String customCSSText() const;
+
+ DECLARE_TRACE_AFTER_DISPATCH();
+private:
+ CSSVariableReferenceValue(PassRefPtr<CSSVariableData> data)
+ : CSSValue(VariableReferenceClass)
+ , m_data(data)
+ {
+ }
+
+ RefPtr<CSSVariableData> m_data;
+};
+
+DEFINE_CSS_VALUE_TYPE_CASTS(CSSVariableReferenceValue, isVariableReferenceValue());
+
+} // namespace blink
+
+#endif // CSSVariableReferenceValue_h

Powered by Google App Engine
This is Rietveld 408576698