Shrink-to-fit width not recalculated when the width of the contents varies with window height
Reported by
oriol-bu...@hotmail.com,
Apr 6 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0 Steps to reproduce the problem: 1. Create a shrink-to-fit element with height 100% of the window. 2. Inside it, place a replaced element with an intrinsic aspect ratio and height 100%. 3. Resize the window vertically. What is the expected behavior? 1. The container is resized vertically due to the percentage in height. 2. The replaced element is resized vertically due to the percentage in height. 3. The replaced element is resized horizontally due to the intrinsic aspect ratio. 4. The container is resized horizontally due to shrink-to-fit. What went wrong? Step 4 does not happen. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 59.0.3055.0 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 25.0 r0 Works on Firefox.
,
Apr 10 2017
Able to reproduce the issue on the latest canary: 59.0.3067.0 and the latest stable(57.0.2987.133) on Windows-10, Mac OS 10.12.3 and Linux Ubuntu 14.04. Similar behavior is seen on older chrome versions:44.0.2358.0 and chrome versions before that(42.0.2291.0,40.0.2172.0,30.0.1549.0) doesn't show any resize with the attached test file. Marking this as Untriaged for more inputs on this.
,
Apr 18 2017
,
Apr 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/76e307f44292b2999535aa8c5605cfd9129e9c12 commit 76e307f44292b2999535aa8c5605cfd9129e9c12 Author: shoon.kim <shoon.kim@lge.com> Date: Tue Apr 25 09:37:39 2017 Add NeedsPreferredWidthsRecalculation() for block In the case the block has relative height and width is auto and it has an image which should keep the aspect ratio, it needs preferred width recalculation if the parent changes the height. To cover this, add NeedsPreferredWidthsRecalculation() for LayoutBlock. BUG= 707151 , 514663 , 709233 Review-Url: https://codereview.chromium.org/2828453002 Cr-Commit-Position: refs/heads/master@{#466934} [add] https://crrev.com/76e307f44292b2999535aa8c5605cfd9129e9c12/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html [modify] https://crrev.com/76e307f44292b2999535aa8c5605cfd9129e9c12/third_party/WebKit/Source/core/layout/LayoutBlock.cpp [modify] https://crrev.com/76e307f44292b2999535aa8c5605cfd9129e9c12/third_party/WebKit/Source/core/layout/LayoutBlock.h
,
Aug 13 2017
,
Mar 3 2018
I still see this problem in 66.0.3342.0 https://jsfiddle.net/b6g4q3jx/ |
||||
►
Sign in to add a comment |
||||
Comment 1 by ranjitkan@chromium.org
, Apr 7 2017