mDirty = PR_TRUE;
if (!mOptions) return NS_OK;   mOptions->AddOption(aContent);   nsIFormControlFrame* fcFrame = nsnull; nsresult result = nsGenericHTMLElement::GetPrimaryFrame(this, fcFrame); if (NS_SUCCEEDED(result) && (nsnull != fcFrame)) { nsISelectControlFrame* selectFrame = nsnull; result = fcFrame->QueryInterface(nsISelectControlFrame::GetIID(),(void **) &selectFrame); if (NS_SUCCEEDED(result) && (nsnull != selectFrame)) { result = selectFrame->AddOption(mOptions->IndexOf(aContent)); } }  return result;
nsOptionList::AddOption(nsIContent* aOption){  // Just mark ourselves as dirty. The next time someone  // makes a call that requires us to look at the elements  // list, we'll recompute it.  mDirty = PR_TRUE;}