From d91791f1ef1e4f1fe16e11f50a4a1226020abc9d Mon Sep 17 00:00:00 2001 From: "av%netscape.com" Date: Wed, 10 Mar 1999 20:43:07 +0000 Subject: [PATCH] Rendering alt context in object tag git-svn-id: svn://10.0.0.236/trunk@23562 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 8 -------- mozilla/layout/generic/nsObjectFrame.cpp | 9 ++++++++- mozilla/layout/html/base/src/nsObjectFrame.cpp | 9 ++++++++- mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp | 8 -------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 4638edbe6b2..d29ba436a4e 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -1931,14 +1931,6 @@ nsCSSFrameConstructor::ConstructFrameByTag(nsIPresContext* aPresContext, else if (nsHTMLAtoms::object == aTag) { isReplaced = PR_TRUE; rv = NS_NewObjectFrame(newFrame); -/* - nsIFrame *blockFrame; - NS_NewBlockFrame(blockFrame, 0); - blockFrame->Init(*aPresContext, aContent, newFrame, aStyleContext, nsnull); - newFrame = blockFrame; - newFrameIsFloaterContainer = PR_TRUE; - processChildren = PR_TRUE; -*/ } else if (nsHTMLAtoms::form == aTag) { rv = NS_NewFormFrame(newFrame); diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 999182ec8da..4c763310885 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -570,7 +570,6 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, nsISupports *container; nsIPluginHost *pm; nsIContentViewerContainer *cv; - nsresult rv; mInstanceOwner = new nsPluginInstanceOwner(); @@ -754,8 +753,16 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, aMetrics.height = kidDesiredSize.height; aMetrics.ascent = kidDesiredSize.height; aMetrics.descent = 0; + + aStatus = NS_FRAME_COMPLETE; + return NS_OK; } + //~~~ + nsIPresShell* presShell; + aPresContext.GetShell(&presShell); + presShell->CantRenderReplacedElement(&aPresContext, this); + NS_RELEASE(presShell); aStatus = NS_FRAME_COMPLETE; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 999182ec8da..4c763310885 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -570,7 +570,6 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, nsISupports *container; nsIPluginHost *pm; nsIContentViewerContainer *cv; - nsresult rv; mInstanceOwner = new nsPluginInstanceOwner(); @@ -754,8 +753,16 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext, aMetrics.height = kidDesiredSize.height; aMetrics.ascent = kidDesiredSize.height; aMetrics.descent = 0; + + aStatus = NS_FRAME_COMPLETE; + return NS_OK; } + //~~~ + nsIPresShell* presShell; + aPresContext.GetShell(&presShell); + presShell->CantRenderReplacedElement(&aPresContext, this); + NS_RELEASE(presShell); aStatus = NS_FRAME_COMPLETE; return NS_OK; } diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 4638edbe6b2..d29ba436a4e 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -1931,14 +1931,6 @@ nsCSSFrameConstructor::ConstructFrameByTag(nsIPresContext* aPresContext, else if (nsHTMLAtoms::object == aTag) { isReplaced = PR_TRUE; rv = NS_NewObjectFrame(newFrame); -/* - nsIFrame *blockFrame; - NS_NewBlockFrame(blockFrame, 0); - blockFrame->Init(*aPresContext, aContent, newFrame, aStyleContext, nsnull); - newFrame = blockFrame; - newFrameIsFloaterContainer = PR_TRUE; - processChildren = PR_TRUE; -*/ } else if (nsHTMLAtoms::form == aTag) { rv = NS_NewFormFrame(newFrame);