mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Make absolutely-positioned elements with z-index: auto
not
stacking contexts. Improves many sites. Closes #7069.
This commit is contained in:
parent
84c4a26e4d
commit
d3d59ced36
26 changed files with 58 additions and 80 deletions
|
@ -1631,15 +1631,28 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
Some(outer_display_list_for_overflow_scroll)
|
||||
}
|
||||
_ => {
|
||||
self.build_display_list_for_block_base(
|
||||
&mut *display_list,
|
||||
layout_context,
|
||||
border_painting_mode,
|
||||
BackgroundAndBorderLevel::RootOfStackingContext);
|
||||
let establishes_stacking_context = self.fragment.establishes_stacking_context();
|
||||
let background_and_border_level = if establishes_stacking_context {
|
||||
BackgroundAndBorderLevel::RootOfStackingContext
|
||||
} else {
|
||||
BackgroundAndBorderLevel::Block
|
||||
};
|
||||
|
||||
self.build_display_list_for_block_base(&mut *display_list,
|
||||
layout_context,
|
||||
border_painting_mode,
|
||||
background_and_border_level);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
if !self.fragment.establishes_stacking_context() {
|
||||
display_list.form_pseudo_stacking_context_for_positioned_content();
|
||||
self.base.display_list_building_result =
|
||||
DisplayListBuildingResult::Normal(display_list);
|
||||
return
|
||||
}
|
||||
|
||||
if !self.will_get_layer() {
|
||||
// We didn't need a layer.
|
||||
self.base.display_list_building_result =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue