diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-05-04 23:39:13 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-05 06:20:44 +0200 |
commit | 0318ac5ce450bb286a2b0fdd7a2d8aa90f6cf342 (patch) | |
tree | ffd1047d55a5752ee3336422ee49309fc42e8c1f /Tests | |
parent | b443c0b80ba1634dbb5199a9af05c735d0207e2c (diff) | |
download | serenity-0318ac5ce450bb286a2b0fdd7a2d8aa90f6cf342.zip |
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
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/LibWeb/Layout/expected/block-and-inline/max-width-percentage-100.txt | 8 | ||||
-rw-r--r-- | Tests/LibWeb/Layout/input/block-and-inline/max-width-percentage-100.html | 5 |
2 files changed, 13 insertions, 0 deletions
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 <html> at (1,1) content-size 798x0 [BFC] children: not-inline + BlockContainer <body> at (10,10) content-size 138.609375x19.46875 positioned [BFC] children: not-inline + BlockContainer <div> 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 @@ +<!doctype html><style> +* { border: 1px solid black; font-family: 'SerenitySans'; } +body { position: absolute; } +div { max-width: 100%; } +</style><body><div>well hello friends
\ No newline at end of file |