diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 01:53:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:49:10 +0200 |
commit | f87c2a8d7616112ca924e30292db2d244cf87eec (patch) | |
tree | 7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/htmltemplateelement.rs | |
parent | 577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff) | |
download | servo-f87c2a8d7616112ca924e30292db2d244cf87eec.tar.gz servo-f87c2a8d7616112ca924e30292db2d244cf87eec.zip |
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> 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.
Diffstat (limited to 'components/script/dom/htmltemplateelement.rs')
-rw-r--r-- | components/script/dom/htmltemplateelement.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<Prefix>, - document: &Document) -> Root<HTMLTemplateElement> { + document: &Document) -> DomRoot<HTMLTemplateElement> { 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<DocumentFragment> { + fn Content(&self) -> DomRoot<DocumentFragment> { 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::<HTMLTemplateElement>().unwrap(); // Steps 2-3. - let copy_contents = Root::upcast::<Node>(copy.Content()); + let copy_contents = DomRoot::upcast::<Node>(copy.Content()); let copy_contents_doc = copy_contents.owner_doc(); for child in self.Content().upcast::<Node>().children() { let copy_child = Node::clone( |