nsTypedSelection::NotifySelectionListeners()
nsSelection::NotifySelectionListeners(SelectionType aType)
nsTypedSelection::NotifySelectionListeners(){  if (!mFrameSelection)    return NS_OK;//nothing to do   if (mFrameSelection->GetBatching()){    mFrameSelection->SetDirty();    return NS_OK;  }  PRInt32 cnt = mSelectionListeners.Count();    nsCOMPtr<nsIDOMDocument> domdoc;  nsCOMPtr<nsIPresShell> shell;  nsresult rv = GetPresShell(getter_AddRefs(shell));  if (NS_SUCCEEDED(rv) && shell)    domdoc = do_QueryInterface(shell->GetDocument());  short reason = mFrameSelection->PopReason();  for (PRInt32 i = 0; i < cnt; i++)  {    nsISelectionListener* thisListener = mSelectionListeners[i];    if (thisListener)      thisListener->NotifySelectionChanged(domdoc, this, reason);  }  return NS_OK;}