Skip to content

Commit d034690

Browse files
mstenshochromium-wpt-export-bot
authored andcommitted
[text-box-trim] Handle new-BFC children correctly.
Text box trimming was only handled on same-formatting-context children, but new-block-formatting-context children should also participate in text box trimming. Change-Id: I5e80a8510d6cf4c37b1509754797f08ca30487c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6308805 Commit-Queue: Morten Stenshorne <[email protected]> Reviewed-by: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1426246}
1 parent 4856bdd commit d034690

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<title>text-box-trim with block formatting context root children</title>
3+
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">
4+
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim">
5+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
6+
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
7+
<style>
8+
.container {
9+
position: relative;
10+
text-box-trim: trim-both;
11+
font-family: Ahem;
12+
font-size: 20px;
13+
line-height: 40px;
14+
color: green;
15+
background: red;
16+
}
17+
.filler {
18+
position: absolute;
19+
width: 100px;
20+
height: 20px;
21+
background: green;
22+
}
23+
</style>
24+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
25+
<div style="width:100px; height:100px; background:red;">
26+
<div class="container">
27+
<div style="display:flow-root;">xxxxx</div>
28+
<div style="display:flow-root;">xxxxx</div>
29+
<div style="display:flow-root;">xxxxx</div>
30+
<div class="filler" style="top:20px;"></div>
31+
<div class="filler" style="top:60px;"></div>
32+
</div>
33+
</div>

0 commit comments

Comments
 (0)