Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsHTMLTableSectionElement.cpp File Reference
#include "nsIDOMHTMLTableSectionElem.h"
#include "nsIDOMEventReceiver.h"
#include "nsMappedAttributes.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsContentList.h"
#include "nsRuleData.h"
#include "nsDOMError.h"
#include "nsIDocument.h"

Go to the source code of this file.

Classes

class  nsHTMLTableSectionElement

Functions

 NS_HTML_CONTENT_INTERFACE_MAP_BEGIN (nsHTMLTableSectionElement, nsGenericHTMLElement) NS_HTML_CONTENT_INTERFACE_MAP_END NS_IMETHODIMP nsHTMLTableSectionElement
static void MapAttributesIntoRule (const nsMappedAttributes *aAttributes, nsRuleData *aData)

Function Documentation

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

Definition at line 262 of file nsHTMLTableSectionElement.cpp.

{
  if (aData->mSID == eStyleStruct_Position) {
    // height: value
    if (aData->mPositionData->mHeight.GetUnit() == eCSSUnit_Null) {
      const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::height);
      if (value && value->Type() == nsAttrValue::eInteger)
        aData->mPositionData->mHeight.SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);   
    }
  }
  else if (aData->mSID == eStyleStruct_Text) {
    if (aData->mTextData->mTextAlign.GetUnit() == eCSSUnit_Null) {
      // align: enum
      const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::align);
      if (value && value->Type() == nsAttrValue::eEnum)
        aData->mTextData->mTextAlign.SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
    }
  }
  else if (aData->mSID == eStyleStruct_TextReset) {
    if (aData->mTextData->mVerticalAlign.GetUnit() == eCSSUnit_Null) {
      // valign: enum
      const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::valign);
      if (value && value->Type() == nsAttrValue::eEnum)
        aData->mTextData->mVerticalAlign.SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
    }
  }

  nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
  nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 106 of file nsHTMLTableSectionElement.cpp.

{
  *aValue = nsnull;

  if (!mRows) {
    mRows = new nsContentList(GetDocument(),
                              nsHTMLAtoms::tr,
                              mNodeInfo->NamespaceID(),
                              this,
                              PR_FALSE);

    NS_ENSURE_TRUE(mRows, NS_ERROR_OUT_OF_MEMORY);
  }

  NS_ADDREF(*aValue = mRows);
  return NS_OK;
}

Here is the call graph for this function: