mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add support for a stacking context pass to layout_2020
This adds an intermediary data structure that allows the display list builder to move through the fragment tree in stacking context painting order. Spatial nodes are built during this phase and all display list items are added to the end of the display list.
This commit is contained in:
parent
6d6d16f7f4
commit
843df5b529
3 changed files with 180 additions and 78 deletions
|
@ -181,9 +181,16 @@ impl BoxTreeRoot {
|
|||
|
||||
impl FragmentTreeRoot {
|
||||
pub fn build_display_list(&self, builder: &mut crate::display_list::DisplayListBuilder) {
|
||||
let mut stacking_context = Default::default();
|
||||
for fragment in &self.children {
|
||||
fragment.build_display_list(builder, &self.initial_containing_block)
|
||||
fragment.build_stacking_context_tree(
|
||||
builder,
|
||||
&self.initial_containing_block,
|
||||
&mut stacking_context,
|
||||
);
|
||||
}
|
||||
|
||||
stacking_context.build_display_list(builder);
|
||||
}
|
||||
|
||||
pub fn print(&self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue