mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Fixed #3386.
This commit is contained in:
parent
1b251db732
commit
670ca9894e
7 changed files with 59 additions and 8 deletions
|
@ -88,6 +88,10 @@ pub struct LayoutTaskData {
|
|||
|
||||
/// The dirty rect. Used during display list construction.
|
||||
pub dirty: Rect<Au>,
|
||||
|
||||
/// Starts at zero, and increased by one every time a layout completes.
|
||||
/// This can be used to easily check for invalid stale data.
|
||||
pub generation: uint,
|
||||
}
|
||||
|
||||
/// Information needed by the layout task.
|
||||
|
@ -413,6 +417,7 @@ impl LayoutTask {
|
|||
stylist: box Stylist::new(),
|
||||
parallel_traversal: parallel_traversal,
|
||||
dirty: Rect::zero(),
|
||||
generation: 0,
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
@ -443,6 +448,7 @@ impl LayoutTask {
|
|||
reflow_root: OpaqueNodeMethods::from_layout_node(reflow_root),
|
||||
opts: self.opts.clone(),
|
||||
dirty: Rect::zero(),
|
||||
generation: rw_data.generation,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -925,6 +931,8 @@ impl LayoutTask {
|
|||
layout_debug::end_trace();
|
||||
}
|
||||
|
||||
rw_data.generation += 1;
|
||||
|
||||
// Tell script that we're done.
|
||||
//
|
||||
// FIXME(pcwalton): This should probably be *one* channel, but we can't fix this without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue