| 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 28 matching lines...) Expand all Loading... |
| 39 #include "core/style/ComputedStyle.h" | 39 #include "core/style/ComputedStyle.h" |
| 40 #include "core/style/StyleInheritedData.h" | 40 #include "core/style/StyleInheritedData.h" |
| 41 #include "wtf/MathExtras.h" | 41 #include "wtf/MathExtras.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 CSSMatrix* CSSMatrix::create(ExecutionContext* executionContext, | 45 CSSMatrix* CSSMatrix::create(ExecutionContext* executionContext, |
| 46 const String& s, | 46 const String& s, |
| 47 ExceptionState& exceptionState) { | 47 ExceptionState& exceptionState) { |
| 48 UseCounter::count(executionContext, UseCounter::WebKitCSSMatrix); | 48 UseCounter::count(executionContext, UseCounter::WebKitCSSMatrix); |
| 49 if (!s.isEmpty()) { |
| 50 UseCounter::count(executionContext, |
| 51 UseCounter::WebkitCSSMatrixConstructFromString); |
| 52 } |
| 49 return new CSSMatrix(s, exceptionState); | 53 return new CSSMatrix(s, exceptionState); |
| 50 } | 54 } |
| 51 | 55 |
| 52 CSSMatrix::CSSMatrix(const TransformationMatrix& m) | 56 CSSMatrix::CSSMatrix(const TransformationMatrix& m) |
| 53 : m_matrix(TransformationMatrix::create(m)) {} | 57 : m_matrix(TransformationMatrix::create(m)) {} |
| 54 | 58 |
| 55 CSSMatrix::CSSMatrix(const String& s, ExceptionState& exceptionState) | 59 CSSMatrix::CSSMatrix(const String& s, ExceptionState& exceptionState) |
| 56 : m_matrix(TransformationMatrix::create()) { | 60 : m_matrix(TransformationMatrix::create()) { |
| 57 setMatrixValue(s, exceptionState); | 61 setMatrixValue(s, exceptionState); |
| 58 } | 62 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 return String::format( | 199 return String::format( |
| 196 "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, " | 200 "matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, " |
| 197 "%f)", | 201 "%f)", |
| 198 m_matrix->m11(), m_matrix->m12(), m_matrix->m13(), m_matrix->m14(), | 202 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(), | 203 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(), | 204 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()); | 205 m_matrix->m41(), m_matrix->m42(), m_matrix->m43(), m_matrix->m44()); |
| 202 } | 206 } |
| 203 | 207 |
| 204 } // namespace blink | 208 } // namespace blink |
| OLD | NEW |