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 upIncorrect is_rect_valid checks in CanvasRenderingContext2D::drawImage. #10600
Comments
|
Hi, I like to work on this. The tests What additional tests are required? |
|
Running |
|
I meant both tests are already changed for the current spec and set to FAIL in https://github.com/servo/servo/blob/17fe437fb72694763f0f7f1b4701127ebc2ef5aa/tests/wpt/metadata/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini Running
When I change the ini files to PASS the test runs without failures. |
Remove IndexSizeError in CanvasRenderingContext2D::drawImage <!-- Please describe your changes on the following line: --> The current spec don't expect the IndexSizeError if the rectangle is empty. --- <!-- 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 #10600 (github issue number if applicable). <!-- 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. --> <!-- 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/16658) <!-- Reviewable:end -->
Blocks #10597.
Nothing in the spec seems to support throwing
IndexSizeErrors with empty rectangles. The spec may have changed since we implemented it, though.Unfortunately, there seem to be some tests that will start failing with this change (web-platform-tests/wpt#2835). We probably need to write some more tests too.
components/script/dom/canvasrenderingcontext2d.rs.2dcontext/conformance-requirements/2d.voidreturn.html.