| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "core/css/cssom/CSSAngleValue.h" | 5 #include "core/css/cssom/CSSAngleValue.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
| 9 #include "wtf/MathExtras.h" | 9 #include "platform/wtf/MathExtras.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 CSSAngleValue* CSSAngleValue::Create(double value, | 13 CSSAngleValue* CSSAngleValue::Create(double value, |
| 14 CSSPrimitiveValue::UnitType unit) { | 14 CSSPrimitiveValue::UnitType unit) { |
| 15 DCHECK(CSSPrimitiveValue::IsAngle(unit)); | 15 DCHECK(CSSPrimitiveValue::IsAngle(unit)); |
| 16 return new CSSAngleValue(value, unit); | 16 return new CSSAngleValue(value, unit); |
| 17 } | 17 } |
| 18 | 18 |
| 19 CSSAngleValue* CSSAngleValue::Create(double value, const String& unit) { | 19 CSSAngleValue* CSSAngleValue::Create(double value, const String& unit) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 double CSSAngleValue::turns() const { | 57 double CSSAngleValue::turns() const { |
| 58 return deg2turn(degrees()); | 58 return deg2turn(degrees()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 CSSValue* CSSAngleValue::ToCSSValue() const { | 61 CSSValue* CSSAngleValue::ToCSSValue() const { |
| 62 return CSSPrimitiveValue::Create(value_, unit_); | 62 return CSSPrimitiveValue::Create(value_, unit_); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| OLD | NEW |