Bug 284950: DeCOMTaminate nsIContent::GetAttrNameAt

r/sr=bz


git-svn-id: svn://10.0.0.236/trunk@186678 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cvshook%sicking.cc
2005-12-28 21:52:39 +00:00
parent dd63e82e49
commit cf43ff4e7d
34 changed files with 224 additions and 373 deletions

View File

@@ -58,6 +58,7 @@
#include "nsIParserService.h"
#include "nsContentUtils.h"
#include "nsLWBrkCIID.h"
#include "nsAttrName.h"
#define kIndentStr NS_LITERAL_STRING(" ")
#define kLessThan NS_LITERAL_STRING("<")
@@ -540,8 +541,6 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
nsresult rv;
PRUint32 index, count;
nsAutoString nameStr, valueStr;
PRInt32 namespaceID;
nsCOMPtr<nsIAtom> attrName, attrPrefix;
count = aContent->GetAttrCount();
@@ -552,10 +551,9 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent,
// index is unsigned, hence index >= 0 is always true.
for (index = count; index > 0; ) {
--index;
aContent->GetAttrNameAt(index,
&namespaceID,
getter_AddRefs(attrName),
getter_AddRefs(attrPrefix));
const nsAttrName* name = aContent->GetAttrNameAt(index);
PRInt32 namespaceID = name->NamespaceID();
nsIAtom* attrName = name->LocalName();
// Filter out any attribute starting with [-|_]moz
const char* sharedName;