Closed Bug 351969 Opened 18 years ago Closed 18 years ago

nsImageDocument image scaling should never scale a dimension to 0px

Categories

(Core :: General, defect)

x86
All
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: csthomas, Assigned: csthomas)

References

Details

Attachments

(1 file)

A 5000x1 pixel image becomes invisible.  nsImageDocument should not scale either dimension to less than 1 px.  The aspect ratio stretching is fine, because the user won't be able to tell the image contents are stretched when they're jammed into 1 pixel.
*** Bug 316376 has been marked as a duplicate of this bug. ***
Severity: normal → trivial
Keywords: helpwanted
OS: Windows XP → All
Target Milestone: --- → mozilla1.9alpha
Attached patch patchSplinter Review
The aspect ratio is incorrect when the smaller dimension is being capped at 1px, but that isn't a problem because you can't actually see anything.
Attachment #243140 - Flags: superreview?(bzbarsky)
Attachment #243140 - Flags: review?
Attachment #243140 - Flags: review? → review?(cbiesinger)
Please ask someone else for review.  I won't be able to get to this any time soon (like in 2006).
Attachment #243140 - Flags: superreview?(bzbarsky) → superreview?(jst)
Attachment #243140 - Flags: review?(cbiesinger) → review+
Comment on attachment 243140 [details] [diff] [review]
patch

sr=jst
Attachment #243140 - Flags: superreview?(jst) → superreview+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Small nit: I think you mean NSToIntFloor, not NSToCoordFloor; image widths and heights are in pixels, and NSToCoord* is only supposed to be used with twips/app units. There is no difference at the moment, but that's not guaranteed to remain the case.
*** Bug 190551 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: