mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Pass a LayoutContext through box construction
This commit is contained in:
parent
9c5a595044
commit
4e6e31a76c
6 changed files with 34 additions and 31 deletions
|
@ -1081,9 +1081,8 @@ impl LayoutThread {
|
|||
let box_tree = if token.should_traverse() {
|
||||
driver::traverse_dom(&traversal, token, Some(rayon_pool));
|
||||
|
||||
let shared = DomTraversal::<ServoLayoutElement>::shared_context(&traversal);
|
||||
let root_node = document.root_element().unwrap().as_node();
|
||||
let box_tree = rayon_pool.install(|| BoxTreeRoot::construct(shared, root_node));
|
||||
let box_tree = rayon_pool.install(|| BoxTreeRoot::construct(traversal.context(), root_node));
|
||||
Some(box_tree)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue