deCOMify nsIStyledContent::GetID (make it return we a weak pointer to the ID

atom).  Bug 244249, patch by jpl24 <jlurz24@gmail.com>, r=sicking, sr=bzbarsky
This commit is contained in:
bzbarsky@mit.edu
2004-11-23 17:21:37 +00:00
parent 7a3f099bf9
commit 6c92361b07
18 changed files with 68 additions and 100 deletions

View File

@@ -1039,6 +1039,17 @@ nsXMLContentSink::HandleStartElement(const PRUnichar *aName,
}
content->SetDocument(mDocument, PR_FALSE, PR_TRUE);
// Set the ID attribute atom on the node info object for this node
// This must occur before the attributes are added so the name
// of the id attribute is known.
if (aIndex != -1 && NS_SUCCEEDED(result)) {
nsCOMPtr<nsIAtom> IDAttr = do_GetAtom(aAtts[aIndex]);
if (IDAttr) {
nodeInfo->SetIDAttributeAtom(IDAttr);
}
}
// Set the attributes on the new content element
result = AddAttributes(aAtts, content);
@@ -1054,15 +1065,6 @@ nsXMLContentSink::HandleStartElement(const PRUnichar *aName,
PushContent(content);
}
// Set the ID attribute atom on the node info object for this node
if (aIndex != -1 && NS_SUCCEEDED(result)) {
nsCOMPtr<nsIAtom> IDAttr = do_GetAtom(aAtts[aIndex]);
if (IDAttr) {
nodeInfo->SetIDAttributeAtom(IDAttr);
}
}
#ifdef MOZ_XTF
if (nameSpaceID > kNameSpaceID_LastBuiltin)
content->BeginAddingChildren();