Bug 754046 - Fix "ASSERTION: mRequiredRadioCount about to wrap below 0!". r=bz

This commit is contained in:
Mounir Lamouri 2012-05-14 22:32:39 +02:00
parent cc89bbdebb
commit 2d43ae5952

View File

@ -3310,17 +3310,15 @@ nsHTMLInputElement::AllowDrop()
void
nsHTMLInputElement::AddedToRadioGroup()
{
// Make sure not to notify if we're still being created by the parser
bool notify = !mParserCreating;
//
// If the input element is not in a form and
// not in a document, we just need to return.
//
if (!mForm && !(IsInDoc() && GetParent())) {
// If the element is neither in a form nor a document, there is no group so we
// should just stop here.
if (!mForm && !IsInDoc()) {
return;
}
// Make sure not to notify if we're still being created by the parser
bool notify = !mParserCreating;
//
// If the input element is checked, and we add it to the group, it will
// deselect whatever is currently selected in that group