mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
ae14f0c452
commit
f82e3baeb5
@ -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