content->SetFocus(aPresContext);
if (ShouldFocus(this)) {  content->SetFocus(aPresContext); }
nsHTMLLabelElement::HandleDOMEvent(nsPresContext* aPresContext,                                   nsEvent* aEvent,                                   nsIDOMEvent** aDOMEvent,                                   PRUint32 aFlags,                                   nsEventStatus* aEventStatus){  NS_ENSURE_ARG_POINTER(aEventStatus);  nsresult rv = nsGenericHTMLFormElement::HandleDOMEvent(aPresContext, aEvent,                                                         aDOMEvent, aFlags,                                                         aEventStatus);  if (NS_FAILED(rv))    return rv;  if (mHandlingEvent ||      *aEventStatus == nsEventStatus_eConsumeNoDefault ||      (aEvent->message != NS_MOUSE_LEFT_CLICK &&       aEvent->message != NS_FOCUS_CONTENT) ||      aFlags & NS_EVENT_FLAG_CAPTURE)    return NS_OK;  nsCOMPtr<nsIContent> content = GetForContent();  if (content && !EventTargetIn(aPresContext, aEvent, content, this)) {    mHandlingEvent = PR_TRUE;    switch (aEvent->message) {      case NS_MOUSE_LEFT_CLICK:        // Focus the for content.        content->SetFocus(aPresContext);        // This sends the event twice down parts of its path.  Oh well.        // This is needed for:        //  * Making radio buttons and checkboxes get checked.        //  * Triggering user event handlers. (For compatibility with IE,        //    we do only left click.  If we wanted to interpret the HTML        //    spec very narrowly, we would do nothing.  If we wanted to        //    do something sensible, we might send more events through        //    like this.)  See bug 7554, bug 49897, and bug 96813.        // XXX The event should probably have its target modified.  See        // bug 146066.  (But what if |aDOMEvent| is null and it gets        // created later?  If we forced the existence of an event and        // modified its target, we could replace |mHandlingEvent|.)        rv = content->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,                                     aFlags, aEventStatus);        break;      case NS_FOCUS_CONTENT:        // Since we don't have '-moz-user-focus: normal', the only time        // the event type will be NS_FOCUS_CONTENT will be when the accesskey        // is activated.  We've already redirected the |SetFocus| call in that        // case.        // Since focus doesn't bubble, this is basically the second part        // of redirecting |SetFocus|.        rv = content->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,                                     aFlags, aEventStatus);        break;    }    mHandlingEvent = PR_FALSE;  }  return rv;}