| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 y = 0; | 118 y = 0; |
| 119 return WebKitCSSMatrix::create(m_matrix.translate(x, y)); | 119 return WebKitCSSMatrix::create(m_matrix.translate(x, y)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::scale(float scaleX, float scaleY) | 122 PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::scale(float scaleX, float scaleY) |
| 123 { | 123 { |
| 124 if (isnan(scaleX)) | 124 if (isnan(scaleX)) |
| 125 scaleX = 1; | 125 scaleX = 1; |
| 126 if (isnan(scaleY)) | 126 if (isnan(scaleY)) |
| 127 scaleY = scaleX; | 127 scaleY = scaleX; |
| 128 return WebKitCSSMatrix::create(m_matrix.scale(scaleX,scaleY)); | 128 return WebKitCSSMatrix::create(m_matrix.scaleNonUniform(scaleX,scaleY)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotate(float rot) | 131 PassRefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotate(float rot) |
| 132 { | 132 { |
| 133 if (isnan(rot)) | 133 if (isnan(rot)) |
| 134 rot = 0; | 134 rot = 0; |
| 135 return WebKitCSSMatrix::create(m_matrix.rotate(rot)); | 135 return WebKitCSSMatrix::create(m_matrix.rotate(rot)); |
| 136 } | 136 } |
| 137 | 137 |
| 138 String WebKitCSSMatrix::toString() | 138 String WebKitCSSMatrix::toString() |
| 139 { | 139 { |
| 140 return String::format("matrix(%f, %f, %f, %f, %f, %f)", | 140 return String::format("matrix(%f, %f, %f, %f, %f, %f)", |
| 141 m_matrix.a(), m_matrix.b(), m_matrix.c(), m_matrix.d
(), m_matrix.e(), m_matrix.f()); | 141 m_matrix.a(), m_matrix.b(), m_matrix.c(), m_matrix.d
(), m_matrix.e(), m_matrix.f()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace WebCore | 144 } // namespace WebCore |
| OLD | NEW |