Closed
Bug 857192
Opened 12 years ago
Closed 12 years ago
[HiDPI] Image viewer has 1px of scroll
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 23
People
(Reporter: edwardsgreg, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(2 files)
350.11 KB,
image/jpeg
|
Details | |
2.68 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•12 years ago
|
||
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.
Assignee | ||
Comment 2•12 years ago
|
||
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 | ||
Comment 3•12 years ago
|
||
This fixes the issue, AFAICT. Tryserver build at https://tbpl.mozilla.org/?tree=Try&rev=1eb63c4f04d0.
Attachment #737540 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jfkthame
![]() |
||
Comment 4•12 years ago
|
||
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+
Assignee | ||
Comment 5•12 years ago
|
||
Target Milestone: --- → Firefox 23
Comment 6•12 years ago
|
||
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.
Description
•