frame->SetSelected(aRange,aFlags,PR_TRUE);
frame->SetSelected(aRange,aFlags,eSpreadAcross);
nsRangeList::selectFrames(nsIDOMRange *aRange, PRBool aFlags){  if (!aRange)     return NS_ERROR_NULL_POINTER;  nsCOMPtr<nsIContentIterator> iter;  nsresult result = nsComponentManager::CreateInstance(kCContentIteratorCID, nsnull,                                              nsIContentIterator::GetIID(),                                               getter_AddRefs(iter));  if ((NS_SUCCEEDED(result)) && iter)  {    iter->Init(aRange);    // loop through the content iterator for each content node    // for each text node:    // get the frame for the content, and from it the style context    // ask the style context about the property    nsCOMPtr<nsIContent> content;    PRBool drawWholeContent = PR_FALSE;    result = iter->First();    if (NS_FAILED(result))      return result;    nsIFrame *frame;    while (NS_COMFALSE == iter->IsDone())    {      result = iter->CurrentNode(getter_AddRefs(content));      if (NS_FAILED(result))        return result;      result = mTracker->GetPrimaryFrameFor(content, &frame);      if (NS_SUCCEEDED(result) && frame)         frame->SetSelected(aRange,aFlags,PR_TRUE);//spread from here to hit all frames in flow      result = iter->Next();      if (NS_FAILED(result))      	return result;    }  }  return result;}