New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843410 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

window.outerWidth/Height are 16px less than should be when in fullscreen mode (using F11-key)

Reported by vanheems...@gmail.com, May 16 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. Maximize your browser window
2. Type `window.outerWidth` in the console
3. Press F11 (go to Fullscreen mode)
4. Repeat step 2

What is the expected behavior?
Step 2 and 4 should give you the maximum width of your screen (and the same value both times).

What went wrong?
The returned window.outerWidth (and window.outerHeight as well) values are 16 pixels less than what it should be when in fullscreen mode.

Did this work before? N/A 

Chrome version: 66.0.3359.139  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 29.0 r0

For live feedback on the dimensions, visit http://ryanve.com/lab/dimensions/  and switch to/from fullscreen mode to see the outerWidth/Height values change.
 

Comment 1 by woxxom@gmail.com, May 16 2018

Bisected to fab6a4eec6cb6b40e9931465bbc90d545a6d40ed = https://crrev.com/1859283003 by jbauman@chromium.org
"Avoid restoring maximized window down when going fullscreen."
Landed in 52.0.2707.0

Repro: use the attached test.html and run chrome test.html --start-maximized --start-fullscreen
Expected: numbers are equal
Observed: numbers are different
test.html
563 bytes View Download
Labels: Needs-Triage-M66

Comment 3 by kojii@chromium.org, May 16 2018

Cc: jbau...@chromium.org
Components: -Blink Blink>Fullscreen
Labels: M-68 Triaged-ET FoundIn-68 Target-68
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Win-10 using chrome reported version #66.0.3359.139 and latest canary #68.0.3431.0.
This is a non-regression issue as it is observed from M60 old builds. Issue is not reproducible in OS-mac and OS-linux i.e window.outerWidth/Height is more than 16px than should be when in fullscreen mode (using F11-key).

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!

Comment 5 by e...@chromium.org, May 16 2018

Owner: szager@chromium.org
Status: Assigned (was: Untriaged)
Confirmed, seems limited to windows. I'm guessing we incorrectly subtract the scrollbar width in fullscreen (but not in regular mode).
This is quite odd.

szager, any idea why this might be?

Comment 6 by szager@chromium.org, May 16 2018

If it was 15px, I would guess scrollbar; but because it's 16px, I wonder if it has something to do with body padding?
It's happens with the height as well (same 16px).

Comment 8 Deleted

Comment 9 by woxxom@gmail.com, May 16 2018

The observed 16px difference is produced by the default 8px border of the window.
My desktop theme has a smaller 4px border, which explains why I see 8px difference.

Comment 10 Deleted

In my situation (Win10) I have:
- no borders (only tabs and address bar at the top in maximized mode and nothing in fullscreen mode of course)
- no scrollbars visible (empty page with CSS: *{margin:0;padding:0;} )
- screen resolution = 1920x1080 (standard laptop screen)
- screen.width & .height are 1920 and 1080

Normal mode with maximized window:
- window.outerWidth == 1920
- window.outerHeight == 1040

After entering fullscreen mode with [F11]:
- window.outerWidth == 1904
- window.outerHeight == 1064

Comment 12 by woxxom@gmail.com, May 16 2018

The bug doesn't need the window borders to be actually visible.
Chrome (or OS) just blindly subtracts their width which is 2*GetSystemMetrics(SM_CXPADDEDBORDER)

In Windows 10 it can be changed via PaddedBorderWidth in the registry AFAIK.
In Windows 7 it's relatively easy to change as "Active window border" in the legacy desktop control panel.
When I change it, the outerWidth gap changes accordingly and matches the above formula.

Sign in to add a comment