diff options
author | Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> | 2023-05-08 15:42:29 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-08 14:52:48 +0200 |
commit | 771208d2e284cd8ae99f05a46a7c984a5dc417c6 (patch) | |
tree | e51ff21c4b55a026d7ee5db35a694e40259bf8d9 | |
parent | ea61296738559830cc4a2fec427c50d3f75ec0f5 (diff) | |
download | serenity-771208d2e284cd8ae99f05a46a7c984a5dc417c6.zip |
LibWeb: Fix auto height calculation for table inside BFC
`calculate_max_content_height` expects the available width as the
second argument. However, the available height was mistakenly passed
before. This did not seem to cause any problems because TFC currently
does not respect height sizing constraints but still needs to be fixed.
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index fa0acd72f5..39b5ce67bb 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -476,7 +476,7 @@ CSSPixels BlockFormattingContext::compute_auto_height_for_block_level_element(Bo return calculate_max_content_height(box, available_space.width); } if (display.is_table_inside()) { - return calculate_max_content_height(box, available_space.height); + return calculate_max_content_height(box, available_space.width); } // https://www.w3.org/TR/CSS22/visudet.html#normal-block |