CSS intrinsic width incorrect when child has min and max width
Reported by
oliverj...@gmail.com,
Aug 10 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.25 Safari/537.36 Steps to reproduce the problem: Go to http://jsbin.com/latonap/6/edit?html,css,output What is the expected behavior? The parent should encapsulate all of its content due to the intrinsic width value `width: max-content`. What went wrong? The parent does not encapsulate all of its content. The computed width of the parent appears to use the `max-width` of the child, but it should be using the `min-width` as this overrides the `max-width`. Did this work before? N/A Does this work in other browsers? No This works as expected in Firefox, but the unexpected behaviour seen in Chrome is also seen in Safari. Chrome version: 61.0.3163.25 Channel: n/a OS Version: OS X 10.12.6 Flash Version:
,
Aug 10 2017
,
Aug 10 2017
,
Aug 11 2017
,
Aug 11 2017
Able to reproduce the issueon windows 7 , ubuntu 14.04 and Mac OS 10.12.6 using chrome M60 #60.0.3112.90 and M62 #62.0.3182.0. This is a regression issue broken in M46 . Using the per-revision bisect providing the bisect results, Good build: 56.0.2487.0 (Revision:344105). Bad build:56.0.2490.0 (Revision:344925). You are probably looking for a change made after 344313 (known good), but no later than 344342 (first known bad). CHANGELOG URL: The script might not always return single CL as suspectas some perf builds might get missing due to failure. https://chromium.googlesource.com/chromium/src/+log/92e3a0f75d28517ff9e8bc47b11666e436762ee5..02b77a227ed7c158143b67e6b530fc0cdaa8ab2e @unable to find the suspect from the above CL , could someone help us in assigning it to the concerned owner. Thanks!
,
Aug 11 2017
Actually I think this behaviour sort of makes sense when using `min-width: max-content`, but I'm also seeing the behaviour with `min-width: min-content`. Can somebody clarify what the correct behaviour should be?
,
Aug 16 2017
,
Aug 16 2017
,
Aug 21 2017
I think this seems like a layout, eae, could you PTAL?
,
Aug 24 2017
Here is an example of the bug when using `min-width: min-content`: http://jsbin.com/latonap/8/edit?html,css,output
,
Aug 24 2017
Here is the same example but with vendor prefixes for testing Firefox and Safari. http://jsbin.com/latonap/10/edit?html,css,output The same behaviour is seen in Safari. Firefox has the correct/expected behaviour.
,
Aug 24 2017
An alternative to `min-width: min-content` is to use `display: inline-block`. The bug also appears when using `display: inline-block`. Again, Firefox has the expected behaviour. http://jsbin.com/latonap/16/edit?css,output
,
Aug 30 2017
,
Aug 31 2017
Test case.
,
Aug 31 2017
Wow, that's a very old bug (2003) [1]! Min-width should take priority over max-width, not the other way around [2]. Impressive that it hasn't been reported until now. [1] crrev.com/5548ac5e4f021ee403d4d845579786002b3cf24c [2] https://www.w3.org/TR/CSS22/visudet.html#min-max-widths
,
Aug 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/713ad27a9b7b68ebe510b0e9397b0c7a7617d565 commit 713ad27a9b7b68ebe510b0e9397b0c7a7617d565 Author: Morten Stenshorne <mstensho@opera.com> Date: Thu Aug 31 21:55:04 2017 Min-width takes precedence over max-width. This also applies to intrinsic sizing, obviously. Clamp to max-width, THEN min-width - not the other way around. Bug: 754263 Change-Id: Ide083d3ba591b252cd1bfa28500be3c3c2324d79 Reviewed-on: https://chromium-review.googlesource.com/645306 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#499024} [add] https://crrev.com/713ad27a9b7b68ebe510b0e9397b0c7a7617d565/third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/block-min-width-and-max-width.html [modify] https://crrev.com/713ad27a9b7b68ebe510b0e9397b0c7a7617d565/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
,
Sep 1 2017
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by pbomm...@chromium.org
, Aug 10 2017Labels: Needs-Bisect M-62 OS-Linux OS-Windows