зеркало из 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) {
|
if (topWin->mModalStateDepth == 0) {
|
||||||
NS_ASSERTION(!mSuspendedDoc, "Shouldn't have mSuspendedDoc here!");
|
NS_ASSERTION(!topWin->mSuspendedDoc, "Shouldn't have mSuspendedDoc here!");
|
||||||
|
|
||||||
mSuspendedDoc = topDoc;
|
topWin->mSuspendedDoc = topDoc;
|
||||||
if (mSuspendedDoc) {
|
if (topDoc) {
|
||||||
mSuspendedDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly);
|
topDoc->SuppressEventHandling(nsIDocument::eAnimationsOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
topWin->mModalStateDepth++;
|
topWin->mModalStateDepth++;
|
||||||
|
@ -8881,11 +8881,11 @@ nsGlobalWindow::LeaveModalState()
|
||||||
if (NS_FAILED(NS_DispatchToCurrentThread(runner)))
|
if (NS_FAILED(NS_DispatchToCurrentThread(runner)))
|
||||||
NS_WARNING("failed to dispatch pending timeout runnable");
|
NS_WARNING("failed to dispatch pending timeout runnable");
|
||||||
|
|
||||||
if (mSuspendedDoc) {
|
if (topWin->mSuspendedDoc) {
|
||||||
nsCOMPtr<nsIDocument> currentDoc = topWin->GetExtantDoc();
|
nsCOMPtr<nsIDocument> currentDoc = topWin->GetExtantDoc();
|
||||||
mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly,
|
topWin->mSuspendedDoc->UnsuppressEventHandlingAndFireEvents(nsIDocument::eAnimationsOnly,
|
||||||
currentDoc == mSuspendedDoc);
|
currentDoc == topWin->mSuspendedDoc);
|
||||||
mSuspendedDoc = nullptr;
|
topWin->mSuspendedDoc = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче