PRInt8 index = GetIndexFromSelectionType(aType); if (index >=0)
if (!mSelectionListeners) return NS_ERROR_FAILURE;  if (mFrameSelection->GetBatching()){ mFrameSelection->SetDirty(); return NS_OK; } PRUint32 cnt; nsresult rv = mSelectionListeners->Count(&cnt); if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIDOMDocument> domdoc; nsCOMPtr<nsIDocument> doc; nsCOMPtr<nsIPresShell> shell; rv = GetPresShell(getter_AddRefs(shell)); if (NS_SUCCEEDED(rv) && shell)
nsSelection::NotifySelectionListeners(SelectionType aType){  PRInt8 index = GetIndexFromSelectionType(aType);  if (index >=0)  {    return mDomSelections[index]->NotifySelectionListeners();  }  return NS_ERROR_FAILURE;}