Clean up the cast calls

This commit is contained in:
Anthony Ramine 2015-10-07 14:55:02 +02:00
parent 13ea3ac413
commit 68014af78e
66 changed files with 412 additions and 718 deletions

View file

@ -737,8 +737,7 @@ impl XMLHttpRequest {
"readystatechange".to_owned(),
EventBubbles::DoesNotBubble,
EventCancelable::Cancelable);
let target = self.upcast::<EventTarget>();
event.r().fire(target);
event.fire(self.upcast());
}
fn process_headers_available(&self, cors_request: Option<CORSRequest>,
@ -921,12 +920,11 @@ impl XMLHttpRequest {
total.is_some(), loaded,
total.unwrap_or(0));
let target = if upload {
self.upload.upcast::<EventTarget>()
self.upload.upcast()
} else {
self.upcast::<EventTarget>()
self.upcast()
};
let event = progressevent.upcast::<Event>();
event.fire(target);
progressevent.upcast::<Event>().fire(target);
}
fn dispatch_upload_progress_event(&self, type_: DOMString, partial_load: Option<u64>) {