Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsHTMLOptGroupElement.cpp File Reference
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsIFrame.h"
#include "nsIFormControlFrame.h"
#include "nsIEventStateManager.h"
#include "nsIDocument.h"
#include "nsISelectElement.h"
#include "nsIDOMHTMLSelectElement.h"

Go to the source code of this file.

Classes

class  nsHTMLOptGroupElement
 The implementation of <optgroup>. More...

Functions

 NS_HTML_CONTENT_INTERFACE_MAP_BEGIN (nsHTMLOptGroupElement, nsGenericHTMLElement) NS_HTML_CONTENT_INTERFACE_MAP_END nsresult nsHTMLOptGroupElement

Function Documentation

Definition at line 149 of file nsHTMLOptGroupElement.cpp.

{
  // Do not process any DOM events if the element is disabled
  PRBool disabled;
  nsresult rv = GetDisabled(&disabled);
  if (NS_FAILED(rv) || disabled) {
    return rv;
  }

  nsIFrame* frame = GetPrimaryFrame(PR_FALSE);
  if (frame) {
    const nsStyleUserInterface* uiStyle = frame->GetStyleUserInterface();
    if (uiStyle->mUserInput == NS_STYLE_USER_INPUT_NONE ||
        uiStyle->mUserInput == NS_STYLE_USER_INPUT_DISABLED) {
      return NS_OK;
    }
  }

  return nsGenericHTMLElement::HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
                                              aFlags, aEventStatus);
}

Here is the call graph for this function: