mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Eliminate RestyleResult.
The new incremental restyle algorithm will make traversal decisions in a more centralized way. MozReview-Commit-ID: GH6gFt4VUJO
This commit is contained in:
parent
71b9004d86
commit
1a5e2b4673
7 changed files with 52 additions and 63 deletions
|
@ -11,8 +11,8 @@
|
|||
use dom::{OpaqueNode, StylingMode, TElement, TNode, UnsafeNode};
|
||||
use std::mem;
|
||||
use std::sync::atomic::Ordering;
|
||||
use traversal::{RestyleResult, DomTraversalContext};
|
||||
use traversal::{STYLE_SHARING_CACHE_HITS, STYLE_SHARING_CACHE_MISSES};
|
||||
use traversal::DomTraversalContext;
|
||||
use util::opts;
|
||||
use workqueue::{WorkQueue, WorkUnit, WorkerProxy};
|
||||
|
||||
|
@ -83,8 +83,9 @@ fn top_down_dom<N, C>(unsafe_nodes: UnsafeNodeList,
|
|||
|
||||
// Perform the appropriate traversal.
|
||||
let mut children_to_process = 0isize;
|
||||
if let RestyleResult::Continue = context.process_preorder(node) {
|
||||
C::traverse_children(node.as_element().unwrap(), |kid| {
|
||||
context.process_preorder(node);
|
||||
if let Some(el) = node.as_element() {
|
||||
C::traverse_children(el, |kid| {
|
||||
children_to_process += 1;
|
||||
discovered_child_nodes.push(kid.to_unsafe())
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue