summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout
diff options
context:
space:
mode:
authorAndi Gallo <andigallo@proton.me>2023-05-26 13:47:40 +0000
committerAndreas Kling <kling@serenityos.org>2023-05-26 21:20:56 +0200
commit1e526af430a5028302688996348f6aff2e4e93d5 (patch)
tree4881d5ec54a6f52d90f6c13606cc735ba3c4229d /Tests/LibWeb/Layout
parent7cc20f4cb57be57822cfed9f9efb3e4ca8f48bfe (diff)
downloadserenity-1e526af430a5028302688996348f6aff2e4e93d5.zip
LibWeb: Fix width calculation for floating replaced elements
The path for floating, replaced elements must not fall through to the path taken for floating, non-replaced elements. The former works like inline replaced elements, while the latter uses a completely different algorithm which doesn't account for intrinsic ratio. Falling through overrides the correct value computed by the former. Fixes #19061.
Diffstat (limited to 'Tests/LibWeb/Layout')
-rw-r--r--Tests/LibWeb/Layout/expected/resolve-height-of-containing-block.txt6
-rw-r--r--Tests/LibWeb/Layout/input/resolve-height-of-containing-block.html2
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/LibWeb/Layout/expected/resolve-height-of-containing-block.txt b/Tests/LibWeb/Layout/expected/resolve-height-of-containing-block.txt
index d8d1dedc68..92f0f5f6fa 100644
--- a/Tests/LibWeb/Layout/expected/resolve-height-of-containing-block.txt
+++ b/Tests/LibWeb/Layout/expected/resolve-height-of-containing-block.txt
@@ -8,10 +8,10 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <div.foo> at (8,16) content-size 1280x800 children: not-inline
BlockContainer <(anonymous)> at (8,16) content-size 1280x0 children: inline
TextNode <#text>
- BlockContainer <div> at (8,16) content-size 1280x600 children: not-inline
+ BlockContainer <div> at (8,16) content-size 1280x400 children: not-inline
BlockContainer <(anonymous)> at (8,16) content-size 1280x0 children: inline
TextNode <#text>
- ImageBox <img> at (88,16) content-size 1200x600 floating children: not-inline
+ ImageBox <img> at (488,16) content-size 800x400 floating children: not-inline
TextNode <#text>
BlockContainer <p> at (8,16) content-size 1280x17.46875 children: inline
line 0 width: 37.21875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
@@ -20,7 +20,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,49.46875) content-size 1280x0 children: inline
TextNode <#text>
- BlockContainer <(anonymous)> at (8,616) content-size 1280x0 children: inline
+ BlockContainer <(anonymous)> at (8,416) content-size 1280x0 children: inline
TextNode <#text>
BlockContainer <(anonymous)> at (8,816) content-size 784x0 children: inline
TextNode <#text>
diff --git a/Tests/LibWeb/Layout/input/resolve-height-of-containing-block.html b/Tests/LibWeb/Layout/input/resolve-height-of-containing-block.html
index b8aa340683..abaf5d0cd8 100644
--- a/Tests/LibWeb/Layout/input/resolve-height-of-containing-block.html
+++ b/Tests/LibWeb/Layout/input/resolve-height-of-containing-block.html
@@ -8,7 +8,7 @@
}
.foo div {
- height: 600px;
+ height: 400px;
}
.foo div img {