Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

PRBool nsGenericHTMLElement::ParseAttribute ( nsIAtom *  aAttribute,
const nsAString &  aValue,
nsAttrValue &  aResult 
) [virtual, inherited]

Convert an attribute string value to attribute type based on the type of attribute. Called by SetAttr().

aAttribute to attribute to convert
aValue the string value to convert
aResult the nsAttrValue [OUT]
PR_TRUE if the parsing was successful, PR_FALSE otherwise
See also:

Reimplemented in nsHTMLSelectElement.

Definition at line 2299 of file nsGenericHTMLElement.cpp.

References nsGenericElement::mNodeInfo, and nsGenericHTMLElement::ParseStyleAttribute().

Referenced by nsHTMLSelectElement::ParseAttribute(), and nsGenericHTMLElement::SetAttr().

  if (aAttribute == nsHTMLAtoms::dir) {
    return aResult.ParseEnumValue(aValue, kDirTable);
  if (aAttribute == nsHTMLAtoms::style) {
    ParseStyleAttribute(this, mNodeInfo->NamespaceEquals(kNameSpaceID_XHTML),
                        aValue, aResult);
    return PR_TRUE;
  if (aAttribute == nsHTMLAtoms::id && !aValue.IsEmpty()) {

    return PR_TRUE;
  if (aAttribute == nsHTMLAtoms::kClass) {

    return PR_TRUE;

  if (aAttribute == nsHTMLAtoms::tabindex) {
    return aResult.ParseIntWithBounds(aValue, -32768, 32767);

  return PR_FALSE;

Generated by  Doxygen 1.6.0   Back to index