mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 530322 - crash [@ nsWindowWatcher::SizeOpenedDocShellItem(nsIDocShellTreeItem*, nsIDOMWindow*, SizeSpec const&)] [r=bzbarsky]
This commit is contained in:
parent
83956299ff
commit
f67310964d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user