More fixes to make sure the right attribute namespace is being used.

This commit is contained in:
hyatt%netscape.com 1999-03-03 01:38:32 +00:00
parent e50080b806
commit 1d7617de7f
4 changed files with 9 additions and 9 deletions

View File

@ -1519,7 +1519,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
//
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {
@ -1560,7 +1560,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {

View File

@ -1519,7 +1519,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
//
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {
@ -1560,7 +1560,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {

View File

@ -1519,7 +1519,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
//
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {
@ -1560,7 +1560,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID,
// XXX Changing the object's identity is a big deal: we actually need to
// toss the kids and recreate them. We don't do that here.
if (mDocument && aName == kIdAtom) { // XXX regardless of namespace
if (mDocument && (aNameSpaceID == kNameSpaceID_None) && aName == kIdAtom) { // XXX regardless of namespace
nsCOMPtr<nsIRDFDocument> rdfDoc( do_QueryInterface(mDocument) );
NS_ASSERTION(rdfDoc != nsnull, "not an RDF document");
if (rdfDoc) {

View File

@ -971,7 +971,7 @@ XULContentSinkImpl::GetXULIDAttribute(const nsIParserNode& aNode,
SplitQualifiedName(key, nameSpaceID, attr);
// Look for XUL:ID
if (nameSpaceID != kNameSpaceID_XUL)
if (nameSpaceID != kNameSpaceID_None)
continue;
if (attr == kXULID) {
@ -1027,8 +1027,8 @@ XULContentSinkImpl::AddAttributes(const nsIParserNode& aNode,
// skip xul:id (and potentially others in the future). These
// are all "special" and should've been dealt with by the
// caller.
if ((nameSpaceID == kNameSpaceID_XUL) &&
(attr.EqualsIgnoreCase(kXULID)))
if ((nameSpaceID == kNameSpaceID_None) &&
(attr == kXULID))
continue;
v = aNode.GetValueAt(i);