nsHTMLSelectElement::RestoreState(nsIPresContext* aPresContext, nsIPresState* aState)
nsHTMLSelectElement::RestoreState(nsIPresState* aState)
nsHTMLSelectElement::RestoreState(nsIPresContext* aPresContext,                                  nsIPresState* aState){  // XXX This works right now, but since this is only called from  // RestoreState() in the frame, this will happen at the first frame  // creation.  If JavaScript makes changes before then, and the page  // is being reloaded, these changes will be lost.  //  // If RestoreState() is called a second time after SaveState() was  // called, this will do nothing.  // Get the presentation state object to retrieve our stuff out of.  nsAutoString stateStr;  nsresult rv = aState->GetStateProperty(NS_LITERAL_STRING("selecteditems"),                                         stateStr);  if (NS_SUCCEEDED(rv)) {    RestoreStateTo(&stateStr);    // Don't flush, if the frame doesn't exist yet it doesn't care if    // we're reset or not.    nsIFormControlFrame* formControlFrame = GetFormControlFrame(PR_FALSE);    if (formControlFrame) {      formControlFrame->OnContentReset();    }  }  return rv;}