Open
Bug 1657380
Opened 4 years ago
Updated 1 year ago
CSS screen.height seems wrong
Categories
(Core :: Layout, defect, P2)
Tracking
()
NEW
People
(Reporter: snorp, Unassigned)
References
Details
According to the discussion here[1], we seem to be subtracting 16 pixels from the value returned from screen.height
compared to other browsers.
Updated•4 years ago
|
Severity: -- → S4
Priority: -- → P2
Updated•4 years ago
|
Whiteboard: [geckoview:m88]
Updated•4 years ago
|
Whiteboard: [geckoview:m88] → [geckoview:m89]
Updated•4 years ago
|
Whiteboard: [geckoview:m89] → [geckoview:m91]
Updated•3 years ago
|
Whiteboard: [geckoview:m91]
Comment 1•3 years ago
•
|
||
This seems to be rounding issue of int vs float/double.
nsDeviceContext::SetDPI
calculates mAppUnitsPerDevPixelAtUnitFullZoom
, it is int value, it causes rounding issue on some device.
When using Pixel 2, dpi density is 2.625. AppUnitsPerCSSPixel
is 60, so 60 % 2.625 != 0
.
When device pixel is 1920x1080 and dpi is 2.625,
Gecko: 1920 * mAppUnitsPerDevPixelAtUnitFullZoom (23) / 60 = 736px
Blink: 1920 / 2.625 = 731.428571429.. = 732px
Comment 2•3 years ago
|
||
What's owner of AppUnits rouding issue? gfx?, layout?
Also, I guess that window.devicePixelRatio
doesn't equals to Blink's on Pixel 4a etc due to same rounding issue of nsPresContext
.
Component: General → Layout
Product: GeckoView → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•