mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 891424. Directly remove nsCocoaWindow's from their parent in Destroy(). This allows us to stop implementing GetParent because the mac widget code has some assumptions about that always returning null. r=smichaud
This reverts implementing GetParent on nsCocoaWindow's (ie back out bug 869151) because the mac widget code has some assumptions about that. Instead we just remove nsCocoaWindow's from their mParent in Destroy() which will still keep bug 869151 fixed.
This commit is contained in:
parent
8d74513780
commit
f8937eca28
@ -222,8 +222,6 @@ public:
|
||||
|
||||
NS_IMETHOD Destroy();
|
||||
|
||||
virtual nsIWidget* GetParent(void);
|
||||
|
||||
NS_IMETHOD Show(bool aState);
|
||||
virtual nsIWidget* GetSheetWindowParent(void);
|
||||
NS_IMETHOD Enable(bool aState);
|
||||
|
@ -516,6 +516,11 @@ NS_IMETHODIMP nsCocoaWindow::Destroy()
|
||||
mPopupContentView->Destroy();
|
||||
|
||||
nsBaseWidget::Destroy();
|
||||
// nsBaseWidget::Destroy() calls GetParent()->RemoveChild(this). But we
|
||||
// don't implement GetParent(), so we need to do the equivalent here.
|
||||
if (mParent) {
|
||||
mParent->RemoveChild(this);
|
||||
}
|
||||
nsBaseWidget::OnDestroy();
|
||||
|
||||
if (mFullScreen) {
|
||||
@ -536,11 +541,6 @@ NS_IMETHODIMP nsCocoaWindow::Destroy()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIWidget* nsCocoaWindow::GetParent()
|
||||
{
|
||||
return mParent;
|
||||
}
|
||||
|
||||
nsIWidget* nsCocoaWindow::GetSheetWindowParent(void)
|
||||
{
|
||||
if (mWindowType != eWindowType_sheet)
|
||||
|
Loading…
Reference in New Issue
Block a user