OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 CSSPendingSubstitutionValue_h |
| 6 #define CSSPendingSubstitutionValue_h |
| 7 |
| 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/css/CSSValue.h" |
| 10 #include "core/css/CSSVariableReferenceValue.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CSSPendingSubstitutionValue : public CSSValue { |
| 15 public: |
| 16 static CSSPendingSubstitutionValue* create(CSSPropertyID shorthandPropertyId
, CSSVariableReferenceValue* shorthandValue) |
| 17 { |
| 18 return new CSSPendingSubstitutionValue(shorthandPropertyId, shorthandVal
ue); |
| 19 } |
| 20 |
| 21 CSSVariableReferenceValue* shorthandValue() const |
| 22 { |
| 23 return m_shorthandValue.get(); |
| 24 } |
| 25 |
| 26 CSSPropertyID shorthandPropertyId() const |
| 27 { |
| 28 return m_shorthandPropertyId; |
| 29 } |
| 30 |
| 31 bool equals(const CSSPendingSubstitutionValue& other) const { return m_short
handValue == other.m_shorthandValue; } |
| 32 String customCSSText() const; |
| 33 |
| 34 DECLARE_TRACE_AFTER_DISPATCH(); |
| 35 private: |
| 36 CSSPendingSubstitutionValue(CSSPropertyID shorthandPropertyId, CSSVariableRe
ferenceValue* shorthandValue) |
| 37 : CSSValue(PendingSubstitutionValueClass) |
| 38 , m_shorthandPropertyId(shorthandPropertyId) |
| 39 , m_shorthandValue(shorthandValue) |
| 40 { |
| 41 } |
| 42 |
| 43 CSSPropertyID m_shorthandPropertyId; |
| 44 Member<CSSVariableReferenceValue> m_shorthandValue; |
| 45 }; |
| 46 |
| 47 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPendingSubstitutionValue, isPendingSubstitutionVa
lue()); |
| 48 |
| 49 } // namespace blink |
| 50 |
| 51 #endif // CSSPendingSubstitutionValue_h |
OLD | NEW |