Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsHTMLLabelElement.cpp File Reference
#include "nsCOMPtr.h"
#include "nsIDOMHTMLLabelElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMEventReceiver.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsIFormControl.h"
#include "nsIForm.h"
#include "nsIDOMHTMLDocument.h"
#include "nsIDOMXULDocument.h"
#include "nsIDocument.h"
#include "nsIFormControlFrame.h"
#include "nsIPresShell.h"
#include "nsGUIEvent.h"
#include "nsIEventStateManager.h"
#include "nsIDOMHTMLInputElement.h"

Go to the source code of this file.

Classes

class  nsHTMLLabelElement

Functions

 NS_HTML_CONTENT_INTERFACE_MAP_BEGIN (nsHTMLLabelElement, nsGenericHTMLFormElement) NS_HTML_CONTENT_INTERFACE_MAP_ENDNS_IMETHODIMP nsHTMLLabelElement
static PRBool EventTargetIn (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent *aChild, nsIContent *aStop)
PRBool IsNonLabelFormControl (nsIContent *aContent)

Function Documentation

static PRBool EventTargetIn ( nsPresContext aPresContext,
nsEvent aEvent,
nsIContent aChild,
nsIContent aStop 
) [static]

Definition at line 194 of file nsHTMLLabelElement.cpp.

{
  nsCOMPtr<nsIContent> c;
  aPresContext->EventStateManager()->GetEventTargetContent(aEvent,
                                                           getter_AddRefs(c));
  nsIContent *content = c;
  while (content) {
    if (content == aChild) {
      return PR_TRUE;
    }

    if (content == aStop) {
      break;
    }

    content = content->GetParent();
  }
  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool IsNonLabelFormControl ( nsIContent aContent) [inline]

Definition at line 363 of file nsHTMLLabelElement.cpp.

{
  return aContent->IsContentOfType(nsIContent::eHTML_FORM_CONTROL) &&
         aContent->Tag() != nsHTMLAtoms::label;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 143 of file nsHTMLLabelElement.cpp.

Here is the call graph for this function: