mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
handles "height" attribute
This commit is contained in:
parent
70ac966d43
commit
90252c33df
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user