Bug 1072342, the child process doesn't have a main widget, r=smaug

This commit is contained in:
Neil Deakin 2014-11-27 08:27:39 -05:00
Родитель d7c9eae1c7
Коммит 55f1700213
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -9824,14 +9824,14 @@ nsGlobalWindow::ActivateOrDeactivate(bool aActivate)
// Set / unset mIsActive on the top level window, which is used for the
// :-moz-window-inactive pseudoclass, and its sheet (if any).
nsCOMPtr<nsIWidget> mainWidget = GetMainWidget();
if (!mainWidget)
return;
// Get the top level widget (if the main widget is a sheet, this will
// be the sheet's top (non-sheet) parent).
nsCOMPtr<nsIWidget> topLevelWidget = mainWidget->GetSheetWindowParent();
if (!topLevelWidget) {
topLevelWidget = mainWidget;
nsCOMPtr<nsIWidget> topLevelWidget;
if (mainWidget) {
// Get the top level widget (if the main widget is a sheet, this will
// be the sheet's top (non-sheet) parent).
topLevelWidget = mainWidget->GetSheetWindowParent();
if (!topLevelWidget) {
topLevelWidget = mainWidget;
}
}
nsCOMPtr<nsPIDOMWindow> piMainWindow(