More fixes to make sure the right attribute namespace is being used.
git-svn-id: svn://10.0.0.236/trunk@22672 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user