Add media tasks to the DOM manipulation task queue.

This commit is contained in:
Josh Matthews 2016-04-28 17:18:06 -04:00
parent 53f9307fb7
commit 5918954edd

View file

@ -33,6 +33,8 @@ pub enum DOMManipulationTask {
FireSimpleEvent(Atom, Trusted<EventTarget>), FireSimpleEvent(Atom, Trusted<EventTarget>),
// https://html.spec.whatwg.org/multipage/#details-notification-task-steps // https://html.spec.whatwg.org/multipage/#details-notification-task-steps
FireToggleEvent(Box<Runnable + Send>), FireToggleEvent(Box<Runnable + Send>),
// Placeholder until there's a real media element task queue implementation
MediaTask(Box<Runnable + Send>),
// https://html.spec.whatwg.org/multipage/#planned-navigation // https://html.spec.whatwg.org/multipage/#planned-navigation
PlannedNavigation(Box<Runnable + Send>), PlannedNavigation(Box<Runnable + Send>),
// https://html.spec.whatwg.org/multipage/#send-a-storage-notification // https://html.spec.whatwg.org/multipage/#send-a-storage-notification
@ -54,6 +56,7 @@ impl DOMManipulationTask {
target.fire_simple_event(&*name); target.fire_simple_event(&*name);
} }
FireToggleEvent(runnable) => runnable.handler(), FireToggleEvent(runnable) => runnable.handler(),
MediaTask(runnable) => runnable.handler(),
PlannedNavigation(runnable) => runnable.handler(), PlannedNavigation(runnable) => runnable.handler(),
SendStorageNotification(runnable) => runnable.handler(script_thread) SendStorageNotification(runnable) => runnable.handler(script_thread)
} }