mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
servo: Merge #16938 - stylo: Don't mess up traversal drivers (from emilio:traversal-assert); r=bzbarsky
Right now it's harmless, but it trips assertions that are nice to have, just in case it stops being the case. Source-Repo: https://github.com/servo/servo Source-Revision: e1ecd3b89cd9c78b6ce2e936064681df52d265ab --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : f7343d32ffb14a9cd90698a35e41164a9c8ffd92
This commit is contained in:
parent
4b27190a36
commit
fd7ec9d535
@ -210,14 +210,14 @@ fn traverse_subtree(element: GeckoElement,
|
||||
debug!("Traversing subtree:");
|
||||
debug!("{:?}", ShowSubtreeData(element.as_node()));
|
||||
|
||||
let traversal_driver = if global_style_data.style_thread_pool.is_none() {
|
||||
let traversal_driver = if global_style_data.style_thread_pool.is_none() || !element.is_root() {
|
||||
TraversalDriver::Sequential
|
||||
} else {
|
||||
TraversalDriver::Parallel
|
||||
};
|
||||
|
||||
let traversal = RecalcStyleOnly::new(shared_style_context, traversal_driver);
|
||||
if traversal_driver.is_parallel() && element.is_root() {
|
||||
if traversal_driver.is_parallel() {
|
||||
parallel::traverse_dom(&traversal, element, token,
|
||||
global_style_data.style_thread_pool.as_ref().unwrap());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user