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

Side by Side Diff: third_party/WebKit/WebCore/css/WebKitCSSMatrix.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « third_party/WebKit/WebCore/bridge/npapi.h ('k') | third_party/WebKit/WebCore/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/bridge/npapi.h ('k') | third_party/WebKit/WebCore/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698