зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1292502 Fix mismatch between mModalStateDepth and mSuspendedDoc r=smaug
This commit is contained in:
Родитель
6497612dd6
Коммит
f78b2736a5
|
@ -8789,11 +8789,11 @@ nsGlobalWindow::EnterModalState()
|
|||
}
|
||||
|
||||
if (topWin->mModalStateDepth == 0) {
|
||||
NS_ASSERTION(!mSuspendedDoc, "Shouldn't have mSuspendedDoc here!");
|
||||
NS_ASSERTION(!topWin->mSuspendedDoc, "Shouldn't have mSuspendedDoc here!");
|
||||
|
||||
mSuspendedDoc = topDoc;
|
||||
if (mSuspendedDoc) {
|
||||
mSuspendedDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly);
|
||||
topWin->mSuspendedDoc = topDoc;
|
||||
if (topDoc) {
|
||||
topDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly);
|
||||
}
|
||||
}
|
||||
topWin->mModalStateDepth++;
|
||||
|
@ -8881,11 +8881,11 @@ nsGlobalWindow::LeaveModalState()
|
|||
if (NS_FAILED(NS_DispatchToCurrentThread(runner)))
|
||||
NS_WARNING("failed to dispatch pending timeout runnable");
|
||||
|
||||
if (mSuspendedDoc) {
|
||||
if (topWin->mSuspendedDoc) {
|
||||
nsCOMPtr<nsIDocument> currentDoc = topWin->GetExtantDoc();
|
||||
mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly,
|
||||
currentDoc == mSuspendedDoc);
|
||||
mSuspendedDoc = nullptr;
|
||||
topWin->mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly,
|
||||
currentDoc == topWin->mSuspendedDoc);
|
||||
topWin->mSuspendedDoc = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче