зеркало из https://github.com/mozilla/pjs.git
Bug 502103 - Crash [@ NS_NewEditorKeyListener] with <isindex action="">. r+sr=mrbkap
This commit is contained in:
Родитель
1bf48eb5e9
Коммит
e370dc7062
|
@ -2008,8 +2008,9 @@ public abstract class TreeBuilder<T> implements TokenHandler {
|
|||
);
|
||||
for (int i = 0; i < attributes.getLength(); i++) {
|
||||
AttributeName attributeQName = attributes.getAttributeName(i);
|
||||
if (!(AttributeName.NAME == attributeQName
|
||||
|| AttributeName.ACTION == attributeQName || AttributeName.PROMPT == attributeQName)) {
|
||||
if (AttributeName.NAME == attributeQName || AttributeName.PROMPT == attributeQName) {
|
||||
attributes.releaseValue(i);
|
||||
} else if (AttributeName.ACTION != attributeQName) {
|
||||
inputAttributes.addAttribute(
|
||||
attributeQName,
|
||||
attributes.getValue(i)
|
||||
|
@ -2019,8 +2020,6 @@ public abstract class TreeBuilder<T> implements TokenHandler {
|
|||
// ]NOCPP]
|
||||
|
||||
);
|
||||
} else {
|
||||
attributes.releaseValue(i);
|
||||
}
|
||||
}
|
||||
attributes.clearWithoutReleasingContents();
|
||||
|
|
|
@ -1094,10 +1094,10 @@ nsHtml5TreeBuilder::startTag(nsHtml5ElementName* elementName, nsHtml5HtmlAttribu
|
|||
inputAttributes->addAttribute(nsHtml5AttributeName::ATTR_NAME, nsHtml5Portability::newStringFromLiteral("isindex"));
|
||||
for (PRInt32 i = 0; i < attributes->getLength(); i++) {
|
||||
nsHtml5AttributeName* attributeQName = attributes->getAttributeName(i);
|
||||
if (!(nsHtml5AttributeName::ATTR_NAME == attributeQName || nsHtml5AttributeName::ATTR_ACTION == attributeQName || nsHtml5AttributeName::ATTR_PROMPT == attributeQName)) {
|
||||
inputAttributes->addAttribute(attributeQName, attributes->getValue(i));
|
||||
} else {
|
||||
if (nsHtml5AttributeName::ATTR_NAME == attributeQName || nsHtml5AttributeName::ATTR_PROMPT == attributeQName) {
|
||||
attributes->releaseValue(i);
|
||||
} else if (nsHtml5AttributeName::ATTR_ACTION != attributeQName) {
|
||||
inputAttributes->addAttribute(attributeQName, attributes->getValue(i));
|
||||
}
|
||||
}
|
||||
attributes->clearWithoutReleasingContents();
|
||||
|
|
Загрузка…
Ссылка в новой задаче