mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
577370746e
commit
f87c2a8d76
291 changed files with 1774 additions and 1770 deletions
|
@ -7,7 +7,7 @@ use dom::bindings::cell::DomRefCell;
|
|||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::root::{MutNullableDom, Root};
|
||||
use dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
|
@ -46,7 +46,7 @@ impl HTMLObjectElement {
|
|||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLObjectElement> {
|
||||
document: &Document) -> DomRoot<HTMLObjectElement> {
|
||||
Node::reflect_node(box HTMLObjectElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
HTMLObjectElementBinding::Wrap)
|
||||
|
@ -76,7 +76,7 @@ impl<'a> ProcessDataURL for &'a HTMLObjectElement {
|
|||
|
||||
impl HTMLObjectElementMethods for HTMLObjectElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-cva-validity
|
||||
fn Validity(&self) -> Root<ValidityState> {
|
||||
fn Validity(&self) -> DomRoot<ValidityState> {
|
||||
let window = window_from_node(self);
|
||||
ValidityState::new(&window, self.upcast())
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ impl HTMLObjectElementMethods for HTMLObjectElement {
|
|||
make_setter!(SetType, "type");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fae-form
|
||||
fn GetForm(&self) -> Option<Root<HTMLFormElement>> {
|
||||
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
|
||||
self.form_owner()
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ impl VirtualMethods for HTMLObjectElement {
|
|||
}
|
||||
|
||||
impl FormControl for HTMLObjectElement {
|
||||
fn form_owner(&self) -> Option<Root<HTMLFormElement>> {
|
||||
fn form_owner(&self) -> Option<DomRoot<HTMLFormElement>> {
|
||||
self.form_owner.get()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue