New issue
Advanced search Search tips

Issue 634778 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

windows.outerWidth wrong when simulating a laptop with hidpi screen using Developer Tools

Reported by helmut.e...@gmail.com, Aug 5 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36

Steps to reproduce the problem:
1. open chrome and developer tools
2. simulate a "laptop with HiDPI Screen"
3. open any web page, e.g. http://www.taccgl.org/tutorial/
4. type window.outerWidth on the console

What is the expected behavior?
should print 1440

What went wrong?
prints 1280

Did this work before? No 

Chrome version: Version 54.0.2820.0 canary (64-bit)  Channel: canary
OS Version: 8.1
Flash Version: Shockwave Flash 22.0 r0

Also after defining a custom laptop in developer tools, dpi=2 and width 1024 window.outerWidth returns 1280.
 
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
Thank you for filing this issue!

The behavior described is intended. When we emulate desktop device (such as a laptop with HiDPI screen) which does not necessary force browser window being full-screen, we keep the current values for window.outer{Width,Height} and window.screen.{width,height}. It would be strange to force some specific value here.

Also, pages should not rely on outerWidth since it may change independently from page size (e.g. toggling toolbars in many desktop browsers).
Thank you very much for the info which clarifies what is going on.

The problem in my case is that my real monitor is smaller than the emulated one and so the emulated window.innerWidth becomes bigger than the window.outerWidth in a situation where browser and pinch zoom level were set to 1. This can never happen on a real device.

Sign in to add a comment