mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 956704 - Only suppress animation frames when entering a modal state. r=smaug
This commit is contained in:
parent
5acd3527ae
commit
dff9fc45ba
@ -1570,6 +1570,9 @@ nsGlobalWindow::FreeInnerObjects()
|
||||
while (mDoc->EventHandlingSuppressed()) {
|
||||
mDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eEvents, false);
|
||||
}
|
||||
|
||||
// Note: we don't have to worry about eAnimationsOnly suppressions because
|
||||
// they won't leak.
|
||||
}
|
||||
|
||||
// Remove our reference to the document and the document principal.
|
||||
@ -8282,7 +8285,7 @@ nsGlobalWindow::EnterModalState()
|
||||
|
||||
mSuspendedDoc = topDoc;
|
||||
if (mSuspendedDoc) {
|
||||
mSuspendedDoc->SuppressEventHandling(nsIDocument::eEvents);
|
||||
mSuspendedDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly);
|
||||
}
|
||||
}
|
||||
topWin->mModalStateDepth++;
|
||||
@ -8379,7 +8382,7 @@ nsGlobalWindow::LeaveModalState()
|
||||
|
||||
if (mSuspendedDoc) {
|
||||
nsCOMPtr<nsIDocument> currentDoc = topWin->GetExtantDoc();
|
||||
mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eEvents,
|
||||
mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly,
|
||||
currentDoc == mSuspendedDoc);
|
||||
mSuspendedDoc = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user