0
Not a bug

Doesn't seem to work correctly anymore with Chrome 39.0.2171.95. It seems to double the selected size.

Jim Klo 9 שנים ago עודכן על ידי Ionuț Botizan 9 שנים ago 3
Selecting a pre-defined size does resize the window, however it now seems to resize to 2x the selected size; however not sure since more sizes get larger than my display.

תשובה

תשובה
Not a bug
Hi guys,

Sorry for the late reply but I was away for Christmas.

Anyway, it is definitely "retina" related, but the previous behavior was broken.
The thing is, on retina displays 4 screen pixels make 1 CSS pixel (meaning a Device Pixel Ratio of 2) so, if you want to view the page at 320 x 480 (CSS) pixels, you have to double the width and height of the viewport and resize it to 640 x 960. To test this yourself, you can open the Developer Tools console and check the values of window.innerWidth, window.innerHeight and window.devicePixelRatio.

This also happens on zoomed pages. A 800 x 600 tab zoomed at 200% on a non retina display with a default DPR of 1, will report half the dimensions (400 x 300) and a DPR of 2. The same tab (800 x 600) on a retina display will report a quarter of the size (200 x 150), but a DPR of 4.

All of the above are Chrome facts. This is how things work and it's not something my extension does.
If you don't like this (or don't agree that this is how it should work), there are two options for you:

1) There's a new setting in Window Resizer that allows you to ignore the Device Pixel Ratio completely and always behave as if it had a value of 1. This is how it previously worked, but remember that 320 screen pixels will only display 160 CSS pixels. This is useful if you don't care about the actual CSS pixels or the zoom level of a page and you just want the viewport to have the size you asked for. To completely ignore the DPR just click on the extension's icon then on "Settings"; on the "Settings" page, make sure the checkbox under "Ignore device pixel ratio" is checked. Here's a short screencast of what that does: http://screencast.com/t/WCljMoCly1

2) If CSS pixels are important to you, but it bothers you that the window becomes too large and it may not fit your screen, then you should ignore the above advice and, instead, zoom out the tab you're testing to 50% first and only after that use the extension to resize the page.
Unfortunately, it is not (yet) possible for me to automatically zoom out the page from the extension so you have to do it manually. There is an API for extension developers to be able to programmatically set the zoom level of a tab, but it's not on the stable Chrome channel yet so it is not allowed in extensions published to the Chrome Webstore. As soon as that is available, I will add a "per preset" setting so you can specify the desired DPR for each resolution you want to test.


Regards,

Ionuț
I should mention that is Chrome 39.0.2171.95 (64-bit) on OS X Mountain Lion.
Same here. Maybe something to do with retina displays/resolution? Using Chrome version 39.0.2171.95 (64-bit) on Yosemite.
תשובה
Not a bug
Hi guys,

Sorry for the late reply but I was away for Christmas.

Anyway, it is definitely "retina" related, but the previous behavior was broken.
The thing is, on retina displays 4 screen pixels make 1 CSS pixel (meaning a Device Pixel Ratio of 2) so, if you want to view the page at 320 x 480 (CSS) pixels, you have to double the width and height of the viewport and resize it to 640 x 960. To test this yourself, you can open the Developer Tools console and check the values of window.innerWidth, window.innerHeight and window.devicePixelRatio.

This also happens on zoomed pages. A 800 x 600 tab zoomed at 200% on a non retina display with a default DPR of 1, will report half the dimensions (400 x 300) and a DPR of 2. The same tab (800 x 600) on a retina display will report a quarter of the size (200 x 150), but a DPR of 4.

All of the above are Chrome facts. This is how things work and it's not something my extension does.
If you don't like this (or don't agree that this is how it should work), there are two options for you:

1) There's a new setting in Window Resizer that allows you to ignore the Device Pixel Ratio completely and always behave as if it had a value of 1. This is how it previously worked, but remember that 320 screen pixels will only display 160 CSS pixels. This is useful if you don't care about the actual CSS pixels or the zoom level of a page and you just want the viewport to have the size you asked for. To completely ignore the DPR just click on the extension's icon then on "Settings"; on the "Settings" page, make sure the checkbox under "Ignore device pixel ratio" is checked. Here's a short screencast of what that does: http://screencast.com/t/WCljMoCly1

2) If CSS pixels are important to you, but it bothers you that the window becomes too large and it may not fit your screen, then you should ignore the above advice and, instead, zoom out the tab you're testing to 50% first and only after that use the extension to resize the page.
Unfortunately, it is not (yet) possible for me to automatically zoom out the page from the extension so you have to do it manually. There is an API for extension developers to be able to programmatically set the zoom level of a tab, but it's not on the stable Chrome channel yet so it is not allowed in extensions published to the Chrome Webstore. As soon as that is available, I will add a "per preset" setting so you can specify the desired DPR for each resolution you want to test.


Regards,

Ionuț