aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmediaelement.rs
diff options
context:
space:
mode:
authorGregory <gterzian@users.noreply.github.com>2016-09-25 16:37:43 +0800
committerGregory <gterzian@users.noreply.github.com>2016-09-27 19:36:36 +0800
commit3e3349599eae0d841c7c20d1845044a5d7d902f9 (patch)
tree38faf8053cee9fe93a6b7fb1cd2816f9adb560f1 /components/script/dom/htmlmediaelement.rs
parent2474393d15b4e6259bdcf366d3423c3a6cd2eaac (diff)
downloadservo-3e3349599eae0d841c7c20d1845044a5d7d902f9.tar.gz
servo-3e3349599eae0d841c7c20d1845044a5d7d902f9.zip
checking for metadata in htmlmediaelement::response_complete
updated test expectations reverting changes to webgl test
Diffstat (limited to 'components/script/dom/htmlmediaelement.rs')
-rw-r--r--components/script/dom/htmlmediaelement.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 1f2b51f7ca9..5bbdd738079 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -105,8 +105,13 @@ impl AsyncResponseListener for HTMLMediaElementContext {
fn response_complete(&mut self, status: Result<(), NetworkError>) {
let elem = self.elem.root();
+ // => "If the media data can be fetched but is found by inspection to be in an unsupported
+ // format, or can otherwise not be rendered at all"
+ if !self.have_metadata {
+ elem.queue_dedicated_media_source_failure_steps();
+ }
// => "Once the entire media resource has been fetched..."
- if status.is_ok() {
+ else if status.is_ok() {
elem.change_ready_state(HAVE_ENOUGH_DATA);
elem.fire_simple_event("progress");