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 CSSLengthValue_h | 5 #ifndef CSSLengthValue_h |
6 #define CSSLengthValue_h | 6 #define CSSLengthValue_h |
7 | 7 |
8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
9 #include "core/css/cssom/CSSStyleValue.h" | 9 #include "core/css/cssom/CSSStyleValue.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
| 12 namespace cssom { |
12 | 13 |
13 class CSSCalcDictionary; | 14 class CSSCalcDictionary; |
14 class ExceptionState; | 15 class ExceptionState; |
15 | 16 |
16 class CORE_EXPORT CSSLengthValue : public CSSStyleValue { | 17 class CORE_EXPORT CSSLengthValue : public CSSStyleValue { |
17 WTF_MAKE_NONCOPYABLE(CSSLengthValue); | 18 WTF_MAKE_NONCOPYABLE(CSSLengthValue); |
18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
19 public: | 20 public: |
20 static CSSPrimitiveValue::UnitType unitFromName(const String& name); | 21 static CSSPrimitiveValue::UnitType unitFromName(const String& name); |
21 | 22 |
(...skipping 25 matching lines...) Expand all Loading... |
47 | 48 |
48 static const int kNumSupportedUnits = 15; | 49 static const int kNumSupportedUnits = 15; |
49 }; | 50 }; |
50 | 51 |
51 DEFINE_TYPE_CASTS(CSSLengthValue, CSSStyleValue, value, | 52 DEFINE_TYPE_CASTS(CSSLengthValue, CSSStyleValue, value, |
52 (value->type() == CSSStyleValue::SimpleLengthType | 53 (value->type() == CSSStyleValue::SimpleLengthType |
53 || value->type() == CSSStyleValue::CalcLengthType), | 54 || value->type() == CSSStyleValue::CalcLengthType), |
54 (value.type() == CSSStyleValue::SimpleLengthType | 55 (value.type() == CSSStyleValue::SimpleLengthType |
55 || value.type() == CSSStyleValue::CalcLengthType)); | 56 || value.type() == CSSStyleValue::CalcLengthType)); |
56 | 57 |
| 58 } // namespace cssom |
57 } // namespace blink | 59 } // namespace blink |
58 | 60 |
| 61 |
59 #endif | 62 #endif |
OLD | NEW |