Auto merge of #13412 - gterzian:failure_if_no_metadata, r=jdm

Invoke failure steps if there's no metadata

Media element network response processing code should invoke failure steps if there's no metadata.

Fixes #13375.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13412)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-27 12:49:56 -05:00 committed by GitHub
commit ec5ae8562d
26 changed files with 149 additions and 35 deletions

View file

@ -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");