From 9a172ef481867a17b91f640bd0dbab4cbddc3bf6 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 1 May 2001 12:42:53 +0000 Subject: [PATCH] bug 5522 - initialize max element size. sr=attinasi, r=peterl. --- layout/generic/nsObjectFrame.cpp | 5 +++++ layout/html/base/src/nsObjectFrame.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 56aa5cba0e5..4f7c00258f8 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -678,6 +678,11 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext, // Get our desired size GetDesiredSize(aPresContext, aReflowState, aMetrics); + // initialize max element size if present + if (aMetrics.maxElementSize) { + aMetrics.maxElementSize->width = 0; + aMetrics.maxElementSize->height = 0; + } // could be an image nsIFrame * child = mFrames.FirstChild(); diff --git a/layout/html/base/src/nsObjectFrame.cpp b/layout/html/base/src/nsObjectFrame.cpp index 56aa5cba0e5..4f7c00258f8 100644 --- a/layout/html/base/src/nsObjectFrame.cpp +++ b/layout/html/base/src/nsObjectFrame.cpp @@ -678,6 +678,11 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext, // Get our desired size GetDesiredSize(aPresContext, aReflowState, aMetrics); + // initialize max element size if present + if (aMetrics.maxElementSize) { + aMetrics.maxElementSize->width = 0; + aMetrics.maxElementSize->height = 0; + } // could be an image nsIFrame * child = mFrames.FirstChild();