From 508927cae2edd890f3267da13a5d6e2642de80a9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 May 2023 17:14:15 +0200 Subject: LibWeb: Take floats into account when measuring automatic width of IFC When there are floats present inside an IFC, we must coordinate with the parent BFC to calculate the automatic width of the IFC's block box. This is because the IFC is not directly aware of floats. Only the BFC knows enough about them to account for them in automatic sizing. --- ...r-with-inline-children-and-nonempty-floating-child.txt | 6 ++++++ ...-with-inline-children-and-nonempty-floating-child.html | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.txt create mode 100644 Tests/LibWeb/Layout/input/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.html (limited to 'Tests') diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.txt b/Tests/LibWeb/Layout/expected/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.txt new file mode 100644 index 0000000000..0a4572b393 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.txt @@ -0,0 +1,6 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x0 [BFC] children: not-inline + BlockContainer at (8,8) content-size 140x100 positioned [BFC] children: not-inline + BlockContainer at (58,58) content-size 40x0 children: inline + BlockContainer at (78,78) content-size 0x0 floating [BFC] children: not-inline + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.html b/Tests/LibWeb/Layout/input/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.html new file mode 100644 index 0000000000..9d61d2c302 --- /dev/null +++ b/Tests/LibWeb/Layout/input/block-and-inline/automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.html @@ -0,0 +1,15 @@ +
\ No newline at end of file -- cgit v1.2.3