Image elements do not affect the layout of their parent container when resized
Reported by
r...@robbrackett.com,
Jun 27 2016
|
||||||
Issue descriptionChrome 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
,
Jun 28 2016
Assigning to pdr@ pending answer for #1. Please kick this back to Untriaged if it turns out not to be a duplicate/related.
,
Jun 28 2016
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.
,
Jul 15 2016
,
Jul 17 2017
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
,
Jul 17 2017
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
,
Jul 17 2017
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 |
||||||
Comment 1 by durga.behera@chromium.org
, Jun 28 2016Labels: Needs-Feedback M-51 OS-Mac