| 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 CSSNumberValue_h | 5 #ifndef CSSNumberValue_h |
| 6 #define CSSNumberValue_h | 6 #define CSSNumberValue_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 | 31 |
| 32 StyleValueType type() const override { return StyleValueType::NumberType; } | 32 StyleValueType type() const override { return StyleValueType::NumberType; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 CSSNumberValue(double value) : m_value(value) {} | 35 CSSNumberValue(double value) : m_value(value) {} |
| 36 | 36 |
| 37 double m_value; | 37 double m_value; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 DEFINE_TYPE_CASTS(CSSNumberValue, |
| 41 CSSStyleValue, |
| 42 value, |
| 43 value->type() == CSSStyleValue::NumberType, |
| 44 value.type() == CSSStyleValue::NumberType); |
| 45 |
| 40 } // namespace blink | 46 } // namespace blink |
| 41 | 47 |
| 42 #endif | 48 #endif |
| OLD | NEW |