Auto merge of #25710 - pylbrecht:pattern.incomplete, r=jdm

Make CanvasRenderingContext2D.createPattern() return null for incomplete images

<!-- Please describe your changes on the following line: -->
`createPattern()` should return `null` if the passed `image` argument is not usable.

References:
- https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createpattern
- 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 replace `___` 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-11 08:11:40 -05:00 committed by GitHub
commit 55058b2875
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 17 additions and 35 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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