mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1583575
- Remove resize when creating GeckoView window. r=geckoview-reviewers,snorp
The other widget backends do not call resize during nsWindow creation and there's not really a need to do it. The bounds can just be adjusted at the beginning. Differential Revision: https://phabricator.services.mozilla.com/D62613 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
588ab9dda4
commit
f4176c2f7b
@ -1525,7 +1525,17 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
||||
}
|
||||
}
|
||||
|
||||
mBounds = aRect;
|
||||
// A default size of 1x1 confuses MobileViewportManager, so
|
||||
// use 0x0 instead. This is also a little more fitting since
|
||||
// we don't yet have a surface yet (and therefore a valid size)
|
||||
// and 0x0 is usually recognized as invalid.
|
||||
LayoutDeviceIntRect rect = aRect;
|
||||
if (aRect.width == 1 && aRect.height == 1) {
|
||||
rect.width = 0;
|
||||
rect.height = 0;
|
||||
}
|
||||
|
||||
mBounds = rect;
|
||||
|
||||
BaseCreate(nullptr, aInitData);
|
||||
|
||||
@ -1540,12 +1550,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
||||
mParent = parent;
|
||||
}
|
||||
|
||||
// A default size of 1x1 confuses MobileViewportManager, so
|
||||
// use 0x0 instead. This is also a little more fitting since
|
||||
// we don't yet have a surface yet (and therefore a valid size)
|
||||
// and 0x0 is usually recognized as invalid.
|
||||
Resize(0, 0, false);
|
||||
|
||||
CreateLayerManager();
|
||||
|
||||
#ifdef DEBUG_ANDROID_WIDGET
|
||||
|
Loading…
Reference in New Issue
Block a user