LibWeb: Honor negative margins on atomic inlines

Sizing already worked correctly, but before this change, we were too
aggressive with inserting line breaks when negative margins would
still an atomic inline to fit on the line.
This commit is contained in:
Andreas Kling 2023-12-10 10:09:38 +01:00
commit 7abb182fa3
Notes: sideshowbarker 2024-07-16 18:06:41 +09:00
5 changed files with 80 additions and 1 deletions

View file

@ -0,0 +1,23 @@
<!doctype html><style>
* {
margin: 0;
padding: 0;
}
body {
width: max-content;
border: 5px solid black;
}
.foo {
display: inline-block;
background: orange;
width: 100px;
height: 50px;
}
.bar {
display: inline-block;
background: magenta;
margin-left: -50px;
width: 100px;
height: 50px;
}
</style><body><div class="foo"></div><div class="bar"></div>