mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb: Improve placement of abspos boxes with dual-auto insets
When an absolutely positioned box has auto insets on both sides of an axis, it's placed according to the "static position rectangle". This is, roughly, the rectangle a box would occupy if it were position:static instead of position:absolute or position:fixed. This patch implements a rough, but still significantly better, estimation of such static positions. It gets pretty hairy in the case where an abspos box has a parent whose children are inline.
This commit is contained in:
parent
74840c5537
commit
de6d012367
3 changed files with 71 additions and 17 deletions
|
@ -447,7 +447,7 @@ void BlockFormattingContext::place_block_level_element_in_normal_flow_vertically
|
|||
|
||||
resolve_vertical_box_model_metrics(child_box, available_space, m_state);
|
||||
|
||||
auto y = FormattingContext::compute_box_y_position_with_respect_to_siblings(child_box, box_state);
|
||||
auto y = FormattingContext::compute_box_y_position_with_respect_to_siblings(child_box);
|
||||
|
||||
auto clear_floating_boxes = [&](FloatSideData& float_side) {
|
||||
if (!float_side.current_boxes.is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue