From e8905988f4bb58da4ce4b2e20fa9de111a199f82 Mon Sep 17 00:00:00 2001 From: "av%netscape.com" Date: Sun, 13 Dec 1998 21:44:55 +0000 Subject: [PATCH] Making object tag to display alternative context git-svn-id: svn://10.0.0.236/trunk@16338 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/style/src/nsHTMLStyleSheet.cpp | 6 ++++++ mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp | 6 ++++++ mozilla/layout/style/nsHTMLStyleSheet.cpp | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index c504e929043..3a9882133f5 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp @@ -1586,6 +1586,12 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, } else if (nsHTMLAtoms::object == aTag) { rv = NS_NewObjectFrame(aNewFrame); + //rv = NS_NewObjectFrame(aContent, aParentFrame, aNewFrame); + nsIFrame *blockFrame; + NS_NewBlockFrame(blockFrame, 0); + blockFrame->Init(*aPresContext, aContent, aNewFrame, aStyleContext); + aNewFrame = blockFrame; + processChildren = PR_TRUE; } else if (nsHTMLAtoms::body == aTag) { rv = NS_NewBodyFrame(aNewFrame, NS_BODY_THE_BODY|NS_BODY_NO_AUTO_MARGINS); diff --git a/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp index c504e929043..3a9882133f5 100644 --- a/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp @@ -1586,6 +1586,12 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, } else if (nsHTMLAtoms::object == aTag) { rv = NS_NewObjectFrame(aNewFrame); + //rv = NS_NewObjectFrame(aContent, aParentFrame, aNewFrame); + nsIFrame *blockFrame; + NS_NewBlockFrame(blockFrame, 0); + blockFrame->Init(*aPresContext, aContent, aNewFrame, aStyleContext); + aNewFrame = blockFrame; + processChildren = PR_TRUE; } else if (nsHTMLAtoms::body == aTag) { rv = NS_NewBodyFrame(aNewFrame, NS_BODY_THE_BODY|NS_BODY_NO_AUTO_MARGINS); diff --git a/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index c504e929043..3a9882133f5 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/layout/style/nsHTMLStyleSheet.cpp @@ -1586,6 +1586,12 @@ HTMLStyleSheetImpl::ConstructFrameByTag(nsIPresContext* aPresContext, } else if (nsHTMLAtoms::object == aTag) { rv = NS_NewObjectFrame(aNewFrame); + //rv = NS_NewObjectFrame(aContent, aParentFrame, aNewFrame); + nsIFrame *blockFrame; + NS_NewBlockFrame(blockFrame, 0); + blockFrame->Init(*aPresContext, aContent, aNewFrame, aStyleContext); + aNewFrame = blockFrame; + processChildren = PR_TRUE; } else if (nsHTMLAtoms::body == aTag) { rv = NS_NewBodyFrame(aNewFrame, NS_BODY_THE_BODY|NS_BODY_NO_AUTO_MARGINS);