diff options
author | Jack Moffitt <jack@metajack.im> | 2014-08-04 23:02:30 -0600 |
---|---|---|
committer | Jack Moffitt <jack@metajack.im> | 2014-08-08 19:11:53 -0600 |
commit | 7a4321d649c5ccd99db379533d9b0e82eca57a1a (patch) | |
tree | 2980dad5f5f0360b543acf72d5555236abf29ead /src/components/layout/layout_task.rs | |
parent | 62c9a779a956b8c53cab824b1a3c569dd983fadb (diff) | |
download | servo-7a4321d649c5ccd99db379533d9b0e82eca57a1a.tar.gz servo-7a4321d649c5ccd99db379533d9b0e82eca57a1a.zip |
Upgrade Rust.
Diffstat (limited to 'src/components/layout/layout_task.rs')
-rw-r--r-- | src/components/layout/layout_task.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/layout/layout_task.rs b/src/components/layout/layout_task.rs index e90545ed6d6..83809aa137e 100644 --- a/src/components/layout/layout_task.rs +++ b/src/components/layout/layout_task.rs @@ -422,7 +422,7 @@ impl LayoutTask { AddStylesheetMsg(sheet) => self.handle_add_stylesheet(sheet), ReflowMsg(data) => { profile(time::LayoutPerformCategory, self.time_profiler_chan.clone(), || { - self.handle_reflow(data); + self.handle_reflow(&*data); }); } QueryMsg(query) => { @@ -617,8 +617,10 @@ impl LayoutTask { /// The high-level routine that performs layout tasks. fn handle_reflow(&mut self, data: &Reflow) { // FIXME: Isolate this transmutation into a "bridge" module. + // FIXME(rust#16366): The following line had to be moved because of a + // rustc bug. It should be in the next unsafe block. + let mut node: JS<Node> = unsafe { JS::from_trusted_node_address(data.document_root) }; let node: &mut LayoutNode = unsafe { - let mut node: JS<Node> = JS::from_trusted_node_address(data.document_root); mem::transmute(&mut node) }; @@ -673,7 +675,7 @@ impl LayoutTask { let mut applicable_declarations = ApplicableDeclarations::new(); let mut applicable_declarations_cache = ApplicableDeclarationsCache::new(); let mut style_sharing_candidate_cache = StyleSharingCandidateCache::new(); - drop(node.recalc_style_for_subtree(self.stylist, + drop(node.recalc_style_for_subtree(&*self.stylist, &mut layout_ctx, font_context_opt.take_unwrap(), &mut applicable_declarations, |