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

Side by Side Diff: third_party/WebKit/WebCore/html/HTMLCanvasElement.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return m_imageBuffer.get(); 273 return m_imageBuffer.get();
274 } 274 }
275 275
276 TransformationMatrix HTMLCanvasElement::baseTransform() const 276 TransformationMatrix HTMLCanvasElement::baseTransform() const
277 { 277 {
278 ASSERT(m_createdImageBuffer); 278 ASSERT(m_createdImageBuffer);
279 FloatSize unscaledSize(width(), height()); 279 FloatSize unscaledSize(width(), height());
280 IntSize size = convertLogicalToDevice(unscaledSize); 280 IntSize size = convertLogicalToDevice(unscaledSize);
281 TransformationMatrix transform; 281 TransformationMatrix transform;
282 if (size.width() && size.height()) 282 if (size.width() && size.height())
283 transform.scale(size.width() / unscaledSize.width(), size.height() / uns caledSize.height()); 283 transform.scaleNonUniform(size.width() / unscaledSize.width(), size.heig ht() / unscaledSize.height());
284 transform.multiply(m_imageBuffer->baseTransform()); 284 transform.multiply(m_imageBuffer->baseTransform());
285 return transform; 285 return transform;
286 } 286 }
287 287
288 } 288 }
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/html/HTMLAnchorElement.cpp ('k') | third_party/WebKit/WebCore/html/HTMLParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698