From 537256fae2df8df70d0b7df54ee4f3678edb8cf7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 28 May 2023 19:31:26 +0300 Subject: LibWeb: Treat unresolvable percentages as auto to resolve sizes in GFC Fixes the bug that currently we always consider tracks with percentage size as ones with "fixed" length even when available size is not definite. With this change tracks with percentage size when available size is not definite will be considered as "intrinsic" sized. --- .../Layout/expected/grid/unresolvable-percentage-track.txt | 10 ++++++++++ .../Layout/input/grid/unresolvable-percentage-track.html | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/grid/unresolvable-percentage-track.txt create mode 100644 Tests/LibWeb/Layout/input/grid/unresolvable-percentage-track.html (limited to 'Tests/LibWeb/Layout') diff --git a/Tests/LibWeb/Layout/expected/grid/unresolvable-percentage-track.txt b/Tests/LibWeb/Layout/expected/grid/unresolvable-percentage-track.txt new file mode 100644 index 0000000000..ba09701e5c --- /dev/null +++ b/Tests/LibWeb/Layout/expected/grid/unresolvable-percentage-track.txt @@ -0,0 +1,10 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x17.46875 children: not-inline + Box at (8,8) content-size 784x17.46875 flex-container(row) [FFC] children: not-inline + Box at (8,8) content-size 36.84375x17.46875 flex-item [GFC] children: not-inline + BlockContainer
at (8,8) content-size 36.84375x17.46875 [BFC] children: inline + line 0 width: 36.84375, height: 17.46875, bottom: 17.46875, baseline: 13.53125 + frag 0 from TextNode start: 0, length: 5, rect: [8,8 36.84375x17.46875] + "hello" + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/grid/unresolvable-percentage-track.html b/Tests/LibWeb/Layout/input/grid/unresolvable-percentage-track.html new file mode 100644 index 0000000000..d09cd4eaea --- /dev/null +++ b/Tests/LibWeb/Layout/input/grid/unresolvable-percentage-track.html @@ -0,0 +1,11 @@ + +
hello
\ No newline at end of file -- cgit v1.2.3