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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/CSSMatrixTransformComponent.h" 5 #include "core/css/cssom/CSSMatrixTransformComponent.h"
6 6
7 #include <cmath>
8 #include <memory>
7 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
8 #include "wtf/MathExtras.h" 10 #include "wtf/MathExtras.h"
9 #include <cmath>
10 #include <memory>
11 11
12 namespace blink { 12 namespace blink {
13 13
14 CSSFunctionValue* CSSMatrixTransformComponent::toCSSValue() const { 14 CSSFunctionValue* CSSMatrixTransformComponent::toCSSValue() const {
15 CSSFunctionValue* result = 15 CSSFunctionValue* result =
16 CSSFunctionValue::create(m_is2D ? CSSValueMatrix : CSSValueMatrix3d); 16 CSSFunctionValue::create(m_is2D ? CSSValueMatrix : CSSValueMatrix3d);
17 17
18 if (m_is2D) { 18 if (m_is2D) {
19 double values[6] = {a(), b(), c(), d(), e(), f()}; 19 double values[6] = {a(), b(), c(), d(), e(), f()};
20 for (double value : values) { 20 for (double value : values) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 CSSMatrixTransformComponent* 97 CSSMatrixTransformComponent*
98 CSSMatrixTransformComponent::translate3d(double x, double y, double z) { 98 CSSMatrixTransformComponent::translate3d(double x, double y, double z) {
99 std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create(); 99 std::unique_ptr<TransformationMatrix> matrix = TransformationMatrix::create();
100 matrix->setM41(x); 100 matrix->setM41(x);
101 matrix->setM42(y); 101 matrix->setM42(y);
102 matrix->setM43(z); 102 matrix->setM43(z);
103 return new CSSMatrixTransformComponent(std::move(matrix), Translation3DType); 103 return new CSSMatrixTransformComponent(std::move(matrix), Translation3DType);
104 } 104 }
105 105
106 } // namespace blink 106 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698