aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-11-04 11:03:54 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-11-04 11:03:54 +0530
commit4b9fa13f2f6a1aa38d180367426498f01f6414c9 (patch)
tree504c728f28548747b16a6b7e4e569ae809983aeb /components/script/dom/htmlformelement.rs
parent488459f80196a9d080dff9a57bfe0899c4c4ee68 (diff)
parent722aa86c895b42798d60bcada41b0175dbafba52 (diff)
downloadservo-4b9fa13f2f6a1aa38d180367426498f01f6414c9.tar.gz
servo-4b9fa13f2f6a1aa38d180367426498f01f6414c9.zip
Auto merge of #8305 - dzbarsky:roots, r=Ms2ger,
Get rid of a bunch of explicit derefs <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8305) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r--components/script/dom/htmlformelement.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index 6c9faa687bb..66a03f1557d 100644
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -155,7 +155,7 @@ impl HTMLFormElement {
// Step 1
let doc = document_from_node(self);
let win = window_from_node(self);
- let base = doc.r().url();
+ let base = doc.url();
// TODO: Handle browsing contexts
// TODO: Handle validation
let event = Event::new(GlobalRef::Window(win.r()),
@@ -163,7 +163,7 @@ impl HTMLFormElement {
EventBubbles::Bubbles,
EventCancelable::Cancelable);
event.fire(self.upcast());
- if event.r().DefaultPrevented() {
+ if event.DefaultPrevented() {
return;
}
// Step 6
@@ -211,8 +211,8 @@ impl HTMLFormElement {
}
// This is wrong. https://html.spec.whatwg.org/multipage/#planned-navigation
- win.r().main_thread_script_chan().send(MainThreadScriptMsg::Navigate(
- win.r().pipeline(), load_data)).unwrap();
+ win.main_thread_script_chan().send(MainThreadScriptMsg::Navigate(
+ win.pipeline(), load_data)).unwrap();
}
fn get_unclean_dataset(&self, submitter: Option<FormSubmitter>) -> Vec<FormDatum> {
@@ -225,11 +225,11 @@ impl HTMLFormElement {
_ => return None,
}
- if child.r().ancestors()
- .any(|a| Root::downcast::<HTMLDataListElement>(a).is_some()) {
+ if child.ancestors()
+ .any(|a| Root::downcast::<HTMLDataListElement>(a).is_some()) {
return None;
}
- match child.r().type_id() {
+ match child.type_id() {
NodeTypeId::Element(ElementTypeId::HTMLElement(element)) => {
match element {
HTMLElementTypeId::HTMLInputElement => {
@@ -315,14 +315,14 @@ impl HTMLFormElement {
EventBubbles::Bubbles,
EventCancelable::Cancelable);
event.fire(self.upcast());
- if event.r().DefaultPrevented() {
+ if event.DefaultPrevented() {
return;
}
// TODO: This is an incorrect way of getting controls owned
// by the form, but good enough until html5ever lands
for child in self.upcast::<Node>().traverse_preorder() {
- match child.r().type_id() {
+ match child.type_id() {
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement)) => {
child.downcast::<HTMLInputElement>().unwrap().reset();
}
@@ -466,7 +466,7 @@ pub trait FormControl: DerivedFrom<Element> + Reflectable {
let owner = elem.get_string_attribute(&atom!("form"));
if !owner.is_empty() {
let doc = document_from_node(elem);
- let owner = doc.r().GetElementById(owner);
+ let owner = doc.GetElementById(owner);
match owner {
Some(ref o) => {
let maybe_form = o.downcast::<HTMLFormElement>();