diff options
author | Andreas Kling <kling@serenityos.org> | 2022-01-24 02:03:29 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-24 02:16:13 +0100 |
commit | 9201f626c133464580a4cf31517b3191d74626fd (patch) | |
tree | 6f892ccee0e9f9bd335267ccb78cd7990b18ff90 /Userland/Libraries/LibWeb/Layout/Box.h | |
parent | 54beb7433ee7fff89b1bdfae1e69fe6654147304 (diff) | |
download | serenity-9201f626c133464580a4cf31517b3191d74626fd.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout/Box.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/Box.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h index 231ac863e1..bd29c18aef 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.h +++ b/Userland/Libraries/LibWeb/Layout/Box.h @@ -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()) { |