diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index b97bf74d2ba..47470c66b5e 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -1455,14 +1455,14 @@ static char kNameSpaceSeparator[] = ":"; // are built via the content model builders. // // Since mNameSpace will _always_ be null, specifying - // kNameSpaceID_Unknown allows us to at least match on the + // kNameSpaceID_None allows us to at least match on the // tag. You'll start seeing problems when the same name is used in // different namespaces. // // See http://bugzilla.mozilla.org/show_bug.cgi?id=3275 for more // info. - aNameSpaceID = kNameSpaceID_Unknown; // XXX should be kNameSpaceID_None + aNameSpaceID = kNameSpaceID_None; if (0 < prefix.Length()) { nsIAtom* nameSpaceAtom = NS_NewAtom(prefix); if (mNameSpace) { @@ -1722,7 +1722,8 @@ done: for (index = 0; index < count; index++) { const nsGenericAttribute* attr = (const nsGenericAttribute*)mAttributes->ElementAt(index); if (((attr->mNameSpaceID == aNameSpaceID) || - (aNameSpaceID == kNameSpaceID_Unknown)) && + (aNameSpaceID == kNameSpaceID_Unknown) || + (aNameSpaceID == kNameSpaceID_None)) && (attr->mName == aName)) { aResult = attr->mValue; if (0 < aResult.Length()) { diff --git a/mozilla/rdf/content/src/nsRDFElement.cpp b/mozilla/rdf/content/src/nsRDFElement.cpp index b97bf74d2ba..47470c66b5e 100644 --- a/mozilla/rdf/content/src/nsRDFElement.cpp +++ b/mozilla/rdf/content/src/nsRDFElement.cpp @@ -1455,14 +1455,14 @@ static char kNameSpaceSeparator[] = ":"; // are built via the content model builders. // // Since mNameSpace will _always_ be null, specifying - // kNameSpaceID_Unknown allows us to at least match on the + // kNameSpaceID_None allows us to at least match on the // tag. You'll start seeing problems when the same name is used in // different namespaces. // // See http://bugzilla.mozilla.org/show_bug.cgi?id=3275 for more // info. - aNameSpaceID = kNameSpaceID_Unknown; // XXX should be kNameSpaceID_None + aNameSpaceID = kNameSpaceID_None; if (0 < prefix.Length()) { nsIAtom* nameSpaceAtom = NS_NewAtom(prefix); if (mNameSpace) { @@ -1722,7 +1722,8 @@ done: for (index = 0; index < count; index++) { const nsGenericAttribute* attr = (const nsGenericAttribute*)mAttributes->ElementAt(index); if (((attr->mNameSpaceID == aNameSpaceID) || - (aNameSpaceID == kNameSpaceID_Unknown)) && + (aNameSpaceID == kNameSpaceID_Unknown) || + (aNameSpaceID == kNameSpaceID_None)) && (attr->mName == aName)) { aResult = attr->mValue; if (0 < aResult.Length()) { diff --git a/mozilla/rdf/content/src/nsRDFXULBuilder.cpp b/mozilla/rdf/content/src/nsRDFXULBuilder.cpp index e691355e920..e1a69436f7a 100644 --- a/mozilla/rdf/content/src/nsRDFXULBuilder.cpp +++ b/mozilla/rdf/content/src/nsRDFXULBuilder.cpp @@ -1787,7 +1787,7 @@ RDFXULBuilderImpl::GetResource(PRInt32 aNameSpaceID, // XXX check to see if we need to insert a '/' or a '#' nsAutoString tag(aNameAtom->GetUnicode()); - if (uri.Last() != '#' && uri.Last() != '/' && tag.First() != '#') + if (0 < uri.Length() && uri.Last() != '#' && uri.Last() != '/' && tag.First() != '#') uri.Append('#'); uri.Append(tag); diff --git a/mozilla/rdf/content/src/nsXULElement.cpp b/mozilla/rdf/content/src/nsXULElement.cpp index b97bf74d2ba..47470c66b5e 100644 --- a/mozilla/rdf/content/src/nsXULElement.cpp +++ b/mozilla/rdf/content/src/nsXULElement.cpp @@ -1455,14 +1455,14 @@ static char kNameSpaceSeparator[] = ":"; // are built via the content model builders. // // Since mNameSpace will _always_ be null, specifying - // kNameSpaceID_Unknown allows us to at least match on the + // kNameSpaceID_None allows us to at least match on the // tag. You'll start seeing problems when the same name is used in // different namespaces. // // See http://bugzilla.mozilla.org/show_bug.cgi?id=3275 for more // info. - aNameSpaceID = kNameSpaceID_Unknown; // XXX should be kNameSpaceID_None + aNameSpaceID = kNameSpaceID_None; if (0 < prefix.Length()) { nsIAtom* nameSpaceAtom = NS_NewAtom(prefix); if (mNameSpace) { @@ -1722,7 +1722,8 @@ done: for (index = 0; index < count; index++) { const nsGenericAttribute* attr = (const nsGenericAttribute*)mAttributes->ElementAt(index); if (((attr->mNameSpaceID == aNameSpaceID) || - (aNameSpaceID == kNameSpaceID_Unknown)) && + (aNameSpaceID == kNameSpaceID_Unknown) || + (aNameSpaceID == kNameSpaceID_None)) && (attr->mName == aName)) { aResult = attr->mValue; if (0 < aResult.Length()) {