Bug 3302. Fixed DOM calls to effect (more or less) the right change on the content model, modulo Bug 3275. This was causing asserts to fire whenever you called SetAttribute().
git-svn-id: svn://10.0.0.236/trunk@22040 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user