aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/traversal.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2017-10-16 18:36:09 +0200
committerMartin Robinson <mrobinson@igalia.com>2017-10-24 16:28:07 +0200
commit5937f62352c12b4e5def80bd70ce06412389c934 (patch)
tree53c9628393429dc3c108473fcb654b6e70a172fa /components/layout/traversal.rs
parenta296e386af21b50409e78dd3a34ea6a5fd36d4bf (diff)
downloadservo-5937f62352c12b4e5def80bd70ce06412389c934.tar.gz
servo-5937f62352c12b4e5def80bd70ce06412389c934.zip
Wait as late as possible to assign ClipIds
This will allow Servo to create ClipScrollNodes later during display list construction, which will be necessary once rounded rectangles are removed from the LocalClip structure. Instead of keeping track of the ClipId of each ClipScrollNode, we keep track of its index in an array of ClipScrollNodes. This will allow us to access them without a hash lookup.
Diffstat (limited to 'components/layout/traversal.rs')
-rw-r--r--components/layout/traversal.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs
index 077e43fb45c..2905157db3c 100644
--- a/components/layout/traversal.rs
+++ b/components/layout/traversal.rs
@@ -313,9 +313,8 @@ impl<'a> BuildDisplayList<'a> {
let parent_stacking_context_id = self.state.current_stacking_context_id;
self.state.current_stacking_context_id = flow::base(flow).stacking_context_id;
- let parent_clip_and_scroll_info = self.state.current_clip_and_scroll_info;
- self.state.current_clip_and_scroll_info =
- flow.clip_and_scroll_info(self.state.layout_context.id);
+ let parent_clipping_and_scrolling = self.state.current_clipping_and_scrolling;
+ self.state.current_clipping_and_scrolling = flow.clipping_and_scrolling();
flow.build_display_list(&mut self.state);
flow::mut_base(flow).restyle_damage.remove(REPAINT);
@@ -325,6 +324,6 @@ impl<'a> BuildDisplayList<'a> {
}
self.state.current_stacking_context_id = parent_stacking_context_id;
- self.state.current_clip_and_scroll_info = parent_clip_and_scroll_info;
+ self.state.current_clipping_and_scrolling = parent_clipping_and_scrolling;
}
}