mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Allow negative margins to influence inline offset after float
In 89ba00304c, the box' X position was
capped at 0 to prevent negative X positions to act as if there were
intruding floats on the left side. Instead, we need to check whether the
left side float intrusion we are going to calculate matters at all -
because if there's no matching float box, the intrusion is always going
to be 0 and we don't need to take the box' X position into account.
Fixes the floating publication images on https://lexfridman.com/.
This commit is contained in:
committed by
Andreas Kling
parent
06ffe532c2
commit
ab3e9799d5
Notes:
github-actions[bot]
2025-07-28 10:13:04 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/ab3e9799d56 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5616
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
#a {
|
||||
margin-left: -100px;
|
||||
}
|
||||
#b {
|
||||
background-color: red;
|
||||
float: left;
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<!-- The text should be positioned to the right of the red square -->
|
||||
<div id="a"><div id="b"></div>foo bar baz
|
||||
Reference in New Issue
Block a user