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

Issue 623695 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Image elements do not affect the layout of their parent container when resized

Reported by r...@robbrackett.com, Jun 27 2016

Issue description

Chrome Version       : 51.0.2704.103 (Official Build) (64-bit)
Revision	aa7c8d23c098e96a388ffedf6698230bda650bb3-refs/branch-heads/2704@{#723}
OS	Mac OS X 
Blink	537.36 (@aa7c8d23c098e96a388ffedf6698230bda650bb3)
JavaScript	V8 5.1.281.65
Flash	22.0.0.192
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

URLs (if applicable) : n/a
Other browsers tested:
     Safari: OK (v9, Tech Preview 7)
    Firefox: OK (v47)
         IE: (untested)

When images (I'm guessing other types of replaced content, too, but have not tested) are resized as a result of one dimension changing because of changes in the element containing the replaced content element, the containing element does not resize.

I've attached a test case to demonstrate the issue more clearly. A DIV contains several FIGURE elements, each containing an IMG. The FIGURE and IMG elements have 100% height so that they are as tall as the containing DIV, causing the FIGURE element to be as wide as the IMG it contains, whose width is dependent on its height.

Clicking the button changes the height of the containing DIV, which should cause the IMG elements (and therefore the FIGURE elements containing them) to change width because of the height change. Instead, the FIGURE elements keep their previous width, even though the IMG elements do not. Forcing the FIGURE elements to repaint by setting them to `display: none` and back fixes the issue.

I suspect this might be related to https://bugs.chromium.org/p/chromium/issues/detail?id=619108 or some other part of https://bugs.chromium.org/p/chromium/issues/detail?id=619103, but am not really sure
 
relayout-replaced-content container.html
1.5 KB View Download
Cc: pdr@chromium.org wangxianzhu@chromium.org
Labels: Needs-Feedback M-51 OS-Mac
pdr@/wangxianzhu@ : Could you please confirm if its same as  issue 619108  or issue 619103 so as to proceed for further investigation.
Owner: pdr@chromium.org
Status: Assigned (was: Unconfirmed)
Assigning to pdr@ pending answer for #1. Please kick this back to Untriaged if it turns out not to be a duplicate/related.

Comment 3 by pdr@chromium.org, Jun 28 2016

Components: Blink>Layout
Labels: -Needs-Feedback -OS-Mac OS-All
Owner: ----
Status: Available (was: Assigned)
Thanks for filing with a nice reduced testcase. I think this is unrelated to those two bugs. This appears to be a generic layout bug.

Comment 4 by e...@chromium.org, Jul 15 2016

Cc: robho...@gmail.com glebl@chromium.org
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 17 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by pdr@chromium.org, Jul 17 2017

Owner: msten...@opera.com
Status: Fixed (was: Untriaged)
This appears to have been fixed.

I did a bisect to find the patch that fixed it:
https://chromium.googlesource.com/chromium/src/+log/10386e8372ef3cd50e14bec6264a0677015dd998..a991dac91a999d658b2d76d89c74038fced3fa8b

I think this was likely "Better handling of min/max widths that depend on the containing block.": https://chromium.googlesource.com/chromium/src/+/4aad5b967dc3c9405565f8a7274d2ff9c37e6405
Oh, this is great! I had only looked at the latest Chrome release, but I see in Canary that it does seem fixed and is working for me now. Thanks.

Sign in to add a comment