diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-05-28 19:31:26 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-28 20:26:05 +0200 |
commit | 537256fae2df8df70d0b7df54ee4f3678edb8cf7 (patch) | |
tree | 5bbc61b6f772d040179ec2319efd2656dbb6792a /Tests | |
parent | 30feb95d539c468259616c9bb6e260efcf571be5 (diff) | |
download | serenity-537256fae2df8df70d0b7df54ee4f3678edb8cf7.zip |
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.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/LibWeb/Layout/expected/grid/unresolvable-percentage-track.txt | 10 | ||||
-rw-r--r-- | Tests/LibWeb/Layout/input/grid/unresolvable-percentage-track.html | 11 |
2 files changed, 21 insertions, 0 deletions
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 <html> at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline + Box <div.ipc-page-grid> at (8,8) content-size 784x17.46875 flex-container(row) [FFC] children: not-inline + Box <div.ipc-sub-grid> at (8,8) content-size 36.84375x17.46875 flex-item [GFC] children: not-inline + BlockContainer <div> 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 @@ +<style> +.ipc-page-grid { + display: flex; +} + +.ipc-sub-grid { + display: grid; + grid-template-columns: 100%; +} +</style> +<div class="ipc-page-grid"><div class="ipc-sub-grid"><div>hello</div></div></div>
\ No newline at end of file |