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

Issue 644059 link

Starred by 14 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression

Blocking:
issue 485650



Sign in to add a comment

Images not scaling to fit window when dsf zoom enabled

Reported by matt.t....@gmail.com, Sep 5 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 8350.68.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Platform: 8350.68.0 (Official Build) stable-channel samus

Example URL:
https://s.yimg.com/fz/api/res/1.2/0pO_nYO0bEkpYAQq9CAztA--/YXBwaWQ9c3JjaGRkO2g9NTE4MztxPTk1O3c9OTMyOA--/http://cyberminingcompany.com/sombrero%20galaxy.jpg

Steps to reproduce the problem:
Open any very large (high-resolution) image in Chrome.

What is the expected behavior?
Images should scale to fit the window so that you can see the entire image, with the option to click/tap the image to view it at full resolution.

What went wrong?
Images do not scale to fit the window. They do scale down to some degree, but you must still scroll horizontally and vertically to see the entire image.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Approx. one or two months ago

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 8350.68.0
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by tic...@gmail.com, Sep 5 2016

I am seeing this too - and is apparently a Samus-specific issue.

Version 53.0.2785.87 beta (64-bit)
Platform 8530.77.0 (Official Build) beta-channel samus
ARC Version 3233856
Firmware Google_Samus.6300.174.0

- Mike
#CBC-RS/TC-watchlist

Here's the relevant Chromebook Central Issue: https://goo.gl/zRB0L8

Comment 3 by tkent@chromium.org, Sep 5 2016

Cc: osh...@chromium.org
Labels: Needs-Bisect
Cc: dtapu...@chromium.org bsep@chromium.org
Components: -Blink Blink>Image
Labels: -Type-Bug -OS-Chrome OS-All Type-Bug-Regression
Owner: osh...@chromium.org
Status: Assigned (was: Unconfirmed)
This is a high dpi, zoom dsf issue.

On linux; if I run with the following settings it reproduces:
out/Release/chrome --force-device-scale-factor=2 --enable-use-zoom-for-dsf

If I remove the dsf zoom; it doesn't.

bsep@ I hear that you enabled this on Windows? So this might become a release blocker?

Reproduces on link as well; not just samus.
Labels: -Needs-Bisect
Blocking: 485650
Summary: Images not scaling to fit window when dsf zoom enabled (was: Images not scaling to fit window)

Comment 8 by bsep@chromium.org, Sep 7 2016

Yeah I can repro this on my desktop. We'll take a look. I don't think this is a release blocker.
Thank you  bsep@ for confirmation. I will move forward with the release.

Comment 10 by bsep@chromium.org, Sep 7 2016

Owner: bsep@chromium.org
I'm going to try to fix this today, let me know if you already started it.
Cc: malaykeshav@chromium.org
I was going to ask malaykeshav@ to look into this. Please let us know if you can't work on this for any reason..
Labels: -Pri-2 Pri-1
This is reasonably nasty

Comment 13 by bsep@chromium.org, Sep 18 2016

#12: I have a CL in the pipe here https://codereview.chromium.org/2319863006. I was going to merge to 54 when it lands.
Project Member

Comment 14 by bugdroid1@chromium.org, Sep 20 2016

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

commit f5ff44ae79899d114b4bbf5abdd6e960f856c0d9
Author: bsep <bsep@chromium.org>
Date: Tue Sep 20 22:04:55 2016

Change image document zooming logic.

The current zoom logic in image documents interacts badly with use-zoom-for-dsf,
in addition to having some weird behavior already.

This patch changes three things:
1. When loading a large image when page zoom was not 100% the image would start
   at a strange scaling factor until it was clicked. This is fixed.
2. When page zoom is at 100% a large image will always scale to fit the window
   regardless of the device scale factor. Previously with use-zoom-for-dsf on it
   would scale too large for the window.
3. When an image that fits in the window is zoomed in until it doesn't it is no
   longer clickable. Previously it would start acting like a large image, which
   was strange.

Also added a test suite for ImageDocument.

BUG= 324086 , 644059 

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

[modify] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/Source/core/html/ImageDocument.cpp
[modify] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/Source/core/html/ImageDocument.h
[add] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
[modify] https://crrev.com/f5ff44ae79899d114b4bbf5abdd6e960f856c0d9/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp

Comment 15 by bsep@chromium.org, Sep 20 2016

Labels: Merge-Request-54
Status: Fixed (was: Assigned)

Comment 17 by dimu@chromium.org, Sep 21 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Please confirm whether this change is baked/verified in Canary and safe to merge?If yes, merge your change to M54 (branch: 2840) ASAP so that we could take this for next Beta Release.

Comment 19 by bsep@chromium.org, Sep 21 2016

#18: I tested and the patch is working in Canary. I'm doing the merge now.
Project Member

Comment 20 by bugdroid1@chromium.org, Sep 21 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0

commit feb3b0ed99499d6232d2d0d2ce5129c95fa51db0
Author: Bret Sepulveda <bsep@chromium.org>
Date: Wed Sep 21 23:17:39 2016

Change image document zooming logic.

The current zoom logic in image documents interacts badly with use-zoom-for-dsf,
in addition to having some weird behavior already.

This patch changes three things:
1. When loading a large image when page zoom was not 100% the image would start
   at a strange scaling factor until it was clicked. This is fixed.
2. When page zoom is at 100% a large image will always scale to fit the window
   regardless of the device scale factor. Previously with use-zoom-for-dsf on it
   would scale too large for the window.
3. When an image that fits in the window is zoomed in until it doesn't it is no
   longer clickable. Previously it would start acting like a large image, which
   was strange.

Also added a test suite for ImageDocument.

BUG= 324086 , 644059 

Review-Url: https://codereview.chromium.org/2319863006
Cr-Commit-Position: refs/heads/master@{#419867}
(cherry picked from commit f5ff44ae79899d114b4bbf5abdd6e960f856c0d9)

Review URL: https://codereview.chromium.org/2358913004 .

Cr-Commit-Position: refs/branch-heads/2840@{#480}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocument.cpp
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocument.h
[add] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp

Comment 21 by ajha@chromium.org, Sep 28 2016

Cc: ajha@chromium.org
Labels: Needs-Feedback
Trying to verify the merge on the latest M-54(54.0.2840.41) on Windows, Mac and Linux but I am getting Error code:504 while accessing the URL in C#0.

Could anyone provide the test URL or any page where this can be tested and verified.

Thanks in advance!
The uri is working for me. 

Comment 23 by ajha@chromium.org, Sep 28 2016

Labels: -Needs-Feedback TE-Verified-54.0.2840.41 TE-Verified-M54
The uri works now.

Verified the merge on the latest M-54(54.0.2840.41) on Windows-10, Mac OS 10.11.6 and Linux Ubuntu 14.04 by launching chrome with --force-device-scale-factor=2 --enable-use-zoom-for-dsf and this is working as intended. Attached is the screenshot of the same.


644059.png
1.6 MB View Download
Status: Verified (was: Fixed)
Tagging as verified as per #23

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

 Issue 649732  has been merged into this issue.

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

 Issue 629464  has been merged into this issue.
 Issue 627125  has been merged into this issue.
 Issue 654236  has been merged into this issue.
Project Member

Comment 29 by bugdroid1@chromium.org, Oct 27 2016

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

commit feb3b0ed99499d6232d2d0d2ce5129c95fa51db0
Author: Bret Sepulveda <bsep@chromium.org>
Date: Wed Sep 21 23:17:39 2016

Change image document zooming logic.

The current zoom logic in image documents interacts badly with use-zoom-for-dsf,
in addition to having some weird behavior already.

This patch changes three things:
1. When loading a large image when page zoom was not 100% the image would start
   at a strange scaling factor until it was clicked. This is fixed.
2. When page zoom is at 100% a large image will always scale to fit the window
   regardless of the device scale factor. Previously with use-zoom-for-dsf on it
   would scale too large for the window.
3. When an image that fits in the window is zoomed in until it doesn't it is no
   longer clickable. Previously it would start acting like a large image, which
   was strange.

Also added a test suite for ImageDocument.

BUG= 324086 , 644059 

Review-Url: https://codereview.chromium.org/2319863006
Cr-Commit-Position: refs/heads/master@{#419867}
(cherry picked from commit f5ff44ae79899d114b4bbf5abdd6e960f856c0d9)

Review URL: https://codereview.chromium.org/2358913004 .

Cr-Commit-Position: refs/branch-heads/2840@{#480}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocument.cpp
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocument.h
[add] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/html/ImageDocumentTest.cpp
[modify] https://crrev.com/feb3b0ed99499d6232d2d0d2ce5129c95fa51db0/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp

Sign in to add a comment