summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-11-20 00:02:56 +0000
committerJames Bursa <james@netsurf-browser.org>2004-11-20 00:02:56 +0000
commita31f6306f96e963a61cfd320e329071af3e281b7 (patch)
tree46b39512b3c2460ea4a5c48f5511995162275e71 /render/layout.c
parente87e37ca80514fccb53523428208d9ed90b6fb78 (diff)
downloadnetsurf-a31f6306f96e963a61cfd320e329071af3e281b7.tar.gz
netsurf-a31f6306f96e963a61cfd320e329071af3e281b7.tar.bz2
[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
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c10
1 files changed, 7 insertions, 3 deletions
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 */