mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Only make space for vertical box scrollbar if box has height set.
svn path=/trunk/netsurf/; revision=13179
This commit is contained in:
parent
5970157fc7
commit
60a9d3af3b
@ -1258,12 +1258,18 @@ void layout_block_add_scrollbar(struct box *box, int which)
|
||||
(box->object && content_get_type(box->object) ==
|
||||
CONTENT_HTML)) {
|
||||
/* make space for scrollbars, unless height/width are AUTO */
|
||||
enum css_height_e htype;
|
||||
css_fixed height = 0;
|
||||
css_unit hunit = CSS_UNIT_PX;
|
||||
htype = css_computed_height(box->style, &height, &hunit);
|
||||
|
||||
if (which == BOTTOM && box->height != AUTO &&
|
||||
(overflow == CSS_OVERFLOW_SCROLL ||
|
||||
box_hscrollbar_present(box))) {
|
||||
box->padding[BOTTOM] += SCROLLBAR_WIDTH;
|
||||
}
|
||||
if (which == RIGHT && box->width != AUTO &&
|
||||
htype == CSS_HEIGHT_SET &&
|
||||
(overflow == CSS_OVERFLOW_SCROLL ||
|
||||
box_vscrollbar_present(box))) {
|
||||
box->width -= SCROLLBAR_WIDTH;
|
||||
|
Loading…
Reference in New Issue
Block a user