mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Use LayoutJS<T> in layout crate.
This commit is contained in:
parent
e2bd9eadd8
commit
6b1e2bd11c
4 changed files with 50 additions and 42 deletions
|
@ -32,7 +32,7 @@ use gfx::paint_task::{PaintChan, PaintLayer};
|
|||
use gfx::paint_task::Msg as PaintMsg;
|
||||
use layout_traits::{LayoutControlMsg, LayoutTaskFactory};
|
||||
use log;
|
||||
use script::dom::bindings::js::JS;
|
||||
use script::dom::bindings::js::{JS, LayoutJS};
|
||||
use script::dom::node::{LayoutDataRef, Node, NodeTypeId};
|
||||
use script::dom::element::ElementTypeId;
|
||||
use script::dom::htmlelement::HTMLElementTypeId;
|
||||
|
@ -719,8 +719,8 @@ impl LayoutTask {
|
|||
// 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 mut node: LayoutJS<Node> = unsafe {
|
||||
JS::from_trusted_node_address(data.document_root).to_layout()
|
||||
};
|
||||
let node: &mut LayoutNode = unsafe {
|
||||
mem::transmute(&mut node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue