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:
bors-servo 2017-04-09 01:55:09 -05:00 committed by GitHub
commit fd2b092839
9 changed files with 116 additions and 130 deletions

View file

@ -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>(