From 0b542b62ed275b15cde3df8648971a845942d826 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Mon, 1 Feb 1999 23:06:49 +0000 Subject: [PATCH] Force an nsXULAtoms::AddrefAtoms to ensure that the XUL atoms and namespace are created in the layout DLL before trying to refer to them. (a=hyatt%netscape.com) --- content/html/style/src/nsHTMLStyleSheet.cpp | 7 ++++++- layout/html/style/src/nsHTMLStyleSheet.cpp | 7 ++++++- layout/style/nsHTMLStyleSheet.cpp | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp index 7451779353a4..91063b7f659c 100644 --- a/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/content/html/style/src/nsHTMLStyleSheet.cpp @@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, if (aTag == nsnull) return NS_OK; + nsXULAtoms::AddrefAtoms(); PRInt32 nameSpaceID; if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) && nameSpaceID == nsXULAtoms::nameSpaceID) { @@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, // Add the table frame to the flow aFrameItems.AddChild(aNewFrame); } + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeitem) @@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems, aFixedItems); // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treechildren) @@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, } // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treerow) @@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext, aAbsoluteItems, aNewFrame, aFixedItems, allowEvents); aFrameItems.AddChild(aNewFrame); + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeindentation) @@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems.AddChild(placeholderFrame); } } - + nsXULAtoms::ReleaseAtoms(); return rv; } diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp index 7451779353a4..91063b7f659c 100644 --- a/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/layout/html/style/src/nsHTMLStyleSheet.cpp @@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, if (aTag == nsnull) return NS_OK; + nsXULAtoms::AddrefAtoms(); PRInt32 nameSpaceID; if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) && nameSpaceID == nsXULAtoms::nameSpaceID) { @@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, // Add the table frame to the flow aFrameItems.AddChild(aNewFrame); } + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeitem) @@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems, aFixedItems); // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treechildren) @@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, } // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treerow) @@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext, aAbsoluteItems, aNewFrame, aFixedItems, allowEvents); aFrameItems.AddChild(aNewFrame); + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeindentation) @@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems.AddChild(placeholderFrame); } } - + nsXULAtoms::ReleaseAtoms(); return rv; } diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp index 7451779353a4..91063b7f659c 100644 --- a/layout/style/nsHTMLStyleSheet.cpp +++ b/layout/style/nsHTMLStyleSheet.cpp @@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, if (aTag == nsnull) return NS_OK; + nsXULAtoms::AddrefAtoms(); PRInt32 nameSpaceID; if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) && nameSpaceID == nsXULAtoms::nameSpaceID) { @@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, // Add the table frame to the flow aFrameItems.AddChild(aNewFrame); } + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeitem) @@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems, aFixedItems); // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treechildren) @@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, } // No more work to do. + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treerow) @@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext, aAbsoluteItems, aNewFrame, aFixedItems, allowEvents); aFrameItems.AddChild(aNewFrame); + nsXULAtoms::ReleaseAtoms(); return rv; } else if (aTag == nsXULAtoms::treeindentation) @@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext, aFrameItems.AddChild(placeholderFrame); } } - + nsXULAtoms::ReleaseAtoms(); return rv; }