Author: tlsa
Date: Thu Nov 24 11:22:25 2011
New Revision: 13179
URL:
http://source.netsurf-browser.org?rev=13179&view=rev
Log:
Only make space for vertical box scrollbar if box has height set.
Modified:
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/render/layout.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=13179...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Thu Nov 24 11:22:25 2011
@@ -1258,12 +1258,18 @@
(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;