From 0318ac5ce450bb286a2b0fdd7a2d8aa90f6cf342 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 4 May 2023 23:39:13 +0300 Subject: LibWeb: Remove setting length to 0px if it is not definite If available width (or height) is max-content and width (or height) value is 100% it should be resolved in infinite px, not 0 px. Fixes #18639 --- .../Layout/expected/block-and-inline/max-width-percentage-100.txt | 8 ++++++++ .../Layout/input/block-and-inline/max-width-percentage-100.html | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100.txt create mode 100644 Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100.html (limited to 'Tests') diff --git a/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100.txt b/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100.txt new file mode 100644 index 0000000000..7d55399a04 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100.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 138.609375x19.46875 positioned [BFC] children: not-inline + BlockContainer
at (11,11) content-size 136.609375x17.46875 children: inline + line 0 width: 136.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 18, rect: [11,11 136.609375x17.46875] + "well hello friends" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100.html b/Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100.html new file mode 100644 index 0000000000..3343cfdaa2 --- /dev/null +++ b/Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100.html @@ -0,0 +1,5 @@ +
well hello friends \ No newline at end of file -- cgit v1.2.3