Created attachment 777617 [details] 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.