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/CSSTransformComponent.h" | 5 #include "core/css/cssom/CSSTransformComponent.h" |
6 | 6 |
7 #include "core/css/cssom/CSSMatrixTransformComponent.h" | 7 #include "core/css/cssom/CSSMatrixTransformComponent.h" |
8 #include "core/css/cssom/CSSPerspective.h" | 8 #include "core/css/cssom/CSSPerspective.h" |
9 #include "core/css/cssom/CSSRotation.h" | 9 #include "core/css/cssom/CSSRotation.h" |
10 #include "core/css/cssom/CSSScale.h" | 10 #include "core/css/cssom/CSSScale.h" |
11 #include "core/css/cssom/CSSSkew.h" | 11 #include "core/css/cssom/CSSSkew.h" |
12 #include "core/css/cssom/CSSTranslation.h" | 12 #include "core/css/cssom/CSSTranslation.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
| 15 namespace cssom { |
15 | 16 |
16 CSSTransformComponent* CSSTransformComponent::fromCSSValue(const CSSValue& value
) | 17 CSSTransformComponent* CSSTransformComponent::fromCSSValue(const CSSValue& value
) |
17 { | 18 { |
18 if (!value.isFunctionValue()) | 19 if (!value.isFunctionValue()) |
19 return nullptr; | 20 return nullptr; |
20 | 21 |
21 const CSSFunctionValue& functionValue = toCSSFunctionValue(value); | 22 const CSSFunctionValue& functionValue = toCSSFunctionValue(value); |
22 switch (functionValue.functionType()) { | 23 switch (functionValue.functionType()) { |
23 case CSSValueMatrix: | 24 case CSSValueMatrix: |
24 case CSSValueMatrix3d: | 25 case CSSValueMatrix3d: |
(...skipping 20 matching lines...) Expand all Loading... |
45 case CSSValueTranslateX: | 46 case CSSValueTranslateX: |
46 case CSSValueTranslateY: | 47 case CSSValueTranslateY: |
47 case CSSValueTranslateZ: | 48 case CSSValueTranslateZ: |
48 case CSSValueTranslate3d: | 49 case CSSValueTranslate3d: |
49 return CSSTranslation::fromCSSValue(functionValue); | 50 return CSSTranslation::fromCSSValue(functionValue); |
50 default: | 51 default: |
51 return nullptr; | 52 return nullptr; |
52 } | 53 } |
53 } | 54 } |
54 | 55 |
| 56 } // namespace cssom |
55 } // namespace blink | 57 } // namespace blink |
| 58 |
OLD | NEW |