Fix for bug 230439 (Remove anonymous nodeinfomanager and other cleanup). r=caillon, sr=jst.

git-svn-id: svn://10.0.0.236/trunk@151491 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2004-01-18 10:22:22 +00:00
parent 909926e853
commit ec0b3d579c
4 changed files with 15 additions and 13 deletions

View File

@@ -2260,7 +2260,7 @@ HTMLContentSink::Init(nsIDocument* aDoc,
}
// Make head part
rv = mNodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("head"),
rv = mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::head,
nsnull, kNameSpaceID_None,
getter_AddRefs(nodeInfo));
NS_ENSURE_SUCCESS(rv, rv);
@@ -4022,7 +4022,7 @@ HTMLContentSink::ProcessBASETag(const nsIParserNode& aNode)
// Create content object
nsCOMPtr<nsIHTMLContent> element;
nsCOMPtr<nsINodeInfo> nodeInfo;
mNodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("base"), nsnull,
mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::base, nsnull,
kNameSpaceID_None,
getter_AddRefs(nodeInfo));
@@ -4174,7 +4174,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode)
// Create content object
nsCOMPtr<nsINodeInfo> nodeInfo;
rv = mNodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("meta"), nsnull,
rv = mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::meta, nsnull,
kNameSpaceID_None,
getter_AddRefs(nodeInfo));
NS_ENSURE_SUCCESS(rv, rv);

View File

@@ -49,7 +49,6 @@
#include "nsWidgetsCID.h"
#include "nsGfxScrollFrame.h"
#include "nsLayoutAtoms.h"
#include "nsIXMLContent.h"
#include "nsXULAtoms.h"
#include "nsHTMLAtoms.h"
#include "nsINameSpaceManager.h"
@@ -384,7 +383,7 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
NS_ENSURE_TRUE(nodeInfoManager, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfo> nodeInfo;
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("scrollbar"), nsnull,
nodeInfoManager->GetNodeInfo(nsXULAtoms::scrollbar, nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
ScrollbarStyles styles = GetScrollbarStyles();
@@ -409,7 +408,7 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
}
if (canHaveHorizontal && canHaveVertical) {
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("scrollcorner"), nsnull,
nodeInfoManager->GetNodeInfo(nsXULAtoms::scrollcorner, nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
nsCOMPtr<nsIContent> content;
elementFactory->CreateInstanceByTag(nodeInfo, getter_AddRefs(content));

View File

@@ -49,7 +49,6 @@
#include "nsWidgetsCID.h"
#include "nsGfxScrollFrame.h"
#include "nsLayoutAtoms.h"
#include "nsIXMLContent.h"
#include "nsXULAtoms.h"
#include "nsHTMLAtoms.h"
#include "nsINameSpaceManager.h"
@@ -384,7 +383,7 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
NS_ENSURE_TRUE(nodeInfoManager, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfo> nodeInfo;
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("scrollbar"), nsnull,
nodeInfoManager->GetNodeInfo(nsXULAtoms::scrollbar, nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
ScrollbarStyles styles = GetScrollbarStyles();
@@ -409,7 +408,7 @@ nsGfxScrollFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
}
if (canHaveHorizontal && canHaveVertical) {
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("scrollcorner"), nsnull,
nodeInfoManager->GetNodeInfo(nsXULAtoms::scrollcorner, nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
nsCOMPtr<nsIContent> content;
elementFactory->CreateInstanceByTag(nodeInfo, getter_AddRefs(content));

View File

@@ -132,16 +132,20 @@ nsDocElementBoxFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
// create the top-secret popupgroup node. shhhhh!
nsCOMPtr<nsINodeInfo> nodeInfo;
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("popupgroup"), nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
rv = nodeInfoManager->GetNodeInfo(nsXULAtoms::popupgroup,
nsnull, kNameSpaceID_XUL,
getter_AddRefs(nodeInfo));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> content;
elementFactory->CreateInstanceByTag(nodeInfo, getter_AddRefs(content));
aAnonymousItems.AppendElement(content);
// create the top-secret default tooltip node. shhhhh!
nodeInfoManager->GetNodeInfo(NS_LITERAL_CSTRING("tooltip"), nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
rv = nodeInfoManager->GetNodeInfo(nsXULAtoms::tooltip, nsnull,
kNameSpaceID_XUL, getter_AddRefs(nodeInfo));
NS_ENSURE_SUCCESS(rv, rv);
elementFactory->CreateInstanceByTag(nodeInfo, getter_AddRefs(content));
content->SetAttr(nsnull, nsXULAtoms::defaultz, NS_LITERAL_STRING("true"), PR_FALSE);
aAnonymousItems.AppendElement(content);