Use opts as a global, to avoid cloning and passing the struct all over the code.

This commit is contained in:
Glenn Watson 2014-10-20 10:43:49 +10:00
parent a983debaf1
commit 076495db94
20 changed files with 108 additions and 132 deletions

View file

@ -16,6 +16,7 @@ use wrapper::{PostorderNodeMutTraversal, ThreadSafeLayoutNode, UnsafeLayoutNode}
use wrapper::{PreorderDomTraversal, PostorderDomTraversal};
use servo_util::bloom::BloomFilter;
use servo_util::opts;
use servo_util::tid::tid;
use style::TNode;
@ -204,7 +205,7 @@ impl<'a> PostorderDomTraversal for ConstructFlows<'a> {
let tnode = ThreadSafeLayoutNode::new(&node);
// Always re-construct if incremental layout is turned off.
if !self.layout_context.shared.opts.incremental_layout {
if !opts::get().incremental_layout {
unsafe {
node.set_dirty_descendants(true);
}