mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Pass a straight Vec to DisplayList::new().
There is no reason to have a runtime check here.
This commit is contained in:
parent
62f7e8fe4b
commit
aefa941626
2 changed files with 2 additions and 8 deletions
|
@ -215,13 +215,8 @@ pub struct DisplayList {
|
|||
|
||||
impl DisplayList {
|
||||
pub fn new(mut root_stacking_context: StackingContext,
|
||||
items: &mut Option<Vec<DisplayItem>>)
|
||||
items: Vec<DisplayItem>)
|
||||
-> DisplayList {
|
||||
let items = match items.take() {
|
||||
Some(items) => items,
|
||||
None => panic!("Tried to create empty display list."),
|
||||
};
|
||||
|
||||
let mut offsets = FnvHashMap(HashMap::with_hasher(Default::default()));
|
||||
DisplayList::sort_and_count_stacking_contexts(&mut root_stacking_context, &mut offsets, 0);
|
||||
|
||||
|
|
|
@ -918,8 +918,7 @@ impl LayoutThread {
|
|||
root_background_color));
|
||||
|
||||
rw_data.display_list =
|
||||
Some(Arc::new(DisplayList::new(root_stacking_context,
|
||||
&mut Some(display_list_entries))))
|
||||
Some(Arc::new(DisplayList::new(root_stacking_context, display_list_entries)))
|
||||
}
|
||||
|
||||
if data.goal == ReflowGoal::ForDisplay {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue