Closed Bug 629894 Opened 15 years ago Closed 14 years ago

createImageData and getImageData should work for sizes smaller than one pixel

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 2 obsolete files)

The spec says > At least one pixel's worth of image data must be returned. We fail http://www.w3c-test.org/html/tests/submission/PhilipTaylor/canvas/2d.imageData.create2.tiny.html because we use JS_ValueToECMAInt32, afaict.
Summary: createImageData should work for sizes smaller than one pixel → createImageData and getImageData should work for sizes smaller than one pixel
So we just need to clamp to a lower bound of 1x1? What should happen if the passed-in values are -5 and 20?
Take the absolute magnitude. I've got a patch for that, but I still need to file.
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
Attached patch Patch v1 (obsolete) — Splinter Review
Attachment #510316 - Flags: review?(bzbarsky)
Blocks: 392751
Depends on: 630052
So 0 is supposed to throw but 0.1 is supposed to round up to 1? I'd prefer these be explicit == 0 tests if that's what we're testing for.
Right. Will fix.
As that about the == 0 thing, or an answer to my question? Or both, in separate sentences?
Attached patch Patch v2 (obsolete) — Splinter Review
To both, indeed.
Attachment #510316 - Attachment is obsolete: true
Attachment #518755 - Flags: review?(bzbarsky)
Attachment #510316 - Flags: review?(bzbarsky)
Comment on attachment 518755 [details] [diff] [review] Patch v2 r=me
Attachment #518755 - Flags: review?(bzbarsky) → review+
Depends on: post2.0
Whiteboard: [needs landing]
Whiteboard: [needs landing] → [needs landing][not-ready-for-cedar]
Keywords: checkin-needed
Whiteboard: [needs landing][not-ready-for-cedar]
Attachment #518755 - Attachment is obsolete: true
Flags: in-testsuite+
Whiteboard: fixed-in-cedar
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: