Setting some default size to objects with unknown size, bug #8740

git-svn-id: svn://10.0.0.236/trunk@42851 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
av%netscape.com 1999-08-09 23:41:55 +00:00
parent 6933a8242b
commit e448cd23a9
2 changed files with 10 additions and 10 deletions

View File

@ -499,19 +499,19 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
// if no width and height attributes specified try to use whatever we already have.
// if no width and height attributes specified use embed_def_dim.
if(NS_OK != mInstanceOwner->GetWidth(&width))
{
width = aMetrics.width;
haveWidth = PR_TRUE;
width = EMBED_DEF_DIM;
haveWidth = PR_FALSE;
}
else
haveWidth = PR_FALSE;
if(NS_OK != mInstanceOwner->GetHeight(&height))
{
height = aMetrics.height;
haveHeight = PR_TRUE;
height = EMBED_DEF_DIM;
haveHeight = PR_FALSE;
}
else
haveHeight = PR_FALSE;

View File

@ -499,19 +499,19 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
// if no width and height attributes specified try to use whatever we already have.
// if no width and height attributes specified use embed_def_dim.
if(NS_OK != mInstanceOwner->GetWidth(&width))
{
width = aMetrics.width;
haveWidth = PR_TRUE;
width = EMBED_DEF_DIM;
haveWidth = PR_FALSE;
}
else
haveWidth = PR_FALSE;
if(NS_OK != mInstanceOwner->GetHeight(&height))
{
height = aMetrics.height;
haveHeight = PR_TRUE;
height = EMBED_DEF_DIM;
haveHeight = PR_FALSE;
}
else
haveHeight = PR_FALSE;