mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:17:44 +00:00
LibWeb: Use BFC root relative coordinates when flowing around floats
While IFC flows text into a block container, floating objects are anchored at the BFC root, not necessarily the local block container. Because of this, we have to use root-relative coordinates when checking how much space is available in between left and right floated objects.
This commit is contained in:
parent
54beb7433e
commit
9201f626c1
2 changed files with 7 additions and 3 deletions
|
@ -164,7 +164,7 @@ public:
|
|||
virtual void before_children_paint(PaintContext&, PaintPhase) override;
|
||||
virtual void after_children_paint(PaintContext&, PaintPhase) override;
|
||||
|
||||
Gfx::FloatRect margin_box_rect_in_ancestor_coordinate_space(Box const& ancestor_box)
|
||||
Gfx::FloatRect margin_box_rect_in_ancestor_coordinate_space(Box const& ancestor_box) const
|
||||
{
|
||||
auto rect = margin_box_as_relative_rect();
|
||||
for (auto const* current = parent(); current; current = current->parent()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue