mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Absolute positioned flow should be placed at the margin-end of its previous flow
This commit is contained in:
parent
b2f69f3635
commit
332cdd05c8
97 changed files with 8 additions and 287 deletions
|
@ -806,11 +806,14 @@ impl BlockFlow {
|
|||
for (child_index, kid) in self.base.child_iter_mut().enumerate() {
|
||||
if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||
// Assume that the *hypothetical box* for an absolute flow starts immediately
|
||||
// after the block-end border edge of the previous flow.
|
||||
// after the margin-end border edge of the previous flow.
|
||||
if flow::base(kid).flags.contains(BLOCK_POSITION_IS_STATIC) {
|
||||
let previous_bottom_margin = margin_collapse_info.current_float_ceiling();
|
||||
|
||||
flow::mut_base(kid).position.start.b = cur_b +
|
||||
flow::base(kid).collapsible_margins
|
||||
.block_start_margin_for_noncollapsible_context()
|
||||
.block_start_margin_for_noncollapsible_context() +
|
||||
previous_bottom_margin
|
||||
}
|
||||
kid.place_float_if_applicable();
|
||||
if !flow::base(kid).flags.is_float() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue