mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Make sure the ICB is at least as tall as the viewport
This is a hack until we implement a proper overflow mechanism. For now, this allows us to right-click below the lowest content on the page.
This commit is contained in:
parent
598efa60a3
commit
f35f605a24
Notes:
sideshowbarker
2024-07-19 00:47:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f35f605a24f
1 changed files with 3 additions and 1 deletions
|
@ -620,7 +620,9 @@ void BlockFormattingContext::layout_initial_containing_block(LayoutMode layout_m
|
|||
icb.for_each_child_of_type<Box>([&](auto& child) {
|
||||
lowest_bottom = max(lowest_bottom, child.absolute_rect().bottom());
|
||||
});
|
||||
icb.set_height(lowest_bottom);
|
||||
|
||||
// FIXME: This is a hack and should be managed by an overflow mechanism.
|
||||
icb.set_height(max(static_cast<float>(viewport_rect.height()), lowest_bottom));
|
||||
|
||||
// FIXME: This is a total hack. Make sure any GUI::Widgets are moved into place after layout.
|
||||
// We should stop embedding GUI::Widgets entirely, since that won't work out-of-process.
|
||||
|
|
Loading…
Reference in a new issue