mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #16312 - bholley:breadth_first_sequential, r=emilio
Make the sequential traversal breadth-first Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1354806 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16312) <!-- Reviewable:end -->
This commit is contained in:
commit
fd2b092839
9 changed files with 116 additions and 130 deletions
|
@ -1146,7 +1146,6 @@ impl LayoutThread {
|
|||
};
|
||||
|
||||
let traversal = RecalcStyleAndConstructFlows::new(layout_context, traversal_driver);
|
||||
let dom_depth = Some(0); // This is always the root node.
|
||||
let token = {
|
||||
let stylist = &<RecalcStyleAndConstructFlows as
|
||||
DomTraversal<ServoLayoutElement>>::shared_context(&traversal).stylist;
|
||||
|
@ -1165,7 +1164,7 @@ impl LayoutThread {
|
|||
let pool = self.parallel_traversal.as_mut().unwrap();
|
||||
// Parallel mode
|
||||
parallel::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
|
||||
&traversal, element, dom_depth, token, pool);
|
||||
&traversal, element, token, pool);
|
||||
} else {
|
||||
// Sequential mode
|
||||
sequential::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue