New issue
Advanced search Search tips

Issue 602957 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 632894



Sign in to add a comment

Device Mode changes resolution

Reported by t...@tobireif.com, Apr 13 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Steps to reproduce the problem:
Load http://tobireif.com/ on a "normal" / non-high-res screen. The low-res images are loaded, including "card_maker_demo@1x.png" (the image under "Card Maker Demo" without black bars).
Open the dev tools device mode. Reload. The high-res images are loaded, including "card_maker_demo@2x.png" (the image under "Card Maker Demo" with black bars) .
Close the dev tools, shift-reload - the low-res images should get loaded, but instead Chrome loads the high-res images.

What is the expected behavior?
The low-res images should get loaded.

What went wrong?
Chrome loads the high-res images.

Did this work before? N/A 

Chrome version: 49.0.2623.112  Channel: stable
OS Version: OS X 10.11.4
Flash Version: 

Related: I need a way to toggle eg "Retina" in the dev tools device mode.
 

Comment 1 by alph@chromium.org, Apr 13 2016

Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: Needs-Feedback
I cannot repro the problem on 49.0.2623.112. Unless you emulate a HiDPI device in DevTools, card_maker_demo@1x.png is loaded. If you emulate, say, Nexus 5 - card_maker_demo@2x.png is loaded. Closing DevTools and reloading goes back 1x.


Re: a way to toggle Retina. You can do that:
- enable Device Mode;
- go to Responsive;
- click three dots menu at the right of device mode toolbar;
- choose desired device pixel ratio, which is 2 by default.

Comment 3 by t...@tobireif.com, Apr 18 2016

I tried it again, please try the below.

On a "normal" / non-high-res screen:

On about:blank open the dev tools, turn on device mode. In the top row, set the left field to "Responsive" (not eg "Nexus 5"). Close the dev tools.

Load http://tobireif.com/ . The low-res images are loaded, including "card_maker_demo@1x.png" (the image under "Card Maker Demo" without black bars).

This is the correct behaviour.

Open the dev tools (they should already be in device mode). Shift-reload. The high-res images are loaded, including "card_maker_demo@2x.png" (the image under "Card Maker Demo" with black bars) .

Close the dev tools, shift-reload - the low-res images should get loaded, but instead Chrome loads the high-res images, including "card_maker_demo@2x.png".

Shift-reload again, the Chrome still loads the wrong image files.

Open the page in a new tab - Chrome loads the correct image files.

I hope you can reproduce the issue I'm observing here.

Comment 4 by t...@tobireif.com, Apr 21 2016

(The image doesn't have black bars anymore, so it's better to exclusively check the file name of the loaded file, not the rendered image.)
Blocking: 632894
Labels: Hotlist-Polish
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0a49063d037d1c009dbedec2bdc381537e263dc

commit b0a49063d037d1c009dbedec2bdc381537e263dc
Author: allada <allada@chromium.org>
Date: Sat Dec 17 02:51:41 2016

[Devtools] Fixed devtools altering srcset image after close

This patch fixes a bug where devtools was causing blink to load images
from into memory cache when devtools had overriden the scaleFactor
it would parse srcset and possibly choose different image until cache
was evicted.

R=dgozman
BUG= 602957 

Review-Url: https://codereview.chromium.org/2570733002
Cr-Commit-Position: refs/heads/master@{#439301}

[modify] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
[add] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant-expected.txt
[add] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/LayoutTests/inspector-protocol/emulation/device-scale-not-persistant.html
[add] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/LayoutTests/inspector-protocol/resources/square.png
[add] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/LayoutTests/inspector-protocol/resources/square200.png
[modify] https://crrev.com/b0a49063d037d1c009dbedec2bdc381537e263dc/third_party/WebKit/Source/web/DevToolsEmulator.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment