| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CSSCustomPropertyDeclaration_h | 5 #ifndef CSSCustomPropertyDeclaration_h |
| 6 #define CSSCustomPropertyDeclaration_h | 6 #define CSSCustomPropertyDeclaration_h |
| 7 | 7 |
| 8 #include "core/css/CSSValue.h" | 8 #include "core/css/CSSValue.h" |
| 9 #include "core/css/CSSVariableData.h" | 9 #include "core/css/CSSVariableData.h" |
| 10 #include "wtf/RefPtr.h" | 10 #include "wtf/RefPtr.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 DECLARE_TRACE_AFTER_DISPATCH(); | 46 DECLARE_TRACE_AFTER_DISPATCH(); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 CSSCustomPropertyDeclaration(const AtomicString& name, CSSValueID id) | 49 CSSCustomPropertyDeclaration(const AtomicString& name, CSSValueID id) |
| 50 : CSSValue(CustomPropertyDeclarationClass), | 50 : CSSValue(CustomPropertyDeclarationClass), |
| 51 m_name(name), | 51 m_name(name), |
| 52 m_value(nullptr), | 52 m_value(nullptr), |
| 53 m_valueId(id) { | 53 m_valueId(id) { |
| 54 ASSERT(id == CSSValueInherit || id == CSSValueInitial || | 54 DCHECK(id == CSSValueInherit || id == CSSValueInitial || |
| 55 id == CSSValueUnset); | 55 id == CSSValueUnset); |
| 56 } | 56 } |
| 57 | 57 |
| 58 CSSCustomPropertyDeclaration(const AtomicString& name, | 58 CSSCustomPropertyDeclaration(const AtomicString& name, |
| 59 PassRefPtr<CSSVariableData> value) | 59 PassRefPtr<CSSVariableData> value) |
| 60 : CSSValue(CustomPropertyDeclarationClass), | 60 : CSSValue(CustomPropertyDeclarationClass), |
| 61 m_name(name), | 61 m_name(name), |
| 62 m_value(std::move(value)), | 62 m_value(std::move(value)), |
| 63 m_valueId(CSSValueInvalid) {} | 63 m_valueId(CSSValueInvalid) {} |
| 64 | 64 |
| 65 const AtomicString m_name; | 65 const AtomicString m_name; |
| 66 RefPtr<CSSVariableData> m_value; | 66 RefPtr<CSSVariableData> m_value; |
| 67 CSSValueID m_valueId; | 67 CSSValueID m_valueId; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCustomPropertyDeclaration, | 70 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCustomPropertyDeclaration, |
| 71 isCustomPropertyDeclaration()); | 71 isCustomPropertyDeclaration()); |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| 74 | 74 |
| 75 #endif // CSSCustomPropertyDeclaration_h | 75 #endif // CSSCustomPropertyDeclaration_h |
| OLD | NEW |