min-content drops box decorations on leading whitespace inside an open inline

#41462717 Filed 2019-06-04 Fix posted WPT: css/css-sizing/{slice,clone}-intrinsic-size.html

Test cases

Each card shows two views of the same div with width: min-content:

slice-intrinsic-size: <span>aaa</span><span> aaa</span>

Expected min-content width = 78px (span2's left edge stays on line 1). Pre-fix Blink rendered the div at 64px (span2's left edge incorrectly pushed to line 2).

aaa aaa
content_shell render of slice testcase with the fix (width 78)

Reference: <span>aaa</span><span><br>aaa</span>

Forces the break inside span2 with an explicit <br>. Always renders at width 78. The "Expected" testcase above must match this.

aaa
aaa
content_shell render of slice reference (width 78)

clone-intrinsic-size: same markup, box-decoration-break: clone

With clone, span2's full box decoration is duplicated on each line, so the pre-fix width lost 36px (margin+border+padding both sides). Expected = 100px, pre-fix = 64px.

aaa aaa
content_shell render of clone testcase with the fix (width 100)

Links

Issue #41462717

slice-intrinsic-size.html on wpt.live

clone-intrinsic-size.html on wpt.live

box-decoration-break in css-break-3

Back to index