Closed Bug 857192 Opened 12 years ago Closed 12 years ago

[HiDPI] Image viewer has 1px of scroll

Categories

(Firefox :: General, defect)

23 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 23

People

(Reporter: edwardsgreg, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image imagepreviewbug.jpg
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130402 Firefox/23.0 Build ID: 20130402030843 Steps to reproduce: Use a HiDPI setup with a version of Firefox with Bug 844604 landed. (192dpi tested) Navigate to an image. Make sure the image zoom is set to fit the window. Resize the window a little bit if necessary. Actual results: Sometimes there will be a scroll bar that provides one device pixel's worth of scroll. Expected results: There should never be scrolling when the image is fit to the window.
I should also add that this doesn't appear to affect Mac, probably because it forces the window size to logical pixels. It seems the fit-to-window script is rounding the image size up to the next whole CSS pixel.
Blocks: win-hidpi, 844604
Component: Untriaged → General
Keywords: regression
I was able to reproduce a similar effect on OS X/Retina by setting devPixelsPerPx to 4, although that introduces various other UI issues, so nobody should be using such a setting. On Windows, I can reproduce at 192dpi, but not at lower settings such as 120 or 144. I believe the problem arises because the ImageDocument rounds its "available size" to integer CSS pixels, but in HiDPI situations this may lead to rounding up to a size that's a fraction of a CSS pixel (but a whole device pixel) larger than is in fact available. Testing a possible patch at the moment.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → jfkthame
Comment on attachment 737540 [details] [diff] [review] use float instead of integer CSS pixels to track available space for image r=me
Attachment #737540 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: