mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
Added a comment to GetStyleDimension indicating that computed percentage
values are being handled incorrectly
This commit is contained in:
parent
d870f336d8
commit
35e6293e4b
@ -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>.
|
||||
|
@ -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>.
|
||||
|
Loading…
Reference in New Issue
Block a user