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.
This commit is contained in:
Anthony Ramine 2017-09-26 01:53:40 +02:00
parent 577370746e
commit f87c2a8d76
291 changed files with 1774 additions and 1770 deletions

View file

@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::root::{LayoutDom, MutNullableDom, Root};
use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
@ -124,7 +124,7 @@ impl HTMLTextAreaElement {
#[allow(unrooted_must_root)]
pub fn new(local_name: LocalName,
prefix: Option<Prefix>,
document: &Document) -> Root<HTMLTextAreaElement> {
document: &Document) -> DomRoot<HTMLTextAreaElement> {
Node::reflect_node(box HTMLTextAreaElement::new_inherited(local_name, prefix, document),
document,
HTMLTextAreaElementBinding::Wrap)
@ -156,7 +156,7 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
make_bool_setter!(SetDisabled, "disabled");
// https://html.spec.whatwg.org/multipage/#dom-fae-form
fn GetForm(&self) -> Option<Root<HTMLFormElement>> {
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
self.form_owner()
}
@ -232,7 +232,7 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
}
// https://html.spec.whatwg.org/multipage/#dom-lfe-labels
fn Labels(&self) -> Root<NodeList> {
fn Labels(&self) -> DomRoot<NodeList> {
self.upcast::<HTMLElement>().labels()
}
@ -441,7 +441,7 @@ impl VirtualMethods for HTMLTextAreaElement {
}
impl FormControl for HTMLTextAreaElement {
fn form_owner(&self) -> Option<Root<HTMLFormElement>> {
fn form_owner(&self) -> Option<DomRoot<HTMLFormElement>> {
self.form_owner.get()
}