mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Layout position: fixed
in the initial containing block
This commit is contained in:
parent
c44ee516a1
commit
5ebddf19e6
3 changed files with 97 additions and 25 deletions
|
@ -220,6 +220,7 @@ fn layout_block_level_children<'a>(
|
|||
})
|
||||
.collect()
|
||||
} else {
|
||||
let has_positioned_ancestor = positioning_context.has_positioned_ancestor();
|
||||
let mut fragments = child_boxes
|
||||
.par_iter()
|
||||
.enumerate()
|
||||
|
@ -234,7 +235,7 @@ fn layout_block_level_children<'a>(
|
|||
/* float_context = */ None,
|
||||
)
|
||||
},
|
||||
PositioningContext::new,
|
||||
|| PositioningContext::new_for_rayon(has_positioned_ancestor),
|
||||
PositioningContext::append,
|
||||
)
|
||||
.collect();
|
||||
|
|
|
@ -110,7 +110,7 @@ impl BoxTreeRoot {
|
|||
};
|
||||
|
||||
let dummy_tree_rank = 0;
|
||||
let mut positioning_context = PositioningContext::new();
|
||||
let mut positioning_context = PositioningContext::new_for_initial_containing_block();
|
||||
let mut independent_layout = self.0.layout(
|
||||
layout_context,
|
||||
&mut positioning_context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue