From a31f6306f96e963a61cfd320e329071af3e281b7 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 20 Nov 2004 00:02:56 +0000 Subject: [project @ 2004-11-20 00:02:56 by bursa] Improvements to overflow and scrolling: scrollbars now have most of the usual RISC OS behaviour. Better rendering of dotted and dashed borders. svn path=/import/netsurf/; revision=1363 --- render/layout.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 253ce648a..96255b540 100644 --- a/render/layout.c +++ b/render/layout.c @@ -355,10 +355,12 @@ void layout_block_find_dimensions(int available_width, struct box *box) box->width = layout_solve_width(available_width, width, margin, padding, border); - if (style->overflow == CSS_OVERFLOW_SCROLL) { - /* make space for vertical scrollbar */ + if (style->overflow == CSS_OVERFLOW_SCROLL || + style->overflow == CSS_OVERFLOW_AUTO) { + /* make space for scrollbars */ box->width -= SCROLLBAR_WIDTH; box->padding[RIGHT] += SCROLLBAR_WIDTH; + box->padding[BOTTOM] += SCROLLBAR_WIDTH; } if (box->object && box->object->type == CONTENT_HTML && @@ -423,7 +425,8 @@ int layout_solve_width(int available_width, int width, void layout_float_find_dimensions(int available_width, struct css_style *style, struct box *box) { - int scrollbar_width = style->overflow == CSS_OVERFLOW_SCROLL ? + int scrollbar_width = (style->overflow == CSS_OVERFLOW_SCROLL || + style->overflow == CSS_OVERFLOW_AUTO) ? SCROLLBAR_WIDTH : 0; layout_find_dimensions(available_width, style, @@ -461,6 +464,7 @@ void layout_float_find_dimensions(int available_width, } box->padding[RIGHT] += scrollbar_width; + box->padding[BOTTOM] += scrollbar_width; if (box->object) { /* floating replaced element, see 10.3.6 and 10.6.2 */ -- cgit v1.2.3