Added a comment to GetStyleDimension indicating that computed percentage

values are being handled incorrectly
This commit is contained in:
troy 1998-05-31 04:45:21 +00:00
parent d870f336d8
commit 35e6293e4b
2 changed files with 10 additions and 0 deletions

View File

@ -293,6 +293,11 @@ GetStyleDimension(nsIPresContext* aPresContext,
aResult = aCoord.GetCoordValue();
rv = PR_TRUE;
}
// XXX This isn't correct to use the containg block's width for a percentage
// height. According to the CSS2 spec: "The percentage is calculated with respect
// to the height of the generated box's containing block. If the height of the
// containing block is not specified explicitly (i.e., it depends on content
// height), the value is interpreted like 'auto'".
else if (eStyleUnit_Percent == unit) {
// CSS2 has specified that percentage width/height values are basd
// on the containing block's <B>width</B>.

View File

@ -293,6 +293,11 @@ GetStyleDimension(nsIPresContext* aPresContext,
aResult = aCoord.GetCoordValue();
rv = PR_TRUE;
}
// XXX This isn't correct to use the containg block's width for a percentage
// height. According to the CSS2 spec: "The percentage is calculated with respect
// to the height of the generated box's containing block. If the height of the
// containing block is not specified explicitly (i.e., it depends on content
// height), the value is interpreted like 'auto'".
else if (eStyleUnit_Percent == unit) {
// CSS2 has specified that percentage width/height values are basd
// on the containing block's <B>width</B>.