diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 0d1627cceb84..8207879a54a3 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -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) { diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index 0d1627cceb84..8207879a54a3 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -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) {