зеркало из https://github.com/mozilla/gecko-dev.git
[BeOS]Bug 229603, changing mView type from BView to nsViewBeOS. p=sergei_d, r=thesuckiestmail, BeOS-only, no sr required
This commit is contained in:
Родитель
f1f0ff2b51
Коммит
d6fc7fb875
|
@ -534,19 +534,19 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
|
|||
}
|
||||
}
|
||||
|
||||
BView *parent;
|
||||
nsViewBeOS *parent;
|
||||
if (nsnull != aParent) // has a nsIWidget parent
|
||||
{
|
||||
parent = ((aParent) ? (BView *)aParent->GetNativeData(NS_NATIVE_WIDGET) : nsnull);
|
||||
parent = ((aParent) ? (nsViewBeOS *)aParent->GetNativeData(NS_NATIVE_WIDGET) : nsnull);
|
||||
}
|
||||
else // has a nsNative parent
|
||||
{
|
||||
parent = (BView *)aNativeParent;
|
||||
parent = (nsViewBeOS *)aNativeParent;
|
||||
}
|
||||
|
||||
// Only popups have mBorderlessParents
|
||||
mParent = aParent;
|
||||
mView = CreateBeOSView();
|
||||
mView = new nsViewBeOS(this, BRect(0,0,0,0), "", 0, 0);
|
||||
if (mView)
|
||||
{
|
||||
#ifdef MOZ_DEBUG_WINDOW_CREATE
|
||||
|
@ -706,6 +706,9 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
|
|||
w->Show();
|
||||
}
|
||||
} // if eWindowType_Child
|
||||
|
||||
// There is BeOS API/app_server issue creating little/0-sized windows. See comment above
|
||||
// Checking here real size. Probably should be done only for toplevel objects.
|
||||
nsRect r(aRect);
|
||||
if (mView && mView->LockLooper())
|
||||
{
|
||||
|
@ -764,11 +767,6 @@ NS_METHOD nsWindow::Create(nsNativeWidget aParent,
|
|||
aParent));
|
||||
}
|
||||
|
||||
BView *nsWindow::CreateBeOSView()
|
||||
{
|
||||
return new nsViewBeOS(this, BRect(0,0,0,0), "", 0, 0);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Close this nsWindow
|
||||
|
@ -1709,6 +1707,7 @@ void* nsWindow::GetNativeData(PRUint32 aDataType)
|
|||
return (void *)(mView->Window());
|
||||
case NS_NATIVE_WIDGET:
|
||||
case NS_NATIVE_PLUGIN_PORT:
|
||||
return (void *)((nsViewBeOS *)mView);
|
||||
case NS_NATIVE_GRAPHIC:
|
||||
return (void *)((BView *)mView);
|
||||
case NS_NATIVE_COLORMAP:
|
||||
|
@ -2031,8 +2030,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
|
|||
BRegion reg;
|
||||
nsRegion nreg;
|
||||
reg.MakeEmpty();
|
||||
nsViewBeOS *bv = dynamic_cast<nsViewBeOS *>(mView);
|
||||
bool nonempty = bv->GetPaintRegion(®);
|
||||
bool nonempty = mView->GetPaintRegion(®);
|
||||
BRect br = reg.Frame();
|
||||
if (nonempty && br.IsValid())
|
||||
{
|
||||
|
@ -2618,8 +2616,7 @@ nsresult nsWindow::OnPaint(nsRect &r, const nsIRegion *nsr)
|
|||
if (mView->LockLooper())
|
||||
{
|
||||
BRect br(r.x, r.y, r.x + r.width - 1, r.y + r.height -1);
|
||||
nsViewBeOS *bv = dynamic_cast<nsViewBeOS *>(mView);
|
||||
bv->Validate(br);
|
||||
mView->Validate(br);
|
||||
mView->UnlockLooper();
|
||||
}
|
||||
|
||||
|
|
|
@ -210,11 +210,10 @@ protected:
|
|||
PRBool DispatchStandardEvent(PRUint32 aMsg);
|
||||
|
||||
PRBool DispatchWindowEvent(nsGUIEvent* event);
|
||||
BView* CreateBeOSView();
|
||||
void HideKids(PRBool state);
|
||||
|
||||
|
||||
BView *mView;
|
||||
nsViewBeOS* mView;
|
||||
PRBool mIsTopWidgetWindow;
|
||||
nsCOMPtr<nsIWidget> mParent;
|
||||
nsCOMPtr<nsIRegion> mUpdateArea;
|
||||
|
|
Загрузка…
Ссылка в новой задаче