Closed Bug 435275 Opened 12 years ago Closed 8 years ago

window.outerWidth/Height not reporting actual accurate values when page is Zoomed. No way to track user stats as to actual size of window.


(Core :: Layout, defect)

1.9.0 Branch
Not set





(Reporter: rfink, Unassigned)


(Whiteboard: [testday-20120713])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0

In tracking user stats, for Moz/FireFox we have always used window.outerWidth and window.outerHeight to track window sizes.
However, with the new Zoom feature, FF is reporting those values at a "Zoomed" size - not the actual pixel screen size of the window. (screenY, screenX, and window.screen.width/height still report the actual pixel screen pixels. Why not outerWidth/Height?) 
Unless this is fixed, there is no way to distinguish between a window that is sized to, say, 80% of the screen height or width versus a window that's content is being Zoomed to 125% !!!
Seems like a needless "breaking" of an old and reliable pair of properties.
Please, please, please, rectify this.

Reproducible: Always

Steps to Reproduce:
1.Open the browser window to full screen width and height
2.Zoom the page to 120% (Ctrl+1, twice)
3. Take measurements using script properties usually used to measure window size, like: window.innerWidth, document.documentElement.offsetWidth, etc...
4. Reset the window to no Zoom (Ctrl+0, once)
5. Size the window to appr 83% of the screen width
6. Compare the values of window.innerWidth, document.documentElement.offsetWidth, etc to the values recorded earlier
Actual Results:  
The size measurements taken of the document's contents at a window size of appr 85% of the width or height of the screen match the size measurements taken of the document's contents at a Zoomed level of 120%.
How can you distinguish between a window sized smaller than the full width of the screen as opposed to a window that has been zoomed?

Expected Results:  
Was expecting the window.outerWidth/Height properties to return the actual outerWidth/Height of the window as does the window.screenY/screenX, and window.screen.width/height do, regardless of whether the inner contents of the window have been Zoomed.

The software should return the actual values based on screen resolution for window.outerWidth/Height, instead of "Zoomed", skewed values. Just as the window.screenX/Y and window.screen.width/height, do.
This seems like needless, "breaking" of the window.outerWidth/Height properties.
Component: General → Layout
Keywords: qawanted
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.9.0 Branch
Additionally this leads to a misinterpretation of media queries which contain (min, max) width or height values.

Opera 10 beta2 Win shows the same misbehaviour contrary to Safari 4.0.2 Win!
Is this problem still actual? Can you provide testcase?
Whiteboard: [testday-20120713], [closeme 2012-08-01]
Please reopen this bug if it's reproducible in the latest Nightly.
Closed: 8 years ago
Keywords: qawanted
Resolution: --- → INCOMPLETE
Whiteboard: [testday-20120713], [closeme 2012-08-01] → [testday-20120713]
Update: This bug is still currently active in Firefox version 61.0.1 (64-bit).

Follow the original steps to produce.
You need to log in before you can comment on or make changes to this bug.