-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix createImageData with sizes < 1 pixel #6974
Conversation
dzbarsky
commented
Aug 4, 2015
Is there a test for this? |
Yep, the one I deleted the metadata for :) |
This seems odd to me. There's no explicit spec text for this, and Gecko doesn't appear to have a similar maximization step: https://dxr.mozilla.org/mozilla-central/source/dom/canvas/CanvasRenderingContext2D.cpp#5365 |
I'm going off of https://html.spec.whatwg.org/multipage/scripting.html#pixel-manipulation:dom-context-2d-createimagedata-3 by the way. |
Gecko does the equivalent thing here: https://dxr.mozilla.org/mozilla-central/source/dom/canvas/CanvasRenderingContext2D.cpp#5341 (this is after calling abs). The relevant spec text is a little lower: |
Unfortunately the canvas spec doesn't really list explicit steps for its algorithms, you have to infer them from various requirements. That's why we fail so many edge-case tests. |
Delightful! |
@bors-servo: r+ |
📌 Commit 2fb5fda has been approved by |
⌛ Testing commit 2fb5fda with merge 6c4d9ad... |
💔 Test failed - linux1 |
@bors-servo: retry
|
<!-- Reviewable:start --> [<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/6974) <!-- Reviewable:end -->
Fix createImageData with sizes < 1 pixel <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6974) <!-- Reviewable:end -->