mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Address review comments.
This commit is contained in:
parent
7b3e6d1f21
commit
0f2d0b1dc3
99 changed files with 388 additions and 380 deletions
|
@ -22,18 +22,18 @@ pub struct NodeList {
|
|||
}
|
||||
|
||||
impl NodeList {
|
||||
pub fn new_inherited(window: JS<Window>,
|
||||
pub fn new_inherited(window: &JSRef<Window>,
|
||||
list_type: NodeListType) -> NodeList {
|
||||
NodeList {
|
||||
list_type: list_type,
|
||||
reflector_: Reflector::new(),
|
||||
window: window
|
||||
window: window.unrooted()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(window: &JSRef<Window>,
|
||||
list_type: NodeListType) -> Temporary<NodeList> {
|
||||
reflect_dom_object(~NodeList::new_inherited(window.unrooted(), list_type),
|
||||
reflect_dom_object(~NodeList::new_inherited(window, list_type),
|
||||
window, NodeListBinding::Wrap)
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ impl<'a> NodeListMethods for JSRef<'a, NodeList> {
|
|||
Children(ref node) => {
|
||||
let node = node.root();
|
||||
node.deref().children().nth(index as uint)
|
||||
.map(|child| Temporary::new_rooted(&child))
|
||||
.map(|child| Temporary::from_rooted(&child))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue