From 34b11862728503bf523c792939219d93a6155351 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Fri, 5 May 2023 09:45:19 +0300 Subject: LibWeb: Remove early resolve to auto while calculating border-box width `Length::resolved(Node&)` transforms infinite values to "auto". Following transformations: Infinite (Length) -> "auto" -> 0 (px) cause border-box width to be resolved in zero when it should be inf px. Removing `Length::resolved(Node&)` makes it work right: Infinite (Length) -> Infinite (px) Fixes #18649 --- .../block-and-inline/max-width-percentage-100-border-box.txt | 8 ++++++++ .../block-and-inline/max-width-percentage-100-border-box.html | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100-border-box.txt create mode 100644 Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100-border-box.html (limited to 'Tests/LibWeb') diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100-border-box.txt b/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100-border-box.txt new file mode 100644 index 0000000000..0c6a27a5c9 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100-border-box.txt @@ -0,0 +1,8 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (1,1) content-size 798x0 [BFC] children: not-inline + BlockContainer at (10,10) content-size 93.59375x19.46875 positioned [BFC] children: not-inline + BlockContainer