mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Use GlobalScope in dispatch_to_listeners
This commit is contained in:
parent
ac5c4c2194
commit
5bdc5a4c48
1 changed files with 2 additions and 3 deletions
|
@ -5,7 +5,6 @@
|
|||
use devtools_traits::{StartedTimelineMarker, TimelineMarker, TimelineMarkerType};
|
||||
use dom::bindings::callback::ExceptionHandling::Report;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use dom::bindings::global::GlobalRoot;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{JS, Root, RootedReference};
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
|
@ -52,8 +51,8 @@ fn dispatch_to_listeners(event: &Event, target: &EventTarget, event_path: &[&Eve
|
|||
assert!(!event.stop_propagation());
|
||||
assert!(!event.stop_immediate());
|
||||
|
||||
let window = match target.global() {
|
||||
GlobalRoot::Window(window) => {
|
||||
let window = match Root::downcast::<Window>(target.global_scope()) {
|
||||
Some(window) => {
|
||||
if window.need_emit_timeline_marker(TimelineMarkerType::DOMEvent) {
|
||||
Some(window)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue