-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Canvas drawImage() API does not throw an exception when the image is …
…in broken state https://bugs.webkit.org/show_bug.cgi?id=274575 rdar://128588063 Reviewed by Kimmo Kinnunen. If the image source is HTMLOrSVGImageElement and the image in a broken state, canvas drawImage() should throw an exception. Canvas image sources specifications: https://html.spec.whatwg.org/multipage/canvas.html#image-sources-for-2d-rendering-contexts * LayoutTests/http/tests/lazyload/lazy-image-load-in-iframes-scripting-disabled-expected.txt: * LayoutTests/http/tests/lazyload/placeholder.js: (is_image_fully_loaded): * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent-expected.txt: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h: Canonical link: https://commits.webkit.org/279319@main
- Loading branch information
Showing
5 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ts/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
2d.drawImage.nonexistent | ||
Actual output: | ||
|
||
FAIL Canvas test: 2d.drawImage.nonexistent assert_throws_dom: function "function() { ctx.drawImage(img, 0, 0); }" did not throw | ||
PASS Canvas test: 2d.drawImage.nonexistent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters