Bug 478312

Summary: firefox strangely reacts on change of the 'layout.css.dpi' parameter
Product: [Fedora] Fedora Reporter: Tagir Bakirov <batk>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: caillon, gecko-bugs-nobody, twhitehead, walters
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-06 22:17:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Archive of screenshots of firefox window with layout.css.dpi set to {-1, 100, 191, 192, 230, 287, 288}. none

Description Tagir Bakirov 2008-12-27 20:40:26 UTC
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:1.9.0.5) 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 22:17:24 UTC
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 17:04:53 UTC
This only work if it is >= 192 is quite unexpected behavior, and it is not documented at all on the corresponding mozilla page

http://kb.mozillazine.org/Layout.css.dpi

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 16:40:27 UTC
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

http://kb.mozillazine.org/Layout.css.dpi

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?