OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |