mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
More fixes to make sure the right attribute namespace is being used.
This commit is contained in:
parent
e50080b806
commit
1d7617de7f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user