OLD | NEW |
---|---|
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 CSSContentDistributionValue_h | 5 #ifndef CSSContentDistributionValue_h |
6 #define CSSContentDistributionValue_h | 6 #define CSSContentDistributionValue_h |
7 | 7 |
8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSIdentifierValue.h" |
9 #include "core/css/CSSValue.h" | 9 #include "core/css/CSSValue.h" |
10 #include "wtf/RefPtr.h" | 10 #include "wtf/RefPtr.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class CSSContentDistributionValue : public CSSValue { | 14 class CSSContentDistributionValue : public CSSValue { |
15 public: | 15 public: |
16 static CSSContentDistributionValue* create(CSSValueID distribution, CSSValue ID position, CSSValueID overflow) | 16 static CSSContentDistributionValue* create(CSSValueID distribution, CSSValue ID position, CSSValueID overflow) |
17 { | 17 { |
18 return new CSSContentDistributionValue(distribution, position, overflow) ; | 18 return new CSSContentDistributionValue(distribution, position, overflow) ; |
19 } | 19 } |
20 ~CSSContentDistributionValue(); | 20 ~CSSContentDistributionValue(); |
21 | 21 |
22 CSSPrimitiveValue* distribution() const { return CSSPrimitiveValue::createId entifier(m_distribution); } | 22 // TODO(sashab): Make these result CSSValueIDs instead of CSSValues. |
alancutter (OOO until 2018)
2016/09/30 04:25:53
s/result/return/
| |
23 CSSIdentifierValue* distribution() const { return CSSIdentifierValue::create (m_distribution); } | |
23 | 24 |
24 CSSPrimitiveValue* position() const { return CSSPrimitiveValue::createIdenti fier(m_position); } | 25 CSSIdentifierValue* position() const { return CSSIdentifierValue::create(m_p osition); } |
25 | 26 |
26 CSSPrimitiveValue* overflow() const { return CSSPrimitiveValue::createIdenti fier(m_overflow); } | 27 CSSIdentifierValue* overflow() const { return CSSIdentifierValue::create(m_o verflow); } |
27 | 28 |
28 String customCSSText() const; | 29 String customCSSText() const; |
29 | 30 |
30 bool equals(const CSSContentDistributionValue&) const; | 31 bool equals(const CSSContentDistributionValue&) const; |
31 | 32 |
32 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValue::traceAfterDispatch(visitor) ; } | 33 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValue::traceAfterDispatch(visitor) ; } |
33 | 34 |
34 private: | 35 private: |
35 CSSContentDistributionValue(CSSValueID distribution, CSSValueID position, CS SValueID overflow); | 36 CSSContentDistributionValue(CSSValueID distribution, CSSValueID position, CS SValueID overflow); |
36 | 37 |
37 CSSValueID m_distribution; | 38 CSSValueID m_distribution; |
38 CSSValueID m_position; | 39 CSSValueID m_position; |
39 CSSValueID m_overflow; | 40 CSSValueID m_overflow; |
40 }; | 41 }; |
41 | 42 |
42 DEFINE_CSS_VALUE_TYPE_CASTS(CSSContentDistributionValue, isContentDistributionVa lue()); | 43 DEFINE_CSS_VALUE_TYPE_CASTS(CSSContentDistributionValue, isContentDistributionVa lue()); |
43 | 44 |
44 } // namespace blink | 45 } // namespace blink |
45 | 46 |
46 #endif // CSSContentDistributionValue_h | 47 #endif // CSSContentDistributionValue_h |
OLD | NEW |