Open Bug 895277 Opened 11 years ago Updated 2 years ago

@media (min-resolution: 1.4dppx) doesn't apply when layout.css.devPixelsPerPx is set to 1.4

Categories

(Core :: Layout, defect)

x86_64
Windows 8
defect

Tracking

()

People

(Reporter: jwilde, Unassigned)

Details

Attachments

(1 file)

Attached file failing testcase
Steps to reproduce:
- Open attached testcase (tested on Windows 8 only)
- Set layout.css.devPixelsPerPx to 1.4

Expected result:
Testcase turns green and says ">= 1.4 dppx", indicating that the @media query applied correctly.

Actual result:
Testcase stays blue and says "< 1.4 dppx". It doesn't start to turn green until layout.css.devPixelsPerPx is about 1.412.
I think the reality is that the devPixelsPerPx pref is rounded such that its reciprocal is the nearest number that is a multiple of 1/60.  (See nsDeviceContext::UpdateScaledAppUnits, which computes nsDeviceContext::mAppUnitsPerDevPixel.)
Windows 8 scales apps on high-dpi displays to 1.4dppx or 1.8dppx.  This rounding means that it is tricky for us to scale chrome or content in Firefox to match that resolution exactly.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: