mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1058713 - Don't attempt to create a zero-sized CGContext for titlebar buttons. r=smichaud
This commit is contained in:
parent
91aec94103
commit
4a057edfbd
@ -2364,6 +2364,11 @@ nsChildView::UpdateTitlebarCGContext()
|
|||||||
dirtyTitlebarRegion.And(mDirtyTitlebarRegion, mTitlebarRect);
|
dirtyTitlebarRegion.And(mDirtyTitlebarRegion, mTitlebarRect);
|
||||||
mDirtyTitlebarRegion.SetEmpty();
|
mDirtyTitlebarRegion.SetEmpty();
|
||||||
|
|
||||||
|
if (mTitlebarRect.IsEmpty()) {
|
||||||
|
ReleaseTitlebarCGContext();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nsIntSize texSize = RectTextureImage::TextureSizeForSize(mTitlebarRect.Size());
|
nsIntSize texSize = RectTextureImage::TextureSizeForSize(mTitlebarRect.Size());
|
||||||
if (!mTitlebarCGContext ||
|
if (!mTitlebarCGContext ||
|
||||||
CGBitmapContextGetWidth(mTitlebarCGContext) != size_t(texSize.width) ||
|
CGBitmapContextGetWidth(mTitlebarCGContext) != size_t(texSize.width) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user