From e448cd23a9776c679a99d3e720a9ea9693fcd948 Mon Sep 17 00:00:00 2001 From: "av%netscape.com" Date: Mon, 9 Aug 1999 23:41:55 +0000 Subject: [PATCH] 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 --- mozilla/layout/generic/nsObjectFrame.cpp | 10 +++++----- mozilla/layout/html/base/src/nsObjectFrame.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) 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;