return UpdateTextInputCommands(NS_ConvertASCIItoUCS2("select"));
return UpdateTextInputCommands(NS_LITERAL_STRING("select"));
nsTextInputListener::NotifySelectionChanged(nsIDOMDocument* aDoc, nsISelection* aSel, PRInt16 aReason){  PRBool collapsed;  if (!mFrame || !aDoc || !aSel || NS_FAILED(aSel->GetIsCollapsed(&collapsed)))    return NS_OK;  // Fire the select event  // The specs don't exactly say when we should fire the select event.  // IE: Whenever you add/remove a character to/from the selection. Also  //     each time for select all. Also if you get to the end of the text   //     field you will get new event for each keypress or a continuous   //     stream of events if you use the mouse. IE will fire select event   //     when the selection collapses to nothing if you are holding down  //     the shift or mouse button.  // Mozilla: If we have non-empty selection we will fire a new event for each  //          keypress (or mouseup) if the selection changed. Mozilla will also  //          create the event each time select all is called, even if everything  //          was previously selected, becase technically select all will first collapse  //          and then extend. Mozilla will never create an event if the selection   //          collapses to nothing.  if (!collapsed && (aReason & (nsISelectionListener::MOUSEUP_REASON |                                 nsISelectionListener::KEYPRESS_REASON |                                nsISelectionListener::SELECTALL_REASON)))  {    nsCOMPtr<nsIContent> content;    mFrame->GetFormContent(*getter_AddRefs(content));    if (content)     {      nsCOMPtr<nsIDocument> doc;      if (NS_SUCCEEDED(content->GetDocument(*getter_AddRefs(doc))))       {        if (doc)         {          nsCOMPtr<nsIPresShell> presShell;          doc->GetShellAt(0, getter_AddRefs(presShell));          if (presShell)           {            nsEventStatus status = nsEventStatus_eIgnore;            nsEvent event;            event.eventStructType = NS_EVENT;            event.message = NS_FORM_SELECTED;            presShell->HandleEventWithTarget(&event,mFrame,content,NS_EVENT_FLAG_INIT,&status);          }        }      }    }  }  // if the collapsed state did not change, don't fire notifications  if (mKnowSelectionCollapsed && collapsed == mSelectionWasCollapsed)    return NS_OK;    mSelectionWasCollapsed = collapsed;  mKnowSelectionCollapsed = PR_TRUE;  return UpdateTextInputCommands(NS_ConvertASCIItoUCS2("select"));}