mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Clean up the cast calls
This commit is contained in:
parent
13ea3ac413
commit
68014af78e
66 changed files with 412 additions and 718 deletions
|
@ -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>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue