OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CSSVariableReferenceValue_h |
| 6 #define CSSVariableReferenceValue_h |
| 7 |
| 8 #include "core/css/CSSValue.h" |
| 9 #include "core/css/CSSVariableData.h" |
| 10 #include "wtf/RefPtr.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CSSVariableReferenceValue : public CSSValue { |
| 15 public: |
| 16 static PassRefPtrWillBeRawPtr<CSSVariableReferenceValue> create(PassRefPtr<C
SSVariableData> data) |
| 17 { |
| 18 return adoptRefWillBeNoop(new CSSVariableReferenceValue(data)); |
| 19 } |
| 20 |
| 21 CSSVariableData* variableDataValue() const |
| 22 { |
| 23 return m_data.get(); |
| 24 } |
| 25 |
| 26 bool equals(const CSSVariableReferenceValue& other) const { return m_data ==
other.m_data; } |
| 27 String customCSSText() const; |
| 28 |
| 29 DECLARE_TRACE_AFTER_DISPATCH(); |
| 30 private: |
| 31 CSSVariableReferenceValue(PassRefPtr<CSSVariableData> data) |
| 32 : CSSValue(VariableReferenceClass) |
| 33 , m_data(data) |
| 34 { |
| 35 } |
| 36 |
| 37 RefPtr<CSSVariableData> m_data; |
| 38 }; |
| 39 |
| 40 DEFINE_CSS_VALUE_TYPE_CASTS(CSSVariableReferenceValue, isVariableReferenceValue(
)); |
| 41 |
| 42 } // namespace blink |
| 43 |
| 44 #endif // CSSVariableReferenceValue_h |
OLD | NEW |