Last Comment Bug 424375 - high dpi - inconsistent widths and heights reported
: high dpi - inconsistent widths and heights reported
Status: RESOLVED FIXED
[reviewed patch in hand]
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: x86 Linux
: P2 normal (vote)
: ---
Assigned To: Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
:
Mentors:
http://mrmazda.no-ip.com/auth/dpi-scr...
: 372692 (view as bug list)
Depends on:
Blocks: 378927
  Show dependency treegraph
 
Reported: 2008-03-21 09:42 PDT by Felix Miata
Modified: 2008-10-11 11:19 PDT (History)
4 users (show)
jst: blocking1.9+
jwalden+bmo: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
screenshot of subject URL demonstrating inconsistency (196.49 KB, image/png)
2008-03-21 09:52 PDT, Felix Miata
no flags Details
testcase (4.16 KB, text/html)
2008-03-27 03:31 PDT, Felix Miata
no flags Details
fix (7.84 KB, patch)
2008-03-31 06:37 PDT, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
jst: review+
jst: superreview+
Details | Diff | Review
testcase (470 bytes, text/html)
2008-03-31 06:59 PDT, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
no flags Details

Description Felix Miata 2008-03-21 09:42:10 PDT
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
Comment 1 Felix Miata 2008-03-21 09:52:55 PDT
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
Comment 2 Boris Zbarsky [:bz] 2008-03-26 05:06:18 PDT
Pretty much anything exposed to content should probably be reporting CSS px, since any sizing content does will be in CSS px...
Comment 3 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-03-26 22:29:15 PDT
Yeah, I think we should fix outer* and inner*
Comment 4 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-03-26 23:08:54 PDT
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.
Comment 5 Felix Miata 2008-03-27 03:31:36 PDT
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.
Comment 6 Johnny Stenback (:jst, jst@mozilla.com) 2008-03-27 16:23:12 PDT
Blocking as not fixing this now would make it significantly harder to fix later if people start depending on this broken behavior.
Comment 7 Felix Miata 2008-03-27 19:11:48 PDT
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.
Comment 8 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-03-31 06:37:50 PDT
Created attachment 312722 [details] [diff] [review]
fix

Fixes getting and setting of outerWidth/outerHeight.
Comment 9 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-03-31 06:59:20 PDT
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.
Comment 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2008-04-01 15:22:45 PDT
checked in
Comment 11 Jeff Walden [:Waldo] (remove +bmo to email) 2008-04-06 01:13:42 PDT
Perhaps worth adding some sort of single-test harness or something, then, but we should still get this automated.  Somehow.  Eventually.
Comment 12 Wayne Mery (:wsmwk, NI for questions) 2008-10-11 11:19:53 PDT
*** Bug 372692 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.