diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index a75dd961756..d894f0567b4 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -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; diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index a75dd961756..d894f0567b4 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -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;