Changeset 224681 in webkit
- Timestamp:
- Nov 10, 2017 7:43:33 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r224680 r224681 1 2017-11-10 Ms2ger <Ms2ger@igalia.com> 2 3 [GTK] Update test expectations for imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html. 4 https://bugs.webkit.org/show_bug.cgi?id=179051 5 6 Reviewed by Michael Catanzaro. 7 8 The expectations are platform-specific because the test times out on mac. 9 The difference with the mac expectations is only in the last part of the 10 test, after the timeout. 11 12 This follows our policy of creating -expected files with failures for 13 imported wpt tests, to allow using them as regression tests. 14 15 * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: 16 1 17 2017-11-10 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt
r223769 r224681 1 CONSOLE MESSAGE: line 167: Canvas area exceeds the maximum limit (width * height > 268435456). 1 2 2 FAIL createImageBitmap with a HTMLImageElement source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 3 FAIL createImageBitmap with a HTMLImageElement source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 4 FAIL createImageBitmap with a HTMLImageElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"5 FAIL createImageBitmap with a HTMLVideoElement source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 6 FAIL createImageBitmap with a HTMLVideoElement source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 7 FAIL createImageBitmap with a HTMLVideoElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"8 FAIL createImageBitmap with a HTMLCanvasElement source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 9 FAIL createImageBitmap with a HTMLCanvasElement source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 10 FAIL createImageBitmap with a HTMLCanvasElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"3 PASS createImageBitmap with a HTMLImageElement source and sw set to 0 rejects with a RangeError. 4 PASS createImageBitmap with a HTMLImageElement source and sh set to 0 rejects with a RangeError. 5 FAIL createImageBitmap with a HTMLImageElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_unreached: Should have rejected: undefined Reached unreachable code 6 PASS createImageBitmap with a HTMLVideoElement source and sw set to 0 rejects with a RangeError. 7 PASS createImageBitmap with a HTMLVideoElement source and sh set to 0 rejects with a RangeError. 8 FAIL createImageBitmap with a HTMLVideoElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 9 PASS createImageBitmap with a HTMLCanvasElement source and sw set to 0 rejects with a RangeError. 10 PASS createImageBitmap with a HTMLCanvasElement source and sh set to 0 rejects with a RangeError. 11 FAIL createImageBitmap with a HTMLCanvasElement source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_unreached: Should have rejected: undefined Reached unreachable code 11 12 FAIL createImageBitmap with a OffscreenCanvas source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" 12 13 FAIL createImageBitmap with a OffscreenCanvas source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" 13 14 FAIL createImageBitmap with a OffscreenCanvas source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" 14 FAIL createImageBitmap with a ImageData source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 15 FAIL createImageBitmap with a ImageData source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 16 FAIL createImageBitmap with a ImageData source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"17 FAIL createImageBitmap with a ImageBitmap source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 18 FAIL createImageBitmap with a ImageBitmap source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 19 FAIL createImageBitmap with a ImageBitmap source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"20 FAIL createImageBitmap with a Blob source and sw set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 21 FAIL createImageBitmap with a Blob source and sh set to 0 rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 22 FAIL createImageBitmap with a Blob source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"23 FAIL createImageBitmap with undefined image source rejects with a TypeError. Can't find variable: createImageBitmap 24 FAIL createImageBitmap with null image source rejects with a TypeError. Can't find variable: createImageBitmap 25 FAIL createImageBitmap with empty image source rejects with a InvalidStateError. Can't find variable: createImageBitmap 26 FAIL createImageBitmap with empty video source rejects with a InvalidStateError. Can't find variable: createImageBitmap27 FAIL createImageBitmap with an oversized canvas source rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap" 15 PASS createImageBitmap with a ImageData source and sw set to 0 rejects with a RangeError. 16 PASS createImageBitmap with a ImageData source and sh set to 0 rejects with a RangeError. 17 FAIL createImageBitmap with a ImageData source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ImageData is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 18 PASS createImageBitmap with a ImageBitmap source and sw set to 0 rejects with a RangeError. 19 PASS createImageBitmap with a ImageBitmap source and sh set to 0 rejects with a RangeError. 20 FAIL createImageBitmap with a ImageBitmap source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ImageBitmap is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 21 PASS createImageBitmap with a Blob source and sw set to 0 rejects with a RangeError. 22 PASS createImageBitmap with a Blob source and sh set to 0 rejects with a RangeError. 23 FAIL createImageBitmap with a Blob source and oversized (unallocatable) crop region rejects with an InvalidStateError DOMException. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 24 PASS createImageBitmap with undefined image source rejects with a TypeError. 25 PASS createImageBitmap with null image source rejects with a TypeError. 26 PASS createImageBitmap with empty image source rejects with a InvalidStateError. 27 FAIL createImageBitmap with empty video source rejects with a InvalidStateError. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with HTMLVideoElement is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 28 PASS createImageBitmap with an oversized canvas source rejects with a RangeError. 28 29 FAIL createImageBitmap with an invalid OffscreenCanvas source rejects with a RangeError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: OffscreenCanvas" 29 FAIL createImageBitmap with an undecodable blob source rejects with an InvalidStateError. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: createImageBitmap"30 FAIL createImageBitmap with an undecodable blob source rejects with an InvalidStateError. assert_throws: function "function () { throw e }" threw object "TypeError: createImageBitmap with ArrayBuffer or Blob is not implemented" ("TypeError") expected object "InvalidStateError" ("InvalidStateError") 30 31 -
trunk/Source/WTF/ChangeLog
r224665 r224681 1 2017-11-10 Ms2ger <Ms2ger@igalia.com> 2 3 Export tryFastZeroedMalloc. 4 https://bugs.webkit.org/show_bug.cgi?id=179051 5 6 Reviewed by Michael Catanzaro. 7 8 The other functions were exported in bug 72855. There does not seem to be a 9 reason not to export this one. 10 11 * wtf/FastMalloc.h: 12 1 13 2017-11-09 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WTF/wtf/FastMalloc.h
r221575 r224681 53 53 54 54 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastMalloc(size_t); 55 TryMallocReturnValue tryFastZeroedMalloc(size_t);55 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastZeroedMalloc(size_t); 56 56 WTF_EXPORT_PRIVATE TryMallocReturnValue tryFastCalloc(size_t numElements, size_t elementSize); 57 57 -
trunk/Source/WebCore/ChangeLog
r224671 r224681 1 2017-11-10 Ms2ger <Ms2ger@igalia.com> 2 3 [GTK] Use fallible allocation in ImageBuffer::ImageBuffer(). 4 https://bugs.webkit.org/show_bug.cgi?id=179051 5 6 Reviewed by Michael Catanzaro. 7 8 Test: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html 9 10 * platform/graphics/cairo/ImageBufferCairo.cpp: 11 (WebCore::ImageBuffer::ImageBuffer): 12 1 13 2017-11-10 Miguel Gomez <magomez@igalia.com> 2 14 -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r223728 r224681 232 232 233 233 int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, m_size.width()); 234 auto* surfaceData = fastZeroedMalloc(m_size.height() * stride); 234 void* surfaceData; 235 if (!tryFastZeroedMalloc(m_size.height() * stride).getValue(surfaceData)) 236 return; 235 237 236 238 m_data.m_surface = adoptRef(cairo_image_surface_create_for_data(static_cast<unsigned char*>(surfaceData), CAIRO_FORMAT_ARGB32, m_size.width(), m_size.height(), stride));
Note: See TracChangeset
for help on using the changeset viewer.