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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 CSSMatrix* CSSMatrix::skewY(double angle) const { | 186 CSSMatrix* CSSMatrix::skewY(double angle) const { |
187 if (std::isnan(angle)) | 187 if (std::isnan(angle)) |
188 angle = 0; | 188 angle = 0; |
189 return CSSMatrix::Create(TransformationMatrix(*matrix_).SkewY(angle)); | 189 return CSSMatrix::Create(TransformationMatrix(*matrix_).SkewY(angle)); |
190 } | 190 } |
191 | 191 |
192 String CSSMatrix::toString() const { | 192 String CSSMatrix::toString() const { |
193 // FIXME - Need to ensure valid CSS floating point values | 193 // FIXME - Need to ensure valid CSS floating point values |
194 // (https://bugs.webkit.org/show_bug.cgi?id=20674) | 194 // (https://bugs.webkit.org/show_bug.cgi?id=20674) |
195 if (matrix_->IsAffine()) | 195 if (matrix_->IsAffine()) |
196 return String::Format("matrix(%f, %f, %f, %f, %f, %f)", matrix_->A(), | 196 return String::Format("matrix(%g, %g, %g, %g, %g, %g)", matrix_->A(), |
zino
2017/06/06 09:20:08
I mean that this change should not be contained in
| |
197 matrix_->B(), matrix_->C(), matrix_->D(), | 197 matrix_->B(), matrix_->C(), matrix_->D(), |
198 matrix_->E(), matrix_->F()); | 198 matrix_->E(), matrix_->F()); |
199 return String::Format( | 199 return String::Format( |
200 "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, " | 200 "matrix3d(%g, %g, %g, %g, %g, %g, %g, %g, %g, %g, %g, %g, %g, %g, %g, " |
201 "%f)", | 201 "%g)", |
202 matrix_->M11(), matrix_->M12(), matrix_->M13(), matrix_->M14(), | 202 matrix_->M11(), matrix_->M12(), matrix_->M13(), matrix_->M14(), |
203 matrix_->M21(), matrix_->M22(), matrix_->M23(), matrix_->M24(), | 203 matrix_->M21(), matrix_->M22(), matrix_->M23(), matrix_->M24(), |
204 matrix_->M31(), matrix_->M32(), matrix_->M33(), matrix_->M34(), | 204 matrix_->M31(), matrix_->M32(), matrix_->M33(), matrix_->M34(), |
205 matrix_->M41(), matrix_->M42(), matrix_->M43(), matrix_->M44()); | 205 matrix_->M41(), matrix_->M42(), matrix_->M43(), matrix_->M44()); |
206 } | 206 } |
207 | 207 |
208 } // namespace blink | 208 } // namespace blink |
OLD | NEW |