Backed out changeset c8013b27a0fa (bug 1239899) for failing W(2). r=backout

This commit is contained in:
Sebastian Hengst 2016-01-29 00:32:51 +01:00
parent c673f2121d
commit 3cc5c8ba63
5 changed files with 31 additions and 11 deletions

View File

@ -2714,21 +2714,18 @@ HTMLMediaElement::ReportMSETelemetry()
void HTMLMediaElement::UnbindFromTree(bool aDeep,
bool aNullParent)
{
RefPtr<HTMLMediaElement> self(this);
nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([self]() {
if (self->IsInDoc() || self->mNetworkState == nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
return;
if (!mPaused && mNetworkState != nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
Pause();
}
self->Pause();
if (self->mDecoder) {
self->mDecoder->NotifyOwnerActivityChanged();
}
});
RunInStableState(task);
mElementInTreeState = ELEMENT_NOT_INTREE_HAD_INTREE;
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
if (mDecoder) {
MOZ_ASSERT(IsHidden());
mDecoder->NotifyOwnerActivityChanged();
}
}
/* static */

View File

@ -0,0 +1,5 @@
[pause-move-to-other-document.html]
type: testharness
[paused state when moving to other document]
expected: FAIL

View File

@ -0,0 +1,5 @@
[pause-move-within-document.html]
type: testharness
[paused state when moving within a document]
expected: FAIL

View File

@ -0,0 +1,5 @@
[pause-remove-from-document.html]
type: testharness
[paused state when removing from a document]
expected: FAIL

View File

@ -0,0 +1,8 @@
[autoplay.html]
type: testharness
[audio.autoplay and internal pause steps]
expected: FAIL
[video.autoplay and internal pause steps]
expected: FAIL