nsHTMLValue value; aAttributes->GetAttribute(nsHTMLAtoms::cols, value); if (value.GetUnit() == eHTMLUnit_Integer)
const nsAttrValue* value = aAttributes->GetAttr(nsHTMLAtoms::width); if (!value || value->Type() != nsAttrValue::eInteger) {  value = aAttributes->GetAttr(nsHTMLAtoms::cols); }  if (value && value->Type() == nsAttrValue::eInteger) {
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,                      nsRuleData* aData){  if (aData->mSID == eStyleStruct_Font) {    // variable    if (aAttributes->GetAttr(nsHTMLAtoms::variable))      aData->mFontData->mFamily.SetStringValue(NS_LITERAL_STRING("serif"),                                               eCSSUnit_String);  }  else if (aData->mSID == eStyleStruct_Position) {    // cols: int (nav4 attribute)    nsHTMLValue value;    if (aData->mPositionData->mWidth.GetUnit() == eCSSUnit_Null) {      aAttributes->GetAttribute(nsHTMLAtoms::cols, value);      if (value.GetUnit() == eHTMLUnit_Integer)        aData->mPositionData->mWidth.SetFloatValue((float)value.GetIntValue(), eCSSUnit_Char);      // width: int (html4 attribute == nav4 cols)      aAttributes->GetAttribute(nsHTMLAtoms::width, value);      if (value.GetUnit() == eHTMLUnit_Integer)        aData->mPositionData->mWidth.SetFloatValue((float)value.GetIntValue(), eCSSUnit_Char);    }  }  else if (aData->mSID == eStyleStruct_Text) {    if (aData->mTextData->mWhiteSpace.GetUnit() == eCSSUnit_Null) {      // wrap: empty      if (aAttributes->GetAttr(nsHTMLAtoms::wrap))        aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_MOZ_PRE_WRAP, eCSSUnit_Enumerated);            // cols: int (nav4 attribute)      nsHTMLValue value;      aAttributes->GetAttribute(nsHTMLAtoms::cols, value);      if (value.GetUnit() == eHTMLUnit_Integer)        // Force wrap property on since we want to wrap at a width        // boundary not just a newline.        aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_MOZ_PRE_WRAP, eCSSUnit_Enumerated);            // width: int (html4 attribute == nav4 cols)      aAttributes->GetAttribute(nsHTMLAtoms::width, value);      if (value.GetUnit() == eHTMLUnit_Integer)        // Force wrap property on since we want to wrap at a width        // boundary not just a newline.        aData->mTextData->mWhiteSpace.SetIntValue(NS_STYLE_WHITESPACE_MOZ_PRE_WRAP, eCSSUnit_Enumerated);    }  }  nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);}