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

@ -11,7 +11,6 @@ use dom::bindings::js::{Root, RootedReference};
use dom::bindings::refcounted::Trusted;
use dom::bindings::utils::{Reflector, reflect_dom_object};
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventtarget::EventTarget;
use dom::storageevent::StorageEvent;
use dom::urlhelper::UrlHelper;
use ipc_channel::ipc;
@ -193,7 +192,6 @@ impl MainThreadRunnable for StorageEventRunnable {
ev_url.to_string(),
Some(storage)
);
let event = storage_event.upcast::<Event>();
let root_page = script_task.root_page();
for it_page in root_page.iter() {
@ -203,8 +201,7 @@ impl MainThreadRunnable for StorageEventRunnable {
// TODO: Such a Document object is not necessarily fully active, but events fired on such
// objects are ignored by the event loop until the Document becomes fully active again.
if ev_window.pipeline() != it_window.pipeline() {
let target = it_window.upcast::<EventTarget>();
event.fire(target);
storage_event.upcast::<Event>().fire(it_window.upcast());
}
}
}