Bug 376468. Crash with Orca and combo boxes. Patch by Evan Yan. r=aaronlev

This commit is contained in:
aaronleventhal%moonset.net 2007-04-18 15:44:49 +00:00
Родитель 7aae9d41ec
Коммит 91dcb36ae0
1 изменённых файлов: 21 добавлений и 8 удалений

Просмотреть файл

@ -911,25 +911,38 @@ void nsHTMLComboboxAccessible::CacheChildren()
return;
}
nsHTMLComboboxListAccessible* listAccessible =
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
if (!mListAccessible) {
mListAccessible =
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
}
#ifdef COMBO_BOX_WITH_THREE_CHILDREN
buttonAccessible->SetNextSibling(listAccessible);
buttonAccessible->SetNextSibling(mListAccessible);
#else
SetFirstChild(listAccessible);
SetFirstChild(mListAccessible);
#endif
if (!listAccessible) {
if (!mListAccessible) {
return;
}
listAccessible->SetParent(this);
listAccessible->SetNextSibling(nsnull);
listAccessible->Init();
mListAccessible->SetParent(this);
mListAccessible->SetNextSibling(nsnull);
mListAccessible->Init();
++ mAccChildCount; // List accessible child successfully added
}
}
NS_IMETHODIMP nsHTMLComboboxAccessible::Shutdown()
{
nsAccessibleWrap::Shutdown();
if (mListAccessible) {
mListAccessible->Shutdown();
mListAccessible = nsnull;
}
return NS_OK;
}
/**
* As a nsHTMLComboboxAccessible we can have the following states:
* STATE_FOCUSED