Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsHTMLSelectElement.cpp File Reference
#include "nsCOMPtr.h"
#include "nsCOMArray.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIDOMNSHTMLSelectElement.h"
#include "nsIDOMNSXBLFormControl.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsITextContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsIForm.h"
#include "nsIFormSubmission.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIOptionElement.h"
#include "nsIEventStateManager.h"
#include "nsGenericDOMHTMLCollection.h"
#include "nsISelectElement.h"
#include "nsISelectControlFrame.h"
#include "nsIDOMHTMLOptionsCollection.h"
#include "nsIDOMNSHTMLOptionCollectn.h"
#include "nsGUIEvent.h"
#include "nsIPrivateDOMEvent.h"
#include "nsIBoxObject.h"
#include "nsIDOMNSDocument.h"
#include "nsIDOMDocumentEvent.h"
#include "nsXPCOM.h"
#include "nsPresState.h"
#include "nsIComponentManager.h"
#include "nsCheapSets.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsIFormControlFrame.h"
#include "nsIFrame.h"
#include "nsDOMError.h"
#include "nsRuleData.h"

Go to the source code of this file.

Classes

class  nsHTMLOptionCollection
 The collection of options in the select (what you get back when you do select.options in DOM) More...
class  nsSelectState
 The restore state used by select. More...
class  nsHTMLSelectElement
 Implementation of <select>. More...

Functions

 NS_HTML_CONTENT_INTERFACE_MAP_BEGIN (nsHTMLSelectElement, nsGenericHTMLFormElement) NS_HTML_CONTENT_INTERFACE_MAP_ENDNS_IMETHODIMP nsHTMLSelectElement
static PRBool IsOptGroup (nsIContent *aContent)
static void MapAttributesIntoRule (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void AddOptionsRecurse (nsIContent *aRoot, nsHTMLOptionCollection *aArray)

Function Documentation

static void AddOptionsRecurse ( nsIContent aRoot,
nsHTMLOptionCollection aArray 
) [static]

Definition at line 2073 of file nsHTMLSelectElement.cpp.

{
  nsIContent* child;
  for(PRUint32 i = 0; (child = aRoot->GetChildAt(i)); ++i) {
    nsCOMPtr<nsIDOMHTMLOptionElement> opt = do_QueryInterface(child);
    if (opt) {
      // If we fail here, then at least we've tried our best
      aArray->AppendOption(opt);
    }
    else if (IsOptGroup(child)) {
      AddOptionsRecurse(child, aArray);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool IsOptGroup ( nsIContent aContent) [static]

Definition at line 727 of file nsHTMLSelectElement.cpp.

{
  nsINodeInfo *ni = aContent->GetNodeInfo();

  return (ni && ni->Equals(nsHTMLAtoms::optgroup) &&
          aContent->IsContentOfType(nsIContent::eHTML));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void MapAttributesIntoRule ( const nsMappedAttributes aAttributes,
nsRuleData aData 
) [static]

Definition at line 1743 of file nsHTMLSelectElement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 503 of file nsHTMLSelectElement.cpp.

Here is the call graph for this function: