Truly independent web browser
<!doctype html>
<link rel="match" href="../expected/webkit-line-clamp-hides-reused-atomic-inlines-ref.html">
<style>
body {
margin: 0;
}
#container {
width: 100px;
height: 40px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
font-size: 0;
}
.box {
display: inline-block;
width: 40px;
height: 20px;
background: green;
}
.pushed {
background: red;
}
.pushed > div {
width: 10px;
height: 10px;
background: red;
}
</style>
<div id="container"><div class="box"></div><div class="box pushed"><div></div></div><div class="box pushed"></div></div>
<script>
// The boxes after the first are laid out before the insertion pushes them past the clamp point.
document.body.offsetWidth;
const box = document.createElement("div");
box.className = "box";
container.insertBefore(box, container.firstChild);
document.body.offsetWidth;
</script>