mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -6,7 +6,7 @@ use dom::attr::Attr;
|
|||
use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding::HTMLOptGroupElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::root::Root;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -36,7 +36,7 @@ impl HTMLOptGroupElement {
|
|||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLOptGroupElement> {
|
||||
document: &Document) -> DomRoot<HTMLOptGroupElement> {
|
||||
Node::reflect_node(box HTMLOptGroupElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
HTMLOptGroupElementBinding::Wrap)
|
||||
|
@ -73,7 +73,7 @@ impl VirtualMethods for HTMLOptGroupElement {
|
|||
el.set_enabled_state(!disabled_state);
|
||||
let options = el.upcast::<Node>().children().filter(|child| {
|
||||
child.is::<HTMLOptionElement>()
|
||||
}).map(|child| Root::from_ref(child.downcast::<HTMLOptionElement>().unwrap()));
|
||||
}).map(|child| DomRoot::from_ref(child.downcast::<HTMLOptionElement>().unwrap()));
|
||||
if disabled_state {
|
||||
for option in options {
|
||||
let el = option.upcast::<Element>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue