mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
stylo: Don't traverse the whole dom every restyle, propagate the dirty flag down the DOM.
This commit adds hooks to the Servo style traversal to avoid traversing all the DOM for every restyle. Additionally it changes the behavior of the dirty flag to be propagated top down, to prevent extra overhead when an element is dirtied. This commit doesn't aim to change the behavior on Servo just yet, since Servo might rely on a full bottom up reconstruction of the flows. I'll need to double check and implement that separately.
This commit is contained in:
parent
7ca826c6ee
commit
a3020419d9
5 changed files with 66 additions and 33 deletions
|
@ -37,13 +37,13 @@ impl PrivateStyleData {
|
|||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct DomParallelInfo {
|
||||
/// The number of children that still need work done.
|
||||
pub children_count: AtomicIsize,
|
||||
pub children_to_process: AtomicIsize,
|
||||
}
|
||||
|
||||
impl DomParallelInfo {
|
||||
pub fn new() -> DomParallelInfo {
|
||||
DomParallelInfo {
|
||||
children_count: AtomicIsize::new(0),
|
||||
children_to_process: AtomicIsize::new(0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue