From f87c2a8d7616112ca924e30292db2d244cf87eec Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 26 Sep 2017 01:53:40 +0200 Subject: Rename Root to DomRoot In a later PR, DomRoot will become a type alias of Root>, where Root will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned. --- components/script/dom/htmltemplateelement.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'components/script/dom/htmltemplateelement.rs') diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs index 5f345206a94..dde9d380c72 100644 --- a/components/script/dom/htmltemplateelement.rs +++ b/components/script/dom/htmltemplateelement.rs @@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding; use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use dom::bindings::inheritance::Castable; -use dom::bindings::root::{MutNullableDom, Root}; +use dom::bindings::root::{DomRoot, MutNullableDom}; use dom::document::Document; use dom::documentfragment::DocumentFragment; use dom::htmlelement::HTMLElement; @@ -38,7 +38,7 @@ impl HTMLTemplateElement { #[allow(unrooted_must_root)] pub fn new(local_name: LocalName, prefix: Option, - document: &Document) -> Root { + document: &Document) -> DomRoot { Node::reflect_node(box HTMLTemplateElement::new_inherited(local_name, prefix, document), document, HTMLTemplateElementBinding::Wrap) @@ -47,7 +47,7 @@ impl HTMLTemplateElement { impl HTMLTemplateElementMethods for HTMLTemplateElement { /// https://html.spec.whatwg.org/multipage/#dom-template-content - fn Content(&self) -> Root { + fn Content(&self) -> DomRoot { self.contents.or_init(|| { let doc = document_from_node(self); doc.appropriate_template_contents_owner_document().CreateDocumentFragment() @@ -79,7 +79,7 @@ impl VirtualMethods for HTMLTemplateElement { } let copy = copy.downcast::().unwrap(); // Steps 2-3. - let copy_contents = Root::upcast::(copy.Content()); + let copy_contents = DomRoot::upcast::(copy.Content()); let copy_contents_doc = copy_contents.owner_doc(); for child in self.Content().upcast::().children() { let copy_child = Node::clone( -- cgit v1.2.3