Bug 520581 - HTML5 parser reverses attributes on some elements. r=bzbarsky.
This commit is contained in:
@@ -308,7 +308,8 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
nsIDocument* document = node->GetCurrentDoc();
|
||||
|
||||
PRInt32 len = attributes->getLength();
|
||||
for (PRInt32 i = 0; i < len; ++i) {
|
||||
for (PRInt32 i = len; i > 0;) {
|
||||
--i;
|
||||
// prefix doesn't need regetting. it is always null or a static atom
|
||||
// local name is never null
|
||||
nsCOMPtr<nsIAtom> localName = Reget(attributes->getLocalName(i));
|
||||
@@ -380,7 +381,8 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
}
|
||||
|
||||
PRInt32 len = attributes->getLength();
|
||||
for (PRInt32 i = 0; i < len; ++i) {
|
||||
for (PRInt32 i = len; i > 0;) {
|
||||
--i;
|
||||
// prefix doesn't need regetting. it is always null or a static atom
|
||||
// local name is never null
|
||||
nsCOMPtr<nsIAtom> localName = Reget(attributes->getLocalName(i));
|
||||
|
||||
Reference in New Issue
Block a user