aData->mDisplayData->mDisplay = NS_STYLE_DISPLAY_BLOCK;
aData->mDisplayData->mDisplay.SetIntValue(NS_STYLE_DISPLAY_BLOCK, eCSSUnit_Enumerated);
SpacerMapAttributesIntoRule(const nsMappedAttributes* aAttributes,                            nsRuleData* aData){  nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);  nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);  if (aData->mSID == eStyleStruct_Position) {    const nsStyleDisplay* display = aData->mStyleContext->GetStyleDisplay();    PRBool typeIsBlock = (display->mDisplay == NS_STYLE_DISPLAY_BLOCK);    if (typeIsBlock) {      // width: value      if (aData->mPositionData->mWidth.GetUnit() == eCSSUnit_Null) {        const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::width);        if (value && value->Type() == nsAttrValue::eInteger) {          aData->mPositionData->            mWidth.SetFloatValue((float)value->GetIntegerValue(),                                 eCSSUnit_Pixel);        } else if (value && value->Type() == nsAttrValue::ePercent) {          aData->mPositionData->            mWidth.SetPercentValue(value->GetPercentValue());        }      }      // 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 (value && value->Type() == nsAttrValue::ePercent) {          aData->mPositionData->            mHeight.SetPercentValue(value->GetPercentValue());        }      }    } else {      // size: value      if (aData->mPositionData->mWidth.GetUnit() == eCSSUnit_Null) {        const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::size);        if (value && value->Type() == nsAttrValue::eInteger)          aData->mPositionData->            mWidth.SetFloatValue((float)value->GetIntegerValue(),                                 eCSSUnit_Pixel);      }    }  } else if (aData->mSID == eStyleStruct_Display) {    const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::align);    if (value && value->Type() == nsAttrValue::eEnum) {      PRInt32 align = value->GetEnumValue();      if (aData->mDisplayData->mFloat.GetUnit() == eCSSUnit_Null) {        if (align == NS_STYLE_TEXT_ALIGN_LEFT)          aData->mDisplayData->mFloat.SetIntValue(NS_STYLE_FLOAT_LEFT,                                                  eCSSUnit_Enumerated);        else if (align == NS_STYLE_TEXT_ALIGN_RIGHT)          aData->mDisplayData->mFloat.SetIntValue(NS_STYLE_FLOAT_RIGHT,                                                  eCSSUnit_Enumerated);      }    }    if (aData->mDisplayData->mDisplay == eCSSUnit_Null) {      const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::type);      if (value && value->Type() == nsAttrValue::eString) {        nsAutoString tmp(value->GetStringValue());        if (tmp.LowerCaseEqualsLiteral("line") ||            tmp.LowerCaseEqualsLiteral("vert") ||            tmp.LowerCaseEqualsLiteral("vertical") ||            tmp.LowerCaseEqualsLiteral("block")) {          // This is not strictly 100% compatible: if the spacer is given          // a width of zero then it is basically ignored.          aData->mDisplayData->mDisplay = NS_STYLE_DISPLAY_BLOCK;        }      }    }  }  nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);}