зеркало из https://github.com/mozilla/pjs.git
Bug 530322 - crash [@ nsWindowWatcher::SizeOpenedDocShellItem(nsIDocShellTreeItem*, nsIDOMWindow*, SizeSpec const&)] [r=bzbarsky]
This commit is contained in:
Родитель
27959ba6a9
Коммит
b81777067e
|
@ -1921,7 +1921,14 @@ nsWindowWatcher::SizeOpenedDocShellItem(nsIDocShellTreeItem *aDocShellItem,
|
|||
}
|
||||
if (mainWidget) {
|
||||
nsCOMPtr<nsIDeviceContext> ctx = mainWidget->GetDeviceContext();
|
||||
devPixelsPerCSSPixel = float(ctx->AppUnitsPerCSSPixel()) / ctx->AppUnitsPerDevPixel();
|
||||
/* we might be called by an extension after mainWidget::OnDestroy() */
|
||||
if (ctx) {
|
||||
PRInt32 unitsPerDevPixel = ctx->AppUnitsPerDevPixel();
|
||||
if (unitsPerDevPixel) {
|
||||
devPixelsPerCSSPixel = float(ctx->AppUnitsPerCSSPixel()) /
|
||||
unitsPerDevPixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The current position and size will be unchanged if not specified
|
||||
|
|
Загрузка…
Ссылка в новой задаче