forked from mirrors/gecko-dev
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
31 lines
792 B
HTML
31 lines
792 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Overflow: line-clamp doesn't propagate to floats</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-007-ref.html">
|
|
<meta name="assert" content="Floats create a new BFC, and line-clamp does not propagate into independent BFCs">
|
|
<style>
|
|
.clamp {
|
|
line-clamp: 4;
|
|
font: 16px / 32px serif;
|
|
padding: 0 4px;
|
|
white-space: pre;
|
|
background-color: yellow;
|
|
}
|
|
.float {
|
|
float: left;
|
|
margin: 4px;
|
|
white-space: pre;
|
|
background-color: skyblue;
|
|
}
|
|
</style>
|
|
<div class="clamp">Line 1
|
|
Line 2
|
|
Line 3
|
|
Line 4<div class="float">Line A
|
|
Line B
|
|
Line C
|
|
Line D
|
|
Line E</div>
|
|
Line 5</div>
|