mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
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:
parent
fc4481baed
commit
4d050e90bd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user