зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373739 - Constrain widget size to screen size in headless mode. r=jrmuizel
Every other widget backend ensures widget size is bounded to screen size, but this check was missing from headless. MozReview-Commit-ID: 6bKIAkdRxoO --HG-- extra : rebase_source : 6494a347aba323b977b845a1b70555fb1ab53864
This commit is contained in:
Родитель
f0a3973e54
Коммит
f2f89289d9
|
@ -161,8 +161,11 @@ HeadlessWidget::Resize(double aWidth,
|
|||
double aHeight,
|
||||
bool aRepaint)
|
||||
{
|
||||
mBounds.SizeTo(LayoutDeviceIntSize(NSToIntRound(aWidth),
|
||||
NSToIntRound(aHeight)));
|
||||
int32_t width = NSToIntRound(aWidth);
|
||||
int32_t height = NSToIntRound(aHeight);
|
||||
ConstrainSize(&width, &height);
|
||||
mBounds.SizeTo(LayoutDeviceIntSize(width, height));
|
||||
|
||||
if (mLayerManager) {
|
||||
RefPtr<gfxContext> ctx = CreateDefaultTarget(IntSize(mBounds.width, mBounds.height));
|
||||
mLayerManager->AsBasicLayerManager()->SetDefaultTarget(ctx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче