зеркало из https://github.com/mozilla/gecko-dev.git
Bug 17995: Don't reset selection when adding an option to a combobox, as it caused reframing and a crash. r=harishd a=choffman
This commit is contained in:
Родитель
69c4e300ac
Коммит
1ac4b75dcc
|
@ -1091,7 +1091,10 @@ nsComboboxControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex)
|
||||||
NS_RELEASE(listFrame);
|
NS_RELEASE(listFrame);
|
||||||
}
|
}
|
||||||
// If we added the first option, we might need to select it.
|
// If we added the first option, we might need to select it.
|
||||||
MakeSureSomethingIsSelected(aPresContext);
|
// We should call MakeSureSomethingIsSelected here, but since it
|
||||||
|
// it changes selection, which currently causes a reframe, and thus
|
||||||
|
// deletes the frame out from under the caller, causing a crash. (Bug 17995)
|
||||||
|
// XXX BAD MakeSureSomethingIsSelected(aPresContext);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1091,7 +1091,10 @@ nsComboboxControlFrame::AddOption(nsIPresContext* aPresContext, PRInt32 aIndex)
|
||||||
NS_RELEASE(listFrame);
|
NS_RELEASE(listFrame);
|
||||||
}
|
}
|
||||||
// If we added the first option, we might need to select it.
|
// If we added the first option, we might need to select it.
|
||||||
MakeSureSomethingIsSelected(aPresContext);
|
// We should call MakeSureSomethingIsSelected here, but since it
|
||||||
|
// it changes selection, which currently causes a reframe, and thus
|
||||||
|
// deletes the frame out from under the caller, causing a crash. (Bug 17995)
|
||||||
|
// XXX BAD MakeSureSomethingIsSelected(aPresContext);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче