handles "height" attribute

This commit is contained in:
buster%netscape.com 1998-11-20 01:03:45 +00:00
parent 70ac966d43
commit 90252c33df
2 changed files with 34 additions and 0 deletions

View File

@ -1099,6 +1099,23 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
break;
}
}
// height
aAttributes->GetAttribute(nsHTMLAtoms::height, value);
if (value.GetUnit() != eHTMLUnit_Null) {
nsStylePosition* position = (nsStylePosition*)
aContext->GetMutableStyleData(eStyleStruct_Position);
switch (value.GetUnit()) {
case eHTMLUnit_Percent:
position->mHeight.SetPercentValue(value.GetPercentValue());
break;
case eHTMLUnit_Pixel:
position->mHeight.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
break;
}
}
// border and frame
MapTableBorderInto(aAttributes, aContext, aPresContext);

View File

@ -1099,6 +1099,23 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
break;
}
}
// height
aAttributes->GetAttribute(nsHTMLAtoms::height, value);
if (value.GetUnit() != eHTMLUnit_Null) {
nsStylePosition* position = (nsStylePosition*)
aContext->GetMutableStyleData(eStyleStruct_Position);
switch (value.GetUnit()) {
case eHTMLUnit_Percent:
position->mHeight.SetPercentValue(value.GetPercentValue());
break;
case eHTMLUnit_Pixel:
position->mHeight.SetCoordValue(NSIntPixelsToTwips(value.GetPixelValue(), p2t));
break;
}
}
// border and frame
MapTableBorderInto(aAttributes, aContext, aPresContext);