nsIEventStateManager* esm; if (NS_OK == aPresContext->GetEventStateManager(&esm)) { esm->SetContentState(this, NS_EVENT_STATE_FOCUS); NS_RELEASE(esm);
if (!aPresContext) return;   if (HasAttr(kNameSpaceID_None, nsHTMLAtoms::disabled)) { return;
nsHTMLSelectElement::SetFocus(nsIPresContext* aPresContext){  nsIEventStateManager* esm;  if (NS_OK == aPresContext->GetEventStateManager(&esm)) {    esm->SetContentState(this, NS_EVENT_STATE_FOCUS);    NS_RELEASE(esm);  }  // XXX Should focus only this presContext  Focus();  return NS_OK;}