fune/testing/web-platform/tests/css/css-overflow/line-clamp-with-floats-002.tentative.html
Andreu Botella 6e79872848 Bug 1889855 [wpt PR 45568] - [line-clamp] Hide floats after the clamp point, a=testonly
Automatic update from web-platform-tests
[line-clamp] Hide floats after the clamp point

This patch makes floats that appear in the layout tree after the clamp
point (that is, in tree order after the end of the last shown line)
hidden for paint. This depends entirely on the layout tree order,
regardless of whether the float extends beyond the last line.

This is achieved by storing a flag in `UnpositionedFloat` to mark the
float as hidden for paint, which is then checked when creating the
constraint space for the float.

Bug: 40336192
Change-Id: I8216289461e9390ecb99454c2e81f889e5ca8489
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425036
Commit-Queue: Andreu Botella <abotella@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284793}

--

wpt-commits: 94be77b5672ba30c3cf4dd1ead285ca57749bd15
wpt-pr: 45568
2024-04-15 08:50:48 +00:00

33 lines
838 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: float at the start of a line-clamp</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
<link rel="match" href="reference/line-clamp-with-floats-001-ref.html">
<meta name="assert" content="Floats in a block formatting context inside a line-clamp container are not hidden if they come before the clamp point.">
<style>
.clamp {
line-clamp: 4;
font: 16px / 32px serif;
padding: 0 4px;
background-color: yellow;
}
.float {
float: left;
width: 50px;
height: 50px;
margin: 4px;
background-color: skyblue;
}
.pre {
white-space: pre;
}
</style>
<div class="clamp">
<div class="float"></div>
<div class="pre">Line 1
Line 2
Line 3
Line 4
Line 5</div>
</div>