From e959db5706cec1827fcca8b840c8d005834813d0 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 22 Jan 1999 01:42:44 +0000 Subject: [PATCH] hookup toolbars and toolbox so they are instantiated when xul sees those tags. --- content/html/style/src/nsHTMLStyleSheet.cpp | 10 ++++++++++ layout/html/style/src/nsHTMLStyleSheet.cpp | 10 ++++++++++ layout/style/nsHTMLStyleSheet.cpp | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp index 6a03c33cb593..bc78a408fa27 100644 --- a/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/content/html/style/src/nsHTMLStyleSheet.cpp @@ -48,6 +48,8 @@ #ifdef INCLUDE_XUL #include "nsXULAtoms.h" +#include "nsToolboxFrame.h" +#include "nsToolbarFrame.h" #endif static NS_DEFINE_IID(kIHTMLStyleSheetIID, NS_IHTML_STYLE_SHEET_IID); @@ -1849,6 +1851,14 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = NS_NewTextControlFrame(aNewFrame); else if (aTag == nsXULAtoms::widget) rv = NS_NewObjectFrame(aNewFrame); + else if (aTag == nsXULAtoms::toolbox) { + processChildren = PR_TRUE; + rv = NS_NewToolboxFrame(aNewFrame); + } + else if (aTag == nsXULAtoms::toolbar) { + processChildren = PR_TRUE; + rv = NS_NewToolbarFrame(aNewFrame); + } } // If we succeeded in creating a frame then initialize it, process its diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp index 6a03c33cb593..bc78a408fa27 100644 --- a/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/layout/html/style/src/nsHTMLStyleSheet.cpp @@ -48,6 +48,8 @@ #ifdef INCLUDE_XUL #include "nsXULAtoms.h" +#include "nsToolboxFrame.h" +#include "nsToolbarFrame.h" #endif static NS_DEFINE_IID(kIHTMLStyleSheetIID, NS_IHTML_STYLE_SHEET_IID); @@ -1849,6 +1851,14 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = NS_NewTextControlFrame(aNewFrame); else if (aTag == nsXULAtoms::widget) rv = NS_NewObjectFrame(aNewFrame); + else if (aTag == nsXULAtoms::toolbox) { + processChildren = PR_TRUE; + rv = NS_NewToolboxFrame(aNewFrame); + } + else if (aTag == nsXULAtoms::toolbar) { + processChildren = PR_TRUE; + rv = NS_NewToolbarFrame(aNewFrame); + } } // If we succeeded in creating a frame then initialize it, process its diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp index 6a03c33cb593..bc78a408fa27 100644 --- a/layout/style/nsHTMLStyleSheet.cpp +++ b/layout/style/nsHTMLStyleSheet.cpp @@ -48,6 +48,8 @@ #ifdef INCLUDE_XUL #include "nsXULAtoms.h" +#include "nsToolboxFrame.h" +#include "nsToolbarFrame.h" #endif static NS_DEFINE_IID(kIHTMLStyleSheetIID, NS_IHTML_STYLE_SHEET_IID); @@ -1849,6 +1851,14 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = NS_NewTextControlFrame(aNewFrame); else if (aTag == nsXULAtoms::widget) rv = NS_NewObjectFrame(aNewFrame); + else if (aTag == nsXULAtoms::toolbox) { + processChildren = PR_TRUE; + rv = NS_NewToolboxFrame(aNewFrame); + } + else if (aTag == nsXULAtoms::toolbar) { + processChildren = PR_TRUE; + rv = NS_NewToolbarFrame(aNewFrame); + } } // If we succeeded in creating a frame then initialize it, process its