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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSRotation.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/CSSRotation.h" 5 #include "core/css/cssom/CSSRotation.h"
6 6
7 #include "core/css/CSSFunctionValue.h" 7 #include "core/css/CSSFunctionValue.h"
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 9
10 namespace blink { 10 namespace blink {
11 namespace cssom {
11 12
12 namespace { 13 namespace {
13 14
14 bool isNumberValue(const CSSValue& value) 15 bool isNumberValue(const CSSValue& value)
15 { 16 {
16 return value.isPrimitiveValue() && toCSSPrimitiveValue(value).isNumber(); 17 return value.isPrimitiveValue() && toCSSPrimitiveValue(value).isNumber();
17 } 18 }
18 19
19 CSSRotation* fromCSSRotate(const CSSFunctionValue& value) 20 CSSRotation* fromCSSRotate(const CSSFunctionValue& value)
20 { 21 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 CSSFunctionValue* result = CSSFunctionValue::create(m_is2D ? CSSValueRotate : CSSValueRotate3d); 80 CSSFunctionValue* result = CSSFunctionValue::create(m_is2D ? CSSValueRotate : CSSValueRotate3d);
80 if (!m_is2D) { 81 if (!m_is2D) {
81 result->append(*CSSPrimitiveValue::create(m_x, CSSPrimitiveValue::UnitTy pe::Number)); 82 result->append(*CSSPrimitiveValue::create(m_x, CSSPrimitiveValue::UnitTy pe::Number));
82 result->append(*CSSPrimitiveValue::create(m_y, CSSPrimitiveValue::UnitTy pe::Number)); 83 result->append(*CSSPrimitiveValue::create(m_y, CSSPrimitiveValue::UnitTy pe::Number));
83 result->append(*CSSPrimitiveValue::create(m_z, CSSPrimitiveValue::UnitTy pe::Number)); 84 result->append(*CSSPrimitiveValue::create(m_z, CSSPrimitiveValue::UnitTy pe::Number));
84 } 85 }
85 result->append(*CSSPrimitiveValue::create(m_angle, CSSPrimitiveValue::UnitTy pe::Degrees)); 86 result->append(*CSSPrimitiveValue::create(m_angle, CSSPrimitiveValue::UnitTy pe::Degrees));
86 return result; 87 return result;
87 } 88 }
88 89
90 } // namespace cssom
89 } // namespace blink 91 } // namespace blink
92
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSRotation.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSScale.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698