high dpi - inconsistent widths and heights reported

RESOLVED FIXED

Status

()

Core
DOM: Core & HTML
P2
normal
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Felix Miata, Assigned: roc)

Tracking

Trunk
x86
Linux
Points:
---
Bug Flags:
blocking1.9 +
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [reviewed patch in hand], URL)

Attachments

(4 attachments)

(Reporter)

Description

10 years ago
When DPI is 144 or more, CSS px units are used to report:
screen.width
screen.height
screen.availWidth
screen.availHeight
while screen px units are used to report:
window.outerWidth
window.outerHeight
window.innerWidth
window.innerHeight

The same units should be used for all. I recommend screen px units for the foreseeable future at least.

cf. bug 375519
(Reporter)

Comment 1

10 years ago
Created attachment 310996 [details]
screenshot of subject URL demonstrating inconsistency

FF 2.0.0.12 vs. FF 3.0b4 on OpenSUSE 10.2 in KDE @ 1920x1440
Pretty much anything exposed to content should probably be reporting CSS px, since any sizing content does will be in CSS px...
Yeah, I think we should fix outer* and inner*
Hmm, the code seems to indicate innerWidth and innerHeight are returned in CSS pixels. Not sure what's up with that. outerWidth and outerHeight should be easy to fix.
Assignee: nobody → roc
Flags: blocking1.9?
(Reporter)

Comment 5

10 years ago
Created attachment 312006 [details]
testcase

Roc, you're right. Again I was derelict in a comment 0. I'm guessing that I was going on ancient memory of 1.5a, maybe before the bug 375519 checkin, when both inners & outers matched in device px. Currently only the outers are in device px.

On Linux at least, desktop taskbar size is not being subtracted from screen.avail*. e.g. screen.height = screen.availHeight.
(Reporter)

Updated

10 years ago
Attachment #312006 - Attachment mime type: text/plain → text/html
Blocking as not fixing this now would make it significantly harder to fix later if people start depending on this broken behavior.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
(Reporter)

Comment 7

10 years ago
In up to date Kubuntu Hardy's FF 3.0b4 2008031317, all are displaying only device px. It looks and works just like branch. It too is not subtracting taskbar size from avail.
Flags: blocking1.9+ → blocking1.9?
Priority: P2 → --

Updated

10 years ago
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Created attachment 312722 [details] [diff] [review]
fix

Fixes getting and setting of outerWidth/outerHeight.
Attachment #312722 - Flags: superreview?(jst)
Attachment #312722 - Flags: review?(jst)
Created attachment 312723 [details]
testcase

I'm not sure if this can be automated. We'd have to change layout.css.dpi on the fly which sounds scary.
Whiteboard: [needs review]

Updated

10 years ago
Attachment #312722 - Flags: superreview?(jst)
Attachment #312722 - Flags: superreview+
Attachment #312722 - Flags: review?(jst)
Attachment #312722 - Flags: review+
Whiteboard: [needs review] → [reviewed patch in hand]
checked in
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Perhaps worth adding some sort of single-test harness or something, then, but we should still get this automated.  Somehow.  Eventually.
Flags: in-testsuite?

Updated

9 years ago
Component: DOM: Core → DOM: Core & HTML
Duplicate of this bug: 372692
You need to log in before you can comment on or make changes to this bug.