mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove all root collections.
This commit is contained in:
parent
aaf0a61194
commit
7b3e6d1f21
35 changed files with 329 additions and 475 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::InheritTypes::{DocumentFragmentDerived, NodeCast};
|
||||
use dom::bindings::codegen::BindingDeclarations::DocumentFragmentBinding;
|
||||
use dom::bindings::js::{JS, JSRef, RootCollection, Temporary};
|
||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::document::Document;
|
||||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
|
@ -40,9 +40,8 @@ impl DocumentFragment {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: &JSRef<Window>) -> Fallible<Temporary<DocumentFragment>> {
|
||||
let roots = RootCollection::new();
|
||||
let document = owner.Document();
|
||||
let document = document.root(&roots);
|
||||
let document = document.root();
|
||||
|
||||
Ok(DocumentFragment::new(&document.root_ref()))
|
||||
}
|
||||
|
@ -54,8 +53,7 @@ pub trait DocumentFragmentMethods {
|
|||
|
||||
impl<'a> DocumentFragmentMethods for JSRef<'a, DocumentFragment> {
|
||||
fn Children(&self) -> Temporary<HTMLCollection> {
|
||||
let roots = RootCollection::new();
|
||||
let window = window_from_node(self).root(&roots);
|
||||
let window = window_from_node(self).root();
|
||||
HTMLCollection::children(&window.root_ref(), NodeCast::from_ref(self))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue