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
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 {
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
index 51941ab76c..cf50bf9d3f 100644
--- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
+++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
@@ -137,10 +137,16 @@ void BlockFormattingContext::compute_width(Box const& box, AvailableSpace const&
// FIXME: This const_cast is gross.
const_cast