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);