зеркало из https://github.com/mozilla/gecko-dev.git
Back out 168117, outdated reviews and patch.
This commit is contained in:
Родитель
19fa8a0957
Коммит
de3f9404be
|
@ -292,7 +292,6 @@ public:
|
|||
NS_IMETHOD Show(PRBool aState);
|
||||
NS_IMETHOD IsVisible(PRBool& outState);
|
||||
|
||||
NS_IMETHOD SetParent(nsIWidget* aNewParent);
|
||||
virtual nsIWidget* GetParent(void);
|
||||
|
||||
NS_IMETHOD ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
||||
|
|
|
@ -972,38 +972,8 @@ NS_IMETHODIMP nsChildView::Show(PRBool aState)
|
|||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Reset the parent of this widget
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsChildView::SetParent(nsIWidget* aNewParent)
|
||||
{
|
||||
NS_ENSURE_ARG(aNewParent);
|
||||
|
||||
// make sure we stay alive
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip(this);
|
||||
|
||||
// remove us from our existing parent
|
||||
if (mParentWidget)
|
||||
mParentWidget->RemoveChild(this);
|
||||
[mView removeFromSuperview]; // we hold a ref to mView, so this is OK
|
||||
|
||||
// add us to the new parent
|
||||
aNewParent->AddChild(this);
|
||||
mParentWidget = aNewParent;
|
||||
mParentView = (NSView*)aNewParent->GetNativeData(NS_NATIVE_WIDGET);
|
||||
[mParentView addSubview:mView];
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get this widget's parent
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
nsIWidget* nsChildView::GetParent(void)
|
||||
nsIWidget*
|
||||
nsChildView::GetParent(void)
|
||||
{
|
||||
return mParentWidget;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче