mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibWeb: Some improvements to absolute positioning
Absolutely positioned blocks now register themselves with their containing block (and note that the containing block of an absolutely positioned box is the nearest non-statically positioned block ancestor or the ICB as fallback.) Containing blocks then drive the layout of their tracked absolutely positioned descendants as a separate layout pass. This is very far from perfect but the general direction seems good.
This commit is contained in:
parent
ff2c949d70
commit
260427f0ad
8 changed files with 166 additions and 24 deletions
|
@ -58,6 +58,8 @@ void LayoutDocument::layout(LayoutMode layout_mode)
|
|||
});
|
||||
set_height(lowest_bottom);
|
||||
|
||||
layout_absolute_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.
|
||||
for_each_in_subtree_of_type<LayoutWidget>([&](auto& widget) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue