mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Make grid containers be Layout::Box
Grid containers were incorrectly represented as BlockContainer before. Furthermore, GridFormattingContext had a bogus inheritance relationship with BlockFormattingContext. This patch brings our architecture closer to spec by making grid containers be plain boxes and making GFC not inherit from BFC.
This commit is contained in:
@@ -66,7 +66,8 @@ static Box const* nearest_ancestor_capable_of_forming_a_containing_block(Node co
|
||||
{
|
||||
for (auto const* ancestor = node.parent(); ancestor; ancestor = ancestor->parent()) {
|
||||
if (ancestor->is_block_container()
|
||||
|| ancestor->display().is_flex_inside()) {
|
||||
|| ancestor->display().is_flex_inside()
|
||||
|| ancestor->display().is_grid_inside()) {
|
||||
return verify_cast<Box>(ancestor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user