mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 966002 - Buffer async events to media elements while event delivery is paused like we do for sync events. r=roc
This commit is contained in:
parent
0f24a925f1
commit
b6b377ce43
@ -3294,6 +3294,13 @@ nsresult HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
|
||||
LOG_EVENT(PR_LOG_DEBUG, ("%p Queuing 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 (mEventDeliveryPaused) {
|
||||
mPendingEvents.AppendElement(aName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> event = new nsAsyncEventRunner(aName, this);
|
||||
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user