зеркало из https://github.com/mozilla/pjs.git
Bug 391132 - Crash [@ nsAttrValue::ToString] with input type=image inside label and with display: table-cell
r=surkov.alexander a=dsicore
This commit is contained in:
Родитель
90eeabba62
Коммит
9b9b4e465b
|
@ -1639,6 +1639,14 @@ nsresult nsAccessible::AppendFlatStringFromContentNode(nsIContent *aContent, nsA
|
|||
|
||||
nsresult nsAccessible::AppendFlatStringFromSubtree(nsIContent *aContent, nsAString *aFlatString)
|
||||
{
|
||||
static nsIContent *startContent = nsnull;
|
||||
// never run into the same content node, to prevent infinite recursion
|
||||
if (startContent == aContent) {
|
||||
return NS_OK;
|
||||
}
|
||||
if (!startContent) {
|
||||
startContent = aContent;
|
||||
}
|
||||
nsresult rv = AppendFlatStringFromSubtreeRecurse(aContent, aFlatString);
|
||||
if (NS_SUCCEEDED(rv) && !aFlatString->IsEmpty()) {
|
||||
nsAString::const_iterator start, end;
|
||||
|
@ -1653,6 +1661,10 @@ nsresult nsAccessible::AppendFlatStringFromSubtree(nsIContent *aContent, nsAStri
|
|||
aFlatString->Truncate(aFlatString->Length() - spacesToTruncate);
|
||||
}
|
||||
|
||||
if (startContent == aContent) {
|
||||
// we are leaving the original invoking
|
||||
startContent = nsnull;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче