aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/parallel.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-05 17:11:24 -0500
committerGitHub <noreply@github.com>2016-11-05 17:11:24 -0500
commitac0475971bb24a63ca5d36d1d17e3036ddb99049 (patch)
treeb74c223b51690fba9491b3e79dde1536ef9aaa00 /components/style/parallel.rs
parent9ab3a24885b0cc1357ea34386f1fcad4cf60259c (diff)
parent1a18161006c67424750943e1b29d3f3aead92d5e (diff)
downloadservo-ac0475971bb24a63ca5d36d1d17e3036ddb99049.tar.gz
servo-ac0475971bb24a63ca5d36d1d17e3036ddb99049.zip
Auto merge of #13202 - emilio:rule-tree, r=SimonSapin,Manishearth,emilio
Rule tree, v1 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> This patch introduces infrastructure for the rule tree, and constructs it. We don't use it yet, nor have good heuristics for GC'ing it, but this should not happen anymore once we store the rule node reference in the node. I haven't messed up with memory orders because I want to do a try run with it, then mess with them. <!-- 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/13202) <!-- Reviewable:end -->
Diffstat (limited to 'components/style/parallel.rs')
-rw-r--r--components/style/parallel.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/style/parallel.rs b/components/style/parallel.rs
index 8c30868224d..6740c4f379c 100644
--- a/components/style/parallel.rs
+++ b/components/style/parallel.rs
@@ -33,7 +33,8 @@ pub fn run_queue_with_custom_work_data_type<To, F, SharedContext: Sync>(
queue: &mut WorkQueue<SharedContext, WorkQueueData>,
callback: F,
shared: &SharedContext)
- where To: 'static + Send, F: FnOnce(&mut WorkQueue<SharedContext, To>) {
+ where To: 'static + Send, F: FnOnce(&mut WorkQueue<SharedContext, To>)
+{
let queue: &mut WorkQueue<SharedContext, To> = unsafe {
mem::transmute(queue)
};
@@ -73,7 +74,8 @@ pub fn traverse_dom<N, C>(root: N,
#[inline(always)]
fn top_down_dom<N, C>(unsafe_nodes: UnsafeNodeList,
proxy: &mut WorkerProxy<C::SharedContext, UnsafeNodeList>)
- where N: TNode, C: DomTraversalContext<N> {
+ where N: TNode, C: DomTraversalContext<N>
+{
let context = C::new(proxy.user_data(), unsafe_nodes.1);
let mut discovered_child_nodes = vec![];