LibWeb: Add basic support for position:fixed

Fixed position elements have the ICB as their containing block.
The magic of fixed positioning is implemented at the rendering stage,
where we temporarily translate painting by the current scroll offset.

Note that "absolutely positioned" includes both position:absolute
and position:fixed.
This commit is contained in:
Andreas Kling 2020-06-12 14:19:03 +02:00
commit 137f6d44ec
Notes: sideshowbarker 2024-07-19 05:42:43 +09:00
8 changed files with 27 additions and 11 deletions

View file

@ -58,7 +58,7 @@ void LayoutDocument::layout(LayoutMode layout_mode)
});
set_height(lowest_bottom);
layout_absolute_descendants();
layout_absolutely_positioned_descendants();
// 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.