Image.width is not density corrected by Content-DPR header
Reported by
martin.a...@gmail.com,
Aug 8 2016
|
||||||
Issue descriptionChrome Version: 54.0.2824.0 (Development-Build) (64-Bit) URL : https://jsfiddle.net/td3mnurb/1/ What steps will reproduce the problem? (1) Open https://jsfiddle.net/td3mnurb/1/ or the attached HTML page on a retina screen (2x DPR). What is the expected result? If an image is not rendered, the IDL attribute *width* should return the density-corrected intrinsic width: http://w3c.github.io/html/semantics-embedded-content.html#dom-htmlimageelement-width In the mentioned example the console should log `400` two times on retina screens What happens instead? The console logs `800` and then `400` Please provide any additional information below. Attach a screenshot if possible. Example HTML page (https://jsfiddle.net/td3mnurb/1/): ``` <meta http-equiv="Accept-CH" content="DPR"> <script> var img = new Image(); img.src = 'https://demo-res.cloudinary.com/image/upload/w_400,dpr_auto/bike.jpg'; img.onload = function() { console.log(img.width); // Logs 400 on a 1x screen and 800 on a 2x screen console.log(img.naturalWidth); // Always logs 400 } </script> ```
,
Aug 10 2016
Able to reproduce on Windows 10(HD-Touch) and Mac OS 10.11.6(Retina) using chrome latest Dev M54-54.0.2824.0. Bisect Information: ===================== Good build: 46.0.2480.0 Bad Build : 46.0.2482.0 Change Log URL: https://chromium.googlesource.com/chromium/src/+log/8fd640057d425eb29c3da205ec2e10a81ad99c6f..49bac10701d666cd09a9a636ed599ece997fe330 Blink Log URl: https://chromium.googlesource.com/chromium/src/+log/8fd640057d425eb29c3da205ec2e10a81ad99c6f..49bac10701d666cd09a9a636ed599ece997fe330 From the above blink log suspecting below change Review URL: https://codereview.chromium.org/1287773002 pdr@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Thanks!
,
Aug 10 2016
Hi Yoav, I believe this is https://chromium.googlesource.com/chromium/blink/+/40f6e6c4847f782b2a74ae725549576261682cc8 I haven't investigated this bug further than looking at the bisect.
,
Aug 30 2016
This seems to be an issue related only to the Client-Hints feature, rather than a regression. I'll take a look.
,
Mar 29 2017
,
Jul 9
Looking at the test case now, it seems like this was already resolved (I gets "400" logged twice). WONTFIXing as I'm unable to reproduce. martin.auswoeger@ - if you still see this issue, please comment with ways to reproduce |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by ligim...@chromium.org
, Aug 9 2016