Backed out changeset 963d95181b4b

This commit is contained in:
Marco Bonardo 2010-09-11 11:16:20 +02:00
Родитель 3e62b1ddaf
Коммит 2a0fd4177a
2 изменённых файлов: 1 добавлений и 30 удалений

Просмотреть файл

@ -191,9 +191,6 @@ public:
PRUint32 aFrameBufferLength,
PRUint64 aTime);
// Dispatch events that were raised while in the bfcache
nsresult DispatchPendingMediaEvents();
// Called by the decoder when some data has been downloaded or
// buffering/seeking has ended. aNextFrameAvailable is true when
// the data for the next frame is available. This method will
@ -535,10 +532,6 @@ protected:
// we're bound to when loading starts.
nsCOMPtr<nsIDocument> mLoadBlockedDoc;
// Contains names of events that have been raised while in the bfcache.
// These events get re-dispatched when the bfcache is exited.
nsTArray<nsString> mPendingEvents;
// Media loading flags. See:
// http://www.whatwg.org/specs/web-apps/current-work/#video)
nsMediaNetworkState mNetworkState;

Просмотреть файл

@ -59,8 +59,8 @@
#include "nsThreadUtils.h"
#include "nsIThreadInternal.h"
#include "nsContentUtils.h"
#include "nsFrameManager.h"
#include "nsIScriptSecurityManager.h"
#include "nsIXPConnect.h"
#include "jsapi.h"
@ -2245,13 +2245,6 @@ nsresult nsHTMLMediaElement::DispatchEvent(const nsAString& aName)
LOG_EVENT(PR_LOG_DEBUG, ("%p Dispatching event %s", this,
NS_ConvertUTF16toUTF8(aName).get()));
// Save events that occur while in the bfcache. These will be dispatched
// if the page comes out of the bfcache.
if (mPausedForInactiveDocument) {
mPendingEvents.AppendElement(aName);
return NS_OK;
}
return nsContentUtils::DispatchTrustedEvent(GetOwnerDoc(),
static_cast<nsIContent*>(this),
aName,
@ -2269,20 +2262,6 @@ nsresult nsHTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
return NS_OK;
}
nsresult nsHTMLMediaElement::DispatchPendingMediaEvents()
{
NS_ASSERTION(!mPausedForInactiveDocument,
"Must not be in bfcache when dispatching pending media events");
PRUint32 count = mPendingEvents.Length();
for (PRUint32 i = 0; i < count; ++i) {
DispatchAsyncEvent(mPendingEvents[i]);
}
mPendingEvents.Clear();
return NS_OK;
}
PRBool nsHTMLMediaElement::IsPotentiallyPlaying() const
{
// TODO:
@ -2333,7 +2312,6 @@ void nsHTMLMediaElement::NotifyOwnerDocumentActivityChanged()
mDecoder->Suspend();
} else {
mDecoder->Resume(PR_FALSE);
DispatchPendingMediaEvents();
if (!mPaused && !mDecoder->IsEnded()) {
mDecoder->Play();
}