Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSAngleValue.cpp

Issue 2367663002: [WIP] Attempt to move everything cssom into a cssom namespace (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "wtf/MathExtras.h"
10 10
11 namespace blink { 11 namespace blink {
12 namespace cssom {
12 13
13 CSSAngleValue* CSSAngleValue::create(double value, const String& unit, Exception State& exceptionState) 14 CSSAngleValue* CSSAngleValue::create(double value, const String& unit, Exception State& exceptionState)
14 { 15 {
15 CSSPrimitiveValue::UnitType primitiveUnit = CSSPrimitiveValue::stringToUnitT ype(unit); 16 CSSPrimitiveValue::UnitType primitiveUnit = CSSPrimitiveValue::stringToUnitT ype(unit);
16 DCHECK(CSSPrimitiveValue::isAngle(primitiveUnit)); 17 DCHECK(CSSPrimitiveValue::isAngle(primitiveUnit));
17 return new CSSAngleValue(value, primitiveUnit); 18 return new CSSAngleValue(value, primitiveUnit);
18 } 19 }
19 20
20 double CSSAngleValue::degrees() const 21 double CSSAngleValue::degrees() const
21 { 22 {
(...skipping 25 matching lines...) Expand all
47 double CSSAngleValue::turns() const 48 double CSSAngleValue::turns() const
48 { 49 {
49 return deg2turn(degrees()); 50 return deg2turn(degrees());
50 } 51 }
51 52
52 CSSValue* CSSAngleValue::toCSSValue() const 53 CSSValue* CSSAngleValue::toCSSValue() const
53 { 54 {
54 return CSSPrimitiveValue::create(m_value, m_unit); 55 return CSSPrimitiveValue::create(m_value, m_unit);
55 } 56 }
56 57
58 } // namespace cssom
57 } // namespace blink 59 } // namespace blink
60
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSAngleValue.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSCalcLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698