Bug 213445: Treat not having mParent *or* not having mDocument as not being in the documnt to fix radiobuttons created through sinks other then the html-sink.

r=bryner sr=jst
This commit is contained in:
sicking%bigfoot.com 2003-11-07 16:53:46 +00:00
Родитель 12232b9727
Коммит 4059f5332e
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -953,7 +953,7 @@ nsHTMLInputElement::GetRadioGroupContainer()
nsIRadioGroupContainer* retval = nsnull;
if (mForm) {
CallQueryInterface(mForm, &retval);
} else if (mDocument) {
} else if (mDocument && mParent) {
CallQueryInterface(mDocument, &retval);
}
return retval;
@ -2629,7 +2629,7 @@ nsHTMLInputElement::AddedToRadioGroup()
// If the input element is not in a form and
// not in a document, we just need to return.
//
if (!mForm && !mDocument) {
if (!mForm && !(mDocument && mParent)) {
return NS_OK;
}
@ -2684,7 +2684,7 @@ nsHTMLInputElement::WillRemoveFromRadioGroup()
// If the input element is not in a form and
// not in a document, we just need to return.
//
if (!mForm && !mDocument) {
if (!mForm && !(mDocument && mParent)) {
return NS_OK;
}