1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

LibWeb: Margin bottom collapsing between parent and last child

This commit is contained in:
Aliaksandr Kalenik 2022-12-28 21:42:46 +03:00 committed by Andreas Kling
parent 7088a87f49
commit 8259ff12bd
5 changed files with 105 additions and 65 deletions

View file

@ -55,6 +55,8 @@ public:
private:
virtual bool is_block_formatting_context() const final { return true; }
float compute_auto_height_for_block_level_element(Box const&, AvailableSpace const&);
void compute_width_for_floating_box(Box const&, AvailableSpace const&);
void compute_width_for_block_level_replaced_element_in_normal_flow(ReplacedBox const&, AvailableSpace const&);
@ -114,6 +116,7 @@ private:
struct BlockMarginState {
Vector<float> current_collapsible_margins;
Function<void(float)> block_container_y_position_update_callback;
bool box_last_in_flow_child_margin_bottom_collapsed { false };
void add_margin(float margin)
{