зеркало из https://github.com/mozilla/pjs.git
Bug 11488: Crash when deleting options from GFX selects
This commit is contained in:
Родитель
3689b9be81
Коммит
9c3cf449e6
|
@ -1607,10 +1607,10 @@ nsListControlFrame::RemoveOption(PRInt32 aIndex)
|
|||
GetSelectedIndexFromDOM(&selectedIndex); // comes from the DOM
|
||||
|
||||
if (aIndex == mSelectedIndex) {
|
||||
ToggleSelected(selectedIndex); // sets mSelectedIndex
|
||||
} else {
|
||||
mSelectedIndex = selectedIndex;
|
||||
// Don't need to deselect option as it is being removed anyway.
|
||||
SetContentSelected(selectedIndex, PR_TRUE); // Select the new selectedIndex
|
||||
}
|
||||
mSelectedIndex = selectedIndex;
|
||||
if (nsnull != mComboboxFrame) {
|
||||
mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event
|
||||
}
|
||||
|
|
|
@ -1607,10 +1607,10 @@ nsListControlFrame::RemoveOption(PRInt32 aIndex)
|
|||
GetSelectedIndexFromDOM(&selectedIndex); // comes from the DOM
|
||||
|
||||
if (aIndex == mSelectedIndex) {
|
||||
ToggleSelected(selectedIndex); // sets mSelectedIndex
|
||||
} else {
|
||||
mSelectedIndex = selectedIndex;
|
||||
// Don't need to deselect option as it is being removed anyway.
|
||||
SetContentSelected(selectedIndex, PR_TRUE); // Select the new selectedIndex
|
||||
}
|
||||
mSelectedIndex = selectedIndex;
|
||||
if (nsnull != mComboboxFrame) {
|
||||
mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче