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

Issue 677942 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Compat



Sign in to add a comment

<img> with width:auto and height:auto is not resized correctly if container size is changed dynamically

Reported by jakalten...@gmail.com, Jan 3 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Example URL:
https://jsfiddle.net/kaljak/fuzxqkmz/4/

Steps to reproduce the problem:
1. Open the attached jsfiddle
2. Resize the preview window until its width is smaller than 669px
3. The used library (css-element-queries) adds a property to the container (max-width="669px"). This CSS is used now:
DIV[max-width~="669px"] {
  height: 10.7em;
}

4. The height is smaller but the image is not resized correctly

What is the expected behavior?
The image should not be distorted

What went wrong?
The image is not resized correctly - it's distorted.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
chrome_start.PNG
230 KB View Download
chrome_nok.PNG
121 KB View Download
firefox_ok.PNG
68.1 KB View Download
Components: Blink>Layout

Comment 2 by e...@chromium.org, Jan 3 2017

Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)

Comment 3 by e...@chromium.org, Jan 3 2017

Cc: glebl@chromium.org kojii@chromium.org
Labels: Hotlist-GoodFirstBug OS-Android OS-Chrome OS-Linux OS-Mac
For what it's worth a slightly simpler reproduction might be found here assuming I understand the problem correctly (https://jsfiddle.net/domfarolino/2bd81q1m/). When clicking the button in the fiddle, the picture undergoes distortion in Chrome where it does not in Firefox.

Comment 5 by glebl@chromium.org, Feb 9 2017

Owner: glebl@chromium.org

Comment 7 by glebl@chromium.org, Feb 13 2017

Status: Fixed (was: Available)

Sign in to add a comment