Closed
Bug 890383
Opened 11 years ago
Closed 5 years ago
Setting font-size in Windows Control Panel to 125% or 150% breaks border-width rendering
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 477157
People
(Reporter: T.Rosenau, Unassigned)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212
Steps to reproduce:
Set Font Size to 125% or 150% in Windows 7 control panel/appearance
Actual results:
Border-Width calculation in Firefox is not correct.
When font-size is set to 125%, borders are drawn correctly iff border-width is a multiple of 4.
When font-size is set to 150%, borders are drawn correctly iff border-width is even.
Not only are they drawn incorrectly. Also, getComputedStyle() returns wrong values.
I haven't really digged into this, but it may have the same cause as Bug 890445, and may be related to Bug 820679.
Updated•11 years ago
|
Attachment #771465 -
Attachment mime type: text/plain → text/html
Updated•11 years ago
|
Attachment #771466 -
Attachment mime type: text/plain → text/html
Comment 3•11 years ago
|
||
More likely related to be related to Bug 895096 than anything. Has nothing to do with 890445 which is not a bug.
Comment 4•11 years ago
|
||
See Bug 430153, Bug 477157, and probably a ton of other dupes. It's a consequence of Firefox's philosophy for scaling pages. It takes the liberty of rounding border widths to device pixels to make them look nicer, at the expense of layout accuracy.
This decision was made many years ago before high DPI screens were on anyone's radar, and I think it's time to take another look.
IMO, IE11 has a much better scaling model. It appears to use the true border width for layout and getComputedStyle, but rounds it to device pixels for display so that widths aren't uneven.
Right.
Also note that the other Bugs are about FF zoom levels > 1, while this one happens with default FF settings.
On high res screens, Windows 7 defaults to 125% font size, so it affects a large number of users.
Comment 6•11 years ago
|
||
High DPI is implemented using the same backend as full zoom, so it exposes the same bugs.
Updated•11 years ago
|
Component: Untriaged → Layout
Product: Firefox → Core
Version: 22 Branch → Trunk
This continues to plague us. By default, with newer computers and higher resolution screens, new Lenovos are setting default scaling to 150%. All borders on my web page that are 1px are calculated as 0.66667px, causing major layout issues. It only seems to affect borders, so any websites that rely on more fixed width that utilize elements with borders will never be consistent with other browsers.
Furthermore, I've found no easy workaround here, short of implementing a hack trying to dynamically resize all border widths on page load based on detected OS font size scaling....which is just not practical.
My question is how can you scale border widths like this, but not touch other widths, such as margins, padding, etc?
Attachment included to show FF width calcs.
Comment 9•9 years ago
|
||
Confirming as this seems to affect multiple users...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 10•9 years ago
|
||
Isn't this a dupe of bug 477157?
(If not, all those theme-related bugs I mentioned in 477157 should be marked as dependant of this one)
Comment 11•5 years ago
|
||
Bump. I found my way here because there is a misalignment issue on the homepage of imgflip.com ("new" button at top of page) caused by Firefox not listening to our CSS specifications. Hopefully this is a useful example of how this occurs in the wild. Millions of users visit this page.
I imagine the percentage of Firefox's desktop users who hit this bug will increase exponentially as 2560x and 3840x monitors replace older ones.
Comment 12•5 years ago
|
||
This is in fact just bug 477157.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•