Skip to content

Commit

Permalink
Use |LayoutBox::ContentLogicalHeight| value for atomic inline FlexBox.
Browse files Browse the repository at this point in the history
Before this CL, |LayoutBox::ComputeIntrinsicLogicalContentHeightUsing|
returns zero intrinsic size defined in |LayoutBox::IntrinsicSize|,
when atomic inline level flexbox's height is specified with
'height: min-content'.

Per spec, https://drafts.csswg.org/css-sizing/#valdef-width-min-content,

"min-content
If specified for the inline axis, use the min-content inline size;
otherwise compute to auto.",

'height' property specified with min-content should compute to 'auto',
i.e. the content's intrinsic size.

Bug: 959551
Change-Id: I798a07670036072bfd47bddb6bb0f88347eaa929
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746507
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Joonghun Park <pjh0718@gmail.com>
Cr-Commit-Position: refs/heads/master@{#687203}
  • Loading branch information
joonghunpark authored and chromium-wpt-export-bot committed Aug 15, 2019
1 parent 85837ef commit bda5bfb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions css/css-flexbox/inline-flex-min-content-height.html
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Layout Test: Atomic inline Flexible Box with height: min-content</title>
<link rel="help" href="https://drafts.csswg.org/css-sizing/#valdef-width-min-content">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name=assert content="This test checks that height: min-content computes to 'auto' for atomic inline level flexible box.">
<style>
#flexbox {
background-color: green;
display: inline-flex;
height: min-content;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="flexbox">
<div id="item">
<div style="width:100px; height:100px;"></div>
</div>
</div>

0 comments on commit bda5bfb

Please sign in to comment.