diff options
author | Martin Robinson <mrobinson@igalia.com> | 2016-10-10 19:36:52 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2016-10-13 09:50:45 +0200 |
commit | be62ad71176d66648f2aa754477668f7742f296b (patch) | |
tree | a8f68374f03b787e1c2c77623810431c2c01224e /components/layout/display_list_builder.rs | |
parent | b110eb394ebeb6528240ac3d01e17b0577a9dfbd (diff) | |
download | servo-be62ad71176d66648f2aa754477668f7742f296b.tar.gz servo-be62ad71176d66648f2aa754477668f7742f296b.zip |
Integrate stacking contexts into the display list
Integrate stacking contexts into the display list by adding two new
entry types, PushStackingContext and PopStackingContext. This allows us
to eliminate the ugly offsets map that DisplayList used to contain
and seems to speed up display list construction. With this approach
we are able to also completely prune pseudo-stacking contexts from the
final display list and remove their (minimal) overhead from display
list traversal Traversing the display list is also a bit simpler now.
Additionally, this will allow easier editing of the DisplayList to
properly support scrolling roots. The push/pop entries can be
duplicated to clone complex StackingContext trees between layers.
Diffstat (limited to 'components/layout/display_list_builder.rs')
-rw-r--r-- | components/layout/display_list_builder.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 4fc4d947076..5fba5159bbc 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1780,7 +1780,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow { ScrollPolicy::Scrollable, creation_mode); self.base.collect_stacking_contexts_for_children(&mut new_context); - let new_children: Vec<Box<StackingContext>> = new_context.children.drain(..).collect(); + let new_children: Vec<StackingContext> = new_context.children.drain(..).collect(); let mut non_floating_children = Vec::new(); for child in new_children { @@ -1808,6 +1808,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow { &self.base, scroll_policy, StackingContextCreationMode::InnerScrollWrapper); + self.base.collect_stacking_contexts_for_children(&mut inner_stacking_context); let mut outer_stacking_context = self.fragment.create_stacking_context( |