WebCore/ChangeLog

 12010-08-25 Dominic Cooney <dominicc@google.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 In Chromium Skia getImageData don't retrieve the pointer into the
 6 canvas bitmap when there are no columns to copy, because this
 7 asserts when the source is outside the canvas bounds.
 8
 9 https://bugs.webkit.org/show_bug.cgi?id=44628
 10
 11 Test canvas/philip/tests/2d.imageData.get.source.outside.html
 12 covers this fix. Expect the test to pass in Chromium Linux debug.
 13
 14 * platform/graphics/skia/ImageBufferSkia.cpp:
 15 (WebCore::getImageData):
 16
1172010-08-25 Simon Fraser <simon.fraser@apple.com>
218
319 Reviewed by Dan Bernstein.

WebCore/platform/graphics/skia/ImageBufferSkia.cpp

@@PassRefPtr<ImageData> getImageData(const IntRect& rect, const SkBitmap& bitmap,
178178 int endY = rect.y() + rect.height();
179179 if (endY > size.height())
180180 endY = size.height();
181  int numRows = endY - originY;
 181 int numRows = numColumns > 0 ? endY - originY : 0;
182182
183183 ASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config);
184184 SkAutoLockPixels bitmapLock(bitmap);