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

Issue 606092 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 426656
Owner: ----
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

window.devicePixelRatio incorrect for hi-DPI screens on Windows

Reported by dan...@d15.biz, Apr 23 2016

Issue description

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

Steps to reproduce the problem:
Some sites use window.devicePixelRatio to determine whether to serve 1x or 2x assets. A MacBook Pro Retina running Mac OS has this set to 2, but a high-DPI device running Windows (for example, Lenovo X1 Yoga) returns 1. System -> Display -> "Change the size of text, apps, and other items" is set to 200%, which should imply a pixel ratio of 2.

What is the expected behavior?
window.devicePixelRatio should be 2

What went wrong?
window.devicePixelRatio is 1

Did this work before? N/A 

Chrome version: 50.0.2661.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0

Edge correctly returns 2 on the same system.
 

Comment 1 by dan...@d15.biz, Apr 23 2016

After doing some more testing, it looks like it's only incorrect when I have an external display attached. If I'm only using the laptop screen, window.devicePixelRatio correctly returns 2. However, if I have an external screen attached, it always returns 1, even if the Chrome window is on the high-DPI screen.

Comment 2 by jianli@chromium.org, Apr 25 2016

Cc: joh...@chromium.org
Components: -Blink Blink>WindowDialog UI>HighDPI

Comment 3 by bsep@chromium.org, Oct 4 2016

Cc: robliao@chromium.org
Mergedinto: 426656
Status: Duplicate (was: Unconfirmed)
This looks like a symptom of not supporting multi-monitor DPI.

I just tested on Canary where support is currently turned on and window.devicePixelRatio returns 1.5 on my 150% monitor and 1.25 on my 125% monitor. Marking this as duplicate.

Sign in to add a comment