From 85b179189cf0fc2ea06ef8a15001990eecaf47c5 Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Tue, 24 Aug 2004 22:20:51 +0000 Subject: [PATCH] Fixing bug 256711. Make object tags render their content in stead of defaulting to the 'default plugin' when we don't have a plugin suitable for the object tag. r+sr=brendan@mozilla.org, a=asa@mozilla.org git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@161191 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/html/base/src/nsObjectFrame.cpp | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 6fff132f117..2fbaf4cb190 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -724,9 +724,12 @@ nsObjectFrame::Init(nsIPresContext* aPresContext, } else aNewFrame->Destroy(aPresContext); - - return rv; } + + // Return early here as we don't want to render the "default + // plugin" since this object tag may have children that we'll load + // correctly. + return rv; } nsCAutoString type; @@ -738,18 +741,10 @@ nsObjectFrame::Init(nsIPresContext* aPresContext, embed->GetType(tmp); CopyUTF16toUTF8(tmp, type); } else { - nsCOMPtr object(do_QueryInterface(mContent)); + NS_ASSERTION(aContent->Tag() == nsHTMLAtoms::applet, + "Huh, aContent should be an applet tag here!"); - if (object) { - nsAutoString tmp; - object->GetType(tmp); - CopyUTF16toUTF8(tmp, type); - } else { - NS_ASSERTION(aContent->Tag() == nsHTMLAtoms::applet, - "Huh, aContent should be an applet tag here!"); - - type.Assign("application/x-java-vm"); - } + type.Assign("application/x-java-vm"); } nsCOMPtr inst;