LibWeb: Correct the calculation for right float intrusion

We used to subtract the maximum right margin of any containing box,
but we want to subtract the entire right margin instead. This yielded
incorrect intrusions for right floats not placed in the root.
This commit is contained in:
Ruben
2025-05-24 11:46:01 +02:00
committed by Jelle Raaijmakers
parent 8e5cc74eb1
commit 3263b629c6
Notes: github-actions[bot] 2025-05-27 15:33:02 +00:00
7 changed files with 150 additions and 38 deletions

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<head>
<style>
.container {
width: 400px;
height: 50px;
border: 1px solid black;
}
.left {
float: left;
height: 50px;
}
.right {
float: right;
height: 50px;
}
.w320 { width: 320px; }
.w80 { width: 80px; }
.red { background: red; }
.blue { background: blue; }
</style>
</head>
<body>
<div class="container">
<div class="right w320 red"></div>
<div class="left w80 blue"></div>
</div>
</body>