mDirty = PR_TRUE;
if (!mOptions) return NS_OK;   mOptions->AddOption(aContent);   nsIFormControlFrame* fcFrame = nsnull;  nsresult result = GetPrimaryFrame(this, fcFrame, PR_FALSE);  if (fcFrame) { nsISelectControlFrame* selectFrame = nsnull;  result = fcFrame->QueryInterface(NS_GET_IID(nsISelectControlFrame), (void **) &selectFrame);  if (NS_SUCCEEDED(result) && selectFrame) { nsCOMPtr<nsIPresContext> presContext;  GetPresContext(this, getter_AddRefs(presContext));  result = selectFrame->AddOption(presContext, mOptions->IndexOf(aContent)); } }  return result;
nsHTMLOptionCollection::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;}