Temporary workaround so that plugins display correctly. This will change after support for

CSS borders and padding are added.
This commit is contained in:
amusil%netscape.com 1999-01-04 23:45:38 +00:00
Родитель 7aea7d38db
Коммит 0adb3694fe
2 изменённых файлов: 22 добавлений и 14 удалений

Просмотреть файл

@ -298,13 +298,6 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
PRUint32 width = EMBED_DEF_DIM;
PRUint32 height = EMBED_DEF_DIM;
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
mInstanceOwner->GetWidth(&width);
mInstanceOwner->GetHeight(&height);
}
if (aReflowState.HaveFixedContentWidth()) {
aMetrics.width = aReflowState.computedWidth;
haveWidth = PR_TRUE;
@ -314,6 +307,17 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
haveHeight = PR_TRUE;
}
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
mInstanceOwner->GetWidth(&width);
mInstanceOwner->GetHeight(&height);
// XXX this is temporary fix so plugins display until we support padding
haveHeight = PR_FALSE;
haveWidth = PR_FALSE;
}
// XXX Temporary auto-sizing logic
if (!haveWidth) {
if (haveHeight) {

Просмотреть файл

@ -298,13 +298,6 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
PRUint32 width = EMBED_DEF_DIM;
PRUint32 height = EMBED_DEF_DIM;
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
mInstanceOwner->GetWidth(&width);
mInstanceOwner->GetHeight(&height);
}
if (aReflowState.HaveFixedContentWidth()) {
aMetrics.width = aReflowState.computedWidth;
haveWidth = PR_TRUE;
@ -314,6 +307,17 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
haveHeight = PR_TRUE;
}
// the first time, mInstanceOwner will be null, so we a temporary default
if(mInstanceOwner != nsnull)
{
mInstanceOwner->GetWidth(&width);
mInstanceOwner->GetHeight(&height);
// XXX this is temporary fix so plugins display until we support padding
haveHeight = PR_FALSE;
haveWidth = PR_FALSE;
}
// XXX Temporary auto-sizing logic
if (!haveWidth) {
if (haveHeight) {