Auto merge of #25675 - pylbrecht:draw.image, r=jdm

Add usability checks to CanvasRenderingContext2D.drawImage()

<!-- Please describe your changes on the following line: -->
These changes add the usability checks performed on an image to be drawn to the canvas.

References:
- https://html.spec.whatwg.org/multipage/canvas.html#drawing-images
- https://html.spec.whatwg.org/multipage/canvas.html#check-the-usability-of-the-image-argument

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and repla(e `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #25331

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-02-10 22:59:37 -05:00 committed by GitHub
commit 8e65787737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 43 additions and 47 deletions

View file

@ -1,5 +0,0 @@
[2d.drawImage.broken.html]
type: testharness
[Canvas test: 2d.drawImage.broken]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.incomplete.emptysrc.html]
type: testharness
[Canvas test: 2d.drawImage.incomplete.emptysrc]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.incomplete.immediate.html]
type: testharness
[Canvas test: 2d.drawImage.incomplete.immediate]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.incomplete.nosrc.html]
type: testharness
[Canvas test: 2d.drawImage.incomplete.nosrc]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.incomplete.reload.html]
type: testharness
[Canvas test: 2d.drawImage.incomplete.reload]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.incomplete.removedsrc.html]
type: testharness
[Canvas test: 2d.drawImage.incomplete.removedsrc]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.zerocanvas.html]
type: testharness
[Canvas test: 2d.drawImage.zerocanvas]
expected: FAIL

View file

@ -1,8 +1,5 @@
[drawimage_html_image.html]
type: testharness
[Draw 100x100 image to 100x100 canvas at 0,0.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 70,99 should be light purple.]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.drawImage.zerocanvas.html]
[OffscreenCanvas test: 2d.drawImage.zerocanvas]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.drawImage.zerocanvas.worker.html]
[2d]
expected: FAIL