Bug 478312 - firefox strangely reacts on change of the 'layout.css.dpi' parameter
firefox strangely reacts on change of the 'layout.css.dpi' parameter
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Gecko Maintainer
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-12-27 15:40 EST by Tagir Bakirov
Modified: 2010-01-18 11:40 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-06 17:17:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Archive of screenshots of firefox window with layout.css.dpi set to {-1, 100, 191, 192, 230, 287, 288}. (370.00 KB, application/x-tar)
2008-12-27 15:40 EST, Tagir Bakirov
no flags Details

  None (edit)
Description Tagir Bakirov 2008-12-27 15:40:26 EST
Created attachment 327889 [details]
Archive of screenshots of firefox window with layout.css.dpi set to {-1, 100, 191, 192, 230, 287, 288}.

Description of problem:

The 'layout.css.dpi' parameter in firefox configuration is treated "discretionary". Its change leads to scaling of interface and web page fonts only when the parameter belongs to a certain range. Any value from this range is treated equally. I have found three such ranges: 0-191, 192-287, 288-...

Version-Release number of selected component (if applicable):
firefox 3.0.5 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2008121622 Fedora/3.0.5-1.fc10 Firefox/3.0.5)

Steps to Reproduce:
1. Start Mozilla Firefox.
2. Enter the configuration page (about:config) and find the 'layout.css.dpi' parameter.
3. Change the value to any from (0-191) -- nothing will happen.
4. Change the value to any from (192-287) -- fonts will suddenly become much larger.
5. Change the value to 288 -- fonts will become even more larger.
Comment 1 Christopher Aillon 2009-01-06 17:17:24 EST
This is intentional.  Firefox wants to ask the monitor for the dpi and scale images that way.  However, many monitors lie about their dpi, so if the dpi is 191 or less, we assume it is a standard low resolution monitor that is just lying and force a dpi of 96.  Before we did this, many users complained about fonts and images being displayed either way too large or way too small.  Above 192, we pay attention to the X server and do dpi scaling appropriately which is why it "reacts strange".
Comment 2 Tyson Whitehead 2010-01-14 12:04:53 EST
This only work if it is >= 192 is quite unexpected behavior, and it is not documented at all on the corresponding mozilla page


It would seem to me a better way of doing this would have been to make the default for layout.css.dpi 96.  That way those of who have our Xorg DPI set correctly (such as 184 setting on the system I'm working on) could set it back to 0 to get firefox to properly honor it.
Comment 3 Tyson Whitehead 2010-01-18 11:40:27 EST
It might also be worth pointing out that there is still a bug here.

While it maybe justified to ignore the value the operating system is returning, it is not similarly justified to ignore a value the user explicitly enters.

Further, from the aforementioned mozilla page


it really seems like -1 (the default) is intended to be used as the OS value with sensibility checks.

I suggest, therefore, making the "if dpi<192 then 96 else dpi" logic only active if layout.css.dpi is set to -1.  Because -1 is the default, this should not break any existing systems, while allowing people who need to override it to something less than 192 to be able to do so.

Should I open a new bug report for this, or can someone reopen this one?

Note You need to log in before you can comment on or make changes to this bug.