Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImageData constructors intermix logic #24274
Closed
Labels
Comments
|
I'll take a look at this. |
bors-servo
added a commit
that referenced
this issue
Sep 26, 2019
Add check for empty data on ImageData constructor. <!-- Please describe your changes on the following line: --> This commit implements the nonzero check for ImageData::new_with_jsobject() according to the ImageData spec. --- <!-- 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 #24274 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24275) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ImageData specification has two constructors. They have different logic about what arguments are valid are not. The implementation of these constructors tries to share code and ends up getting the checks a bit confused, causing some of the automated tests for the specification logic to fail.
Code:
components/script/dom/imagedata.rsTests:
./mach test-wpt tests/wpt/web-platform-tests/2dcontext/pixel-manipulationIn particular, see
2d.imageData.object.ctor.array.bounds.html. Removetests/wpt/metadata/2dcontext/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html.iniso the test expects to pass, then run./mach test-wpt tests/wpt/web-platform-tests/2dcontext/pixel-manipulation/2d.imageData.object.ctor.array.bounds.htmlto see the failing test output in your terminal after closing the window.