mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove some type variables and an explicit dereference.
This commit is contained in:
parent
438d121cd8
commit
f4edbb6b2e
4 changed files with 10 additions and 10 deletions
|
@ -8,20 +8,20 @@ use dom::node::{ScriptView, Node, DocumentFragmentNodeTypeId};
|
|||
use dom::node::{AbstractNode};
|
||||
use dom::window::Window;
|
||||
|
||||
pub struct DocumentFragment<View> {
|
||||
node: Node<View>,
|
||||
pub struct DocumentFragment {
|
||||
node: Node<ScriptView>,
|
||||
}
|
||||
|
||||
impl DocumentFragment<ScriptView> {
|
||||
impl DocumentFragment {
|
||||
/// Creates a new DocumentFragment.
|
||||
pub fn new(document: AbstractDocument) -> DocumentFragment<ScriptView> {
|
||||
pub fn new(document: AbstractDocument) -> DocumentFragment {
|
||||
DocumentFragment {
|
||||
node: Node::new(DocumentFragmentNodeTypeId, document),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window) -> Fallible<AbstractNode<ScriptView>> {
|
||||
let cx = (*owner.page).js_info.get_ref().js_compartment.cx.ptr;
|
||||
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||
let fragment = @DocumentFragment::new(owner.Document());
|
||||
Ok(unsafe { Node::as_abstract_node(cx, fragment) })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue