Serialize attributes in the same order as they were parsed (and the opposite of

the order in which they were stored, which changed in bug 213347).

Bug 218919, r=sicking, sr=jst


git-svn-id: svn://10.0.0.236/trunk@147513 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2003-10-02 20:51:09 +00:00
parent 3e86919181
commit b1387a710d

View File

@@ -572,7 +572,11 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
NS_NAMED_LITERAL_STRING(_mozStr, "_moz");
for (index = 0; index < count; index++) {
// Loop backward over the attributes, since the order they are stored in is
// the opposite of the order they were parsed in (see bug 213347 for reason).
// index is unsigned, hence index >= 0 is always true.
for (index = count; index > 0; ) {
--index;
aContent->GetAttrNameAt(index,
&namespaceID,
getter_AddRefs(attrName),