From 1a237535f78c91e8dc6ae2af2385cf96f6e2e6ea Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 12 Oct 2008 21:35:04 +0000 Subject: Better commenting of percentage height stuff. svn path=/trunk/netsurf/; revision=5551 --- render/layout.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/render/layout.c b/render/layout.c index faffd750b..0ce9ab995 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1040,10 +1040,14 @@ void layout_find_dimensions(int available_width, containing_block->style->height. height == CSS_HEIGHT_PERCENT) && containing_block->height != AUTO)) { + /* Box is absolutely positioned or its + * containing block has a valid specified + * height. (CSS 2.1 Section 10.5) */ *height = style->height.value.percent * containing_block->height / 100; } else { - /* else treated as auto; fall though */ + /* precentage height not permissible + * treat height as auto */ *height = AUTO; } break; @@ -3244,8 +3248,8 @@ bool layout_absolute(struct box *box, struct box *containing_block, &top, &right, &bottom, &left); /* Pass containing block into layout_find_dimensions via the float - * containing block box member. This is unused for absolutly positioned - * boxes because a box can't be floated and absolutly positioned. */ + * containing block box member. This is unused for absolutely positioned + * boxes because a box can't be floated and absolutely positioned. */ box->float_container = containing_block; layout_find_dimensions(available_width, box, box->style, &width, &height, &max_width, &min_width, -- cgit v1.2.3