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

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

Issue 2943303002: [CSS Typed OM] Refactor is2D handling in CSSTransformComponents to match new spec (Closed)
Patch Set: rebase Created 3 years, 5 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/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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSScale.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSSkew.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698