Issue metadata
Sign in to add a comment
|
Incorrect devicePixelRatio when opening pages in a new tab on high DPI screens
Reported by
g...@gesteves.com,
Jun 13 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36 Example URL: http://www.gesteves.com/dpr-test.html Steps to reproduce the problem: 1. Open this page on a Mac with a retina screen (DPR 2): http://www.gesteves.com/dpr-test.html 2. Note that the page correctly reports the devicePixelRatio as 2 3. Right-click the link on that page (which points to the same page), and open it in a new tab in the background 4. Switch to that new tab What is the expected behavior? After switching to the new tab, the page should continue to report a DPR of 2. This is the behavior that both Safari and Firefox exhibit. What went wrong? After switching to the new tab, the page reports an incorrect DPR of 1. Does it occur on multiple sites: Yes Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? Yes Chrome version: 51.0.2704.84 Channel: stable OS Version: OS X 10.11.5 Flash Version: Shockwave Flash 21.0 r0 This also affects images, although it's harder to reproduce (only seems to happen if the image is not in the cache). If the image is served responsively using srcset (with either sizes or 1x/2x variants), when opening the page in a new tab in the background, Chrome will load the image that corresponds to a DPR of 1, so when you switch to that tab on a high DPI screen all the images are blurry. I've only been able to test this on OS X, so I don't know if this is present in other operating systems.
,
Jun 14 2016
After a coworker pointed out that he couldn't repro either, I did some more digging around to try to nail down why it happens, and then realized it only happens when I have a non-retina external display plugged into my Mac. Without the external display plugged in, opening the link in a new tab reports the correct DPR, 2. When I plug in the external display, opening the link in a new tab (in the retina display) returns the incorrect DPR 1.
,
Jun 15 2016
,
Jul 1 2016
Yeah, this is a known issue -- when we create the tab, we don't know which screen it will appear on, and we guess "Main Monitor", sometimes incorrectly. This should be fix-able, let me see if we can do some plumbing to get it there.
,
Jul 1 2016
,
Aug 1 2016
ccameron@Could you please provide an update on this issue?
,
Sep 1 2016
ccameron@- Gentle Ping. Please provide an update on this issue. If this issue has been fixed then, feel free to close this issue.
,
Sep 2 2016
Issue still exists, still haven't thought of how to fix it.
,
May 3 2017
Merging with older instance -- we should find a way to be more right about this more often. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by gamemail...@gmail.com
, Jun 14 2016