Bug 1986701 - Link mChildView only after mNativeLayerRoot is initialized. a=RyanVM DONTBUILD
Original Revision: https://phabricator.services.mozilla.com/D263616 Differential Revision: https://phabricator.services.mozilla.com/D263736
This commit is contained in:
committed by
rvandermeulen@mozilla.com
parent
dbbe73f5d7
commit
1c0eec2481
@@ -4609,12 +4609,15 @@ nsresult nsCocoaWindow::Create(nsIWidget* aParent, const DesktopIntRect& aRect,
|
||||
initWithFrame:mWindow.childViewFrameRectForCurrentBounds
|
||||
geckoChild:this];
|
||||
mChildView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
[contentView addSubview:mChildView];
|
||||
|
||||
mNativeLayerRoot =
|
||||
NativeLayerRootCA::CreateForCALayer(mChildView.rootCALayer);
|
||||
mNativeLayerRoot->SetBackingScale(BackingScaleFactor());
|
||||
|
||||
// Link mChildView into the native NSView hierarchy only after
|
||||
// mNativeLayerRoot is initialized. This resolves bug 1986701.
|
||||
[contentView addSubview:mChildView];
|
||||
|
||||
[WindowDataMap.sharedWindowDataMap ensureDataForWindow:mWindow];
|
||||
|
||||
NS_ASSERTION(!mTextInputHandler, "mTextInputHandler has already existed");
|
||||
|
||||
Reference in New Issue
Block a user