| 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 NumberValue_h | 5 #ifndef NumberValue_h |
| 6 #define NumberValue_h | 6 #define NumberValue_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 10 matching lines...) Expand all Loading... |
| 21 { | 21 { |
| 22 return new NumberValue(value); | 22 return new NumberValue(value); |
| 23 } | 23 } |
| 24 | 24 |
| 25 double value() const { return m_value; } | 25 double value() const { return m_value; } |
| 26 void setValue(double value) | 26 void setValue(double value) |
| 27 { | 27 { |
| 28 m_value = value; | 28 m_value = value; |
| 29 } | 29 } |
| 30 | 30 |
| 31 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override | 31 RawPtr<CSSValue> toCSSValue() const override |
| 32 { | 32 { |
| 33 return cssValuePool().createValue(m_value, CSSPrimitiveValue::UnitType:: | 33 return cssValuePool().createValue(m_value, CSSPrimitiveValue::UnitType:: |
| 34 Number); | 34 Number); |
| 35 } | 35 } |
| 36 | 36 |
| 37 StyleValueType type() const override { return StyleValueType::NumberType; } | 37 StyleValueType type() const override { return StyleValueType::NumberType; } |
| 38 private: | 38 private: |
| 39 NumberValue(double value) : m_value(value) {} | 39 NumberValue(double value) : m_value(value) {} |
| 40 | 40 |
| 41 double m_value; | 41 double m_value; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif | 46 #endif |
| OLD | NEW |