LibWeb: Fix percentage insets resolution for grid items

compute_inset() was incorrectly retrieving the containing block size
because containing_block() is unaware of grid areas that form a
containing block for grid items but do not exist in the layout tree.
With this change, we explicitly pass the containing block into
compute_inset(), allowing it to correctly provide the containing block
sizes for grid items.
This commit is contained in:
Aliaksandr Kalenik 2024-11-11 15:54:21 +01:00 committed by Andreas Kling
parent 07d8ddb5fa
commit a8c1d12e84
Notes: github-actions[bot] 2024-11-11 19:21:44 +00:00
9 changed files with 102 additions and 12 deletions

View file

@ -106,7 +106,7 @@ public:
bool can_skip_is_anonymous_text_run(Box&);
void compute_inset(NodeWithStyleAndBoxModelMetrics const&);
void compute_inset(NodeWithStyleAndBoxModelMetrics const&, CSSPixelSize containing_block_size);
protected:
FormattingContext(Type, LayoutMode, LayoutState&, Box const&, FormattingContext* parent = nullptr);