Closed Bug 424375 Opened 16 years ago Closed 16 years ago

high dpi - inconsistent widths and heights reported

Categories

(Core :: DOM: Core & HTML, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mrmazda, Assigned: roc)

References

()

Details

(Whiteboard: [reviewed patch in hand])

Attachments

(4 files)

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
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?
Attached file 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.
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
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 → --
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Attached patch fixSplinter Review
Fixes getting and setting of outerWidth/outerHeight.
Attachment #312722 - Flags: superreview?(jst)
Attachment #312722 - Flags: review?(jst)
Attached file 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]
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
Closed: 16 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?
Component: DOM: Core → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.