if ((NS_OK == ret) && (nsEventStatus_eIgnore == aEventStatus)) { switch (aEvent->message) { case NS_KEY_PRESS: { nsKeyEvent * keyEvent = (nsKeyEvent *)aEvent; if (keyEvent->keyCode == NS_VK_RETURN || keyEvent->charCode == 0x20) { PRInt32 type; GetType(&type); switch(type) { case NS_FORM_INPUT_CHECKBOX: case NS_FORM_INPUT_RADIO: ret = Click(); break; case NS_FORM_INPUT_BUTTON: case NS_FORM_INPUT_RESET: case NS_FORM_INPUT_SUBMIT: {   if (keyEvent->charCode == 0x20) {   nsIFormControlFrame* formControlFrame = nsnull; if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) { if (formControlFrame) { formControlFrame->MouseClicked(&aPresContext); } } } } break; } } } } }  return ret;
nsHTMLInputElement::HandleDOMEvent(nsIPresContext& aPresContext,                            nsEvent* aEvent,                            nsIDOMEvent** aDOMEvent,                            PRUint32 aFlags,                            nsEventStatus& aEventStatus){  return mInner.HandleDOMEvent(aPresContext, aEvent, aDOMEvent,                               aFlags, aEventStatus);}