mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove intrinsic Root::r()
This commit is contained in:
parent
51bcf516c8
commit
0b3ab875f4
55 changed files with 275 additions and 310 deletions
|
@ -220,7 +220,7 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
}
|
||||
let filter = box ElementsFilter { form: Root::from_ref(self) };
|
||||
let window = window_from_node(self);
|
||||
let elements = HTMLFormControlsCollection::new(window.r(), self.upcast(), filter);
|
||||
let elements = HTMLFormControlsCollection::new(&window, self.upcast(), filter);
|
||||
self.elements.set(Some(&elements));
|
||||
elements
|
||||
}
|
||||
|
@ -706,11 +706,11 @@ pub enum FormSubmittableElement {
|
|||
impl FormSubmittableElement {
|
||||
fn as_event_target(&self) -> &EventTarget {
|
||||
match *self {
|
||||
FormSubmittableElement::ButtonElement(ref button) => button.r().upcast(),
|
||||
FormSubmittableElement::InputElement(ref input) => input.r().upcast(),
|
||||
FormSubmittableElement::ObjectElement(ref object) => object.r().upcast(),
|
||||
FormSubmittableElement::SelectElement(ref select) => select.r().upcast(),
|
||||
FormSubmittableElement::TextAreaElement(ref textarea) => textarea.r().upcast()
|
||||
FormSubmittableElement::ButtonElement(ref button) => button.upcast(),
|
||||
FormSubmittableElement::InputElement(ref input) => input.upcast(),
|
||||
FormSubmittableElement::ObjectElement(ref object) => object.upcast(),
|
||||
FormSubmittableElement::SelectElement(ref select) => select.upcast(),
|
||||
FormSubmittableElement::TextAreaElement(ref textarea) => textarea.upcast()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ pub trait FormControl: DerivedFrom<Element> + Reflectable {
|
|||
if self.to_element().has_attribute(attr) {
|
||||
input(self)
|
||||
} else {
|
||||
self.form_owner().map_or(DOMString::new(), |t| owner(t.r()))
|
||||
self.form_owner().map_or(DOMString::new(), |t| owner(&t))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -863,7 +863,7 @@ pub trait FormControl: DerivedFrom<Element> + Reflectable {
|
|||
if self.to_element().has_attribute(attr) {
|
||||
input(self)
|
||||
} else {
|
||||
self.form_owner().map_or(false, |t| owner(t.r()))
|
||||
self.form_owner().map_or(false, |t| owner(&t))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue