| 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/CSSScale.h" | 5 #include "core/css/cssom/CSSScale.h" |
| 6 | 6 |
| 7 #include "core/css/CSSPrimitiveValue.h" | 7 #include "core/css/CSSPrimitiveValue.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 case CSSValueScale3d: | 57 case CSSValueScale3d: |
| 58 return FromScale3d(value); | 58 return FromScale3d(value); |
| 59 default: | 59 default: |
| 60 NOTREACHED(); | 60 NOTREACHED(); |
| 61 return nullptr; | 61 return nullptr; |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 CSSFunctionValue* CSSScale::ToCSSValue() const { | 65 CSSFunctionValue* CSSScale::ToCSSValue() const { |
| 66 CSSFunctionValue* result = | 66 CSSFunctionValue* result = |
| 67 CSSFunctionValue::Create(is2d_ ? CSSValueScale : CSSValueScale3d); | 67 CSSFunctionValue::Create(is2D() ? CSSValueScale : CSSValueScale3d); |
| 68 | 68 |
| 69 result->Append( | 69 result->Append( |
| 70 *CSSPrimitiveValue::Create(x_, CSSPrimitiveValue::UnitType::kNumber)); | 70 *CSSPrimitiveValue::Create(x_, CSSPrimitiveValue::UnitType::kNumber)); |
| 71 result->Append( | 71 result->Append( |
| 72 *CSSPrimitiveValue::Create(y_, CSSPrimitiveValue::UnitType::kNumber)); | 72 *CSSPrimitiveValue::Create(y_, CSSPrimitiveValue::UnitType::kNumber)); |
| 73 if (!is2d_) | 73 if (!is2D()) |
| 74 result->Append( | 74 result->Append( |
| 75 *CSSPrimitiveValue::Create(z_, CSSPrimitiveValue::UnitType::kNumber)); | 75 *CSSPrimitiveValue::Create(z_, CSSPrimitiveValue::UnitType::kNumber)); |
| 76 | 76 |
| 77 return result; | 77 return result; |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |