aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
diff options
context:
space:
mode:
authorchansuke <chansuke@georepublic.de>2018-09-09 22:21:35 +0900
committerchansuke <chansuke@georepublic.de>2018-10-10 22:15:37 +0900
commit7b3cf27c69f1ed2d5372e2f1e50ce2aab84e05a7 (patch)
treec039399a0b0acaae90649a42644da87ee6dc0970 /components/script/dom/htmlmediaelement.rs
parent7a88a2e28ae20b9ce3dddaef1da25b7837088b2a (diff)
downloadservo-7b3cf27c69f1ed2d5372e2f1e50ce2aab84e05a7.tar.gz
servo-7b3cf27c69f1ed2d5372e2f1e50ce2aab84e05a7.zip
Add task source for media element
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r--components/script/dom/htmlmediaelement.rs25
1 files changed, 11 insertions, 14 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 84380c8d11f..3a1d439168c 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -278,7 +278,8 @@ impl HTMLMediaElement {
let state = self.ready_state.get();
let window = window_from_node(self);
- let task_source = window.dom_manipulation_task_source();
+ // FIXME(nox): Why are errors silenced here?
+ let task_source = window.media_element_task_source();
if self.Paused() {
// Step 6.1.
self.paused.set(false);
@@ -356,9 +357,7 @@ impl HTMLMediaElement {
let window = window_from_node(self);
let this = Trusted::new(self);
let generation_id = self.generation_id.get();
- // FIXME(nox): Why are errors silenced here?
- // FIXME(nox): Media element event task source should be used here.
- let _ = window.dom_manipulation_task_source().queue(
+ let _ = window.media_element_task_source().queue(
task!(internal_pause_steps: move || {
let this = this.root();
if generation_id != this.generation_id.get() {
@@ -400,8 +399,7 @@ impl HTMLMediaElement {
let this = Trusted::new(self);
let generation_id = self.generation_id.get();
// FIXME(nox): Why are errors silenced here?
- // FIXME(nox): Media element event task source should be used here.
- let _ = window.dom_manipulation_task_source().queue(
+ let _ = window.media_element_task_source().queue(
task!(notify_about_playing: move || {
let this = this.root();
if generation_id != this.generation_id.get() {
@@ -435,7 +433,7 @@ impl HTMLMediaElement {
}
let window = window_from_node(self);
- let task_source = window.dom_manipulation_task_source();
+ let task_source = window.media_element_task_source();
// Step 1.
match (old_ready_state, ready_state) {
@@ -590,7 +588,7 @@ impl HTMLMediaElement {
// Step 8.
let window = window_from_node(self);
- window.dom_manipulation_task_source().queue_simple_event(
+ window.media_element_task_source().queue_simple_event(
self.upcast(),
atom!("loadstart"),
&window,
@@ -667,7 +665,7 @@ impl HTMLMediaElement {
// Step 4.remote.1.2.
let window = window_from_node(self);
- window.dom_manipulation_task_source().queue_simple_event(
+ window.media_element_task_source().queue_simple_event(
self.upcast(),
atom!("suspend"),
&window,
@@ -676,7 +674,7 @@ impl HTMLMediaElement {
// Step 4.remote.1.3.
let this = Trusted::new(self);
window
- .dom_manipulation_task_source()
+ .media_element_task_source()
.queue(
task!(set_media_delay_load_event_flag_to_false: move || {
this.root().delay_load_event(false);
@@ -755,8 +753,7 @@ impl HTMLMediaElement {
let generation_id = self.generation_id.get();
self.take_pending_play_promises(Err(Error::NotSupported));
// FIXME(nox): Why are errors silenced here?
- // FIXME(nox): Media element event task source should be used here.
- let _ = window.dom_manipulation_task_source().queue(
+ let _ = window.media_element_task_source().queue(
task!(dedicated_media_source_failure_steps: move || {
let this = this.root();
if generation_id != this.generation_id.get() {
@@ -813,7 +810,7 @@ impl HTMLMediaElement {
}
let window = window_from_node(self);
- let task_source = window.dom_manipulation_task_source();
+ let task_source = window.media_element_task_source();
// Step 5.
let network_state = self.network_state.get();
@@ -1291,7 +1288,7 @@ impl FetchResponseListener for HTMLMediaElementContext {
// => "If mode is remote" step 2
if time::get_time() > self.next_progress_event {
let window = window_from_node(&*elem);
- window.dom_manipulation_task_source().queue_simple_event(
+ window.media_element_task_source().queue_simple_event(
elem.upcast(),
atom!("progress"),
&window,