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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CSSParser::parseSingleValue(CSSPropertyTransform, string)) { 72 CSSParser::parseSingleValue(CSSPropertyTransform, string)) {
73 // Check for a "none" transform. In these cases we can use the default 73 // Check for a "none" transform. In these cases we can use the default
74 // identity matrix. 74 // identity matrix.
75 if (value->isIdentifierValue() && 75 if (value->isIdentifierValue() &&
76 (toCSSIdentifierValue(value))->getValueID() == CSSValueNone) 76 (toCSSIdentifierValue(value))->getValueID() == CSSValueNone)
77 return; 77 return;
78 78
79 DEFINE_STATIC_REF(ComputedStyle, initialStyle, createInitialStyle()); 79 DEFINE_STATIC_REF(ComputedStyle, initialStyle, createInitialStyle());
80 TransformOperations operations = 80 TransformOperations operations =
81 TransformBuilder::createTransformOperations( 81 TransformBuilder::createTransformOperations(
82 *value, CSSToLengthConversionData(initialStyle, initialStyle, 82 *value,
83 LayoutViewItem(nullptr), 1.0f)); 83 CSSToLengthConversionData(initialStyle, initialStyle,
84 LayoutViewItem(nullptr), 1.0f));
84 85
85 // Convert transform operations to a TransformationMatrix. This can fail 86 // Convert transform operations to a TransformationMatrix. This can fail
86 // if a param has a percentage ('%') 87 // if a param has a percentage ('%')
87 if (operations.dependsOnBoxSize()) 88 if (operations.dependsOnBoxSize())
88 exceptionState.throwDOMException(SyntaxError, 89 exceptionState.throwDOMException(SyntaxError,
89 "The transformation depends on the box " 90 "The transformation depends on the box "
90 "size, which is not supported."); 91 "size, which is not supported.");
91 m_matrix = TransformationMatrix::create(); 92 m_matrix = TransformationMatrix::create();
92 operations.apply(FloatSize(0, 0), *m_matrix); 93 operations.apply(FloatSize(0, 0), *m_matrix);
93 } else { // There is something there but parsing failed. 94 } else { // There is something there but parsing failed.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return String::format( 196 return String::format(
196 "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, " 197 "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, "
197 "%f)", 198 "%f)",
198 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(), 199 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(),
199 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(), 200 m_matrix->m21(), m_matrix->m22(), m_matrix->m23(), m_matrix->m24(),
200 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(), 201 m_matrix->m31(), m_matrix->m32(), m_matrix->m33(), m_matrix->m34(),
201 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44()); 202 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44());
202 } 203 }
203 204
204 } // namespace blink 205 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGroupingRule.cpp ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698