Skip to content

Commit ce27372

Browse files
committed
Bug 1977242 [wpt PR 53750] - layout: Correctly marking box damage when text-related style changed, a=testonly
Automatic update from web-platform-tests layout: Correctly marking box damage when text-related style changed Signed-off-by: sharpshooter_pt <ibluegalaxy_taoj163.com> -- wpt-commits: 9f3f3dde346878f3e8585d604dcd1e1490a97059 wpt-pr: 53750 UltraBlame original commit: 8252f10226e4bce5c7c9b0be77dc0c1c6d9a21de
1 parent 9f38cee commit ce27372

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<title>CSS-white-space test: restore collapsed whitespace</title>
3+
<link rel="author" title="JoeDow" href="[email protected]">
4+
<link rel="match" href="reference/pre-001-ref.html">
5+
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-property">
6+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
7+
<style>
8+
html {
9+
font: 20px/1 Ahem;
10+
}
11+
.span {
12+
background-color: blueviolet;
13+
}
14+
#target {
15+
background-color: blue;
16+
}
17+
</style>
18+
<body>
19+
<div>
20+
<span class="span">aa bb </span><span id="target"> target </span><span class="span">bb aa</span>
21+
</div>
22+
23+
<script>
24+
window.onload = function() {
25+
const target = document.getElementById("target");
26+
// force layout
27+
target.offsetLeft;
28+
target.style.whiteSpace = "pre";
29+
}
30+
</script>
31+
</body>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
3+
<style>
4+
html {
5+
font: 20px/1 Ahem;
6+
}
7+
.span {
8+
background-color: blueviolet;
9+
}
10+
#target {
11+
background-color: blue;
12+
white-space: pre;
13+
}
14+
</style>
15+
<body>
16+
<div>
17+
<span class="span">aa bb </span><span id="target"> target </span><span class="span">bb aa</span>
18+
</div>
19+
</body>

0 commit comments

Comments
 (0)