mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Adjust absolute positioned box offsets in flow layout
This commit is contained in:
parent
bc704d8a3d
commit
5a53fb1271
1 changed files with 12 additions and 1 deletions
|
@ -201,7 +201,18 @@ fn layout_block_level_children(
|
|||
placement_state.current_margin.solve() + fragment_block_size;
|
||||
placement_state.current_margin = fragment_block_margins.end;
|
||||
},
|
||||
Fragment::Anonymous(_) | Fragment::AbsoluteOrFixedPositioned(_) => {},
|
||||
Fragment::AbsoluteOrFixedPositioned(fragment) => {
|
||||
let offset = Vec2 {
|
||||
block: placement_state.current_margin.solve() +
|
||||
placement_state.current_block_direction_position,
|
||||
inline: Length::new(0.),
|
||||
};
|
||||
fragment
|
||||
.hoisted_fragment
|
||||
.borrow_mut()
|
||||
.adjust_offsets(offset);
|
||||
},
|
||||
Fragment::Anonymous(_) => {},
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue