Author: tlsa
Date: Mon Aug 30 17:30:43 2010
New Revision: 10730
URL:
http://source.netsurf-browser.org?rev=10730&view=rev
Log:
Fix object descendants and make space for scrollbars if required.
Modified:
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/render/layout.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=10730...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Mon Aug 30 17:30:43 2010
@@ -1009,7 +1009,9 @@
overflow = css_computed_overflow(box->style);
- if (overflow == CSS_OVERFLOW_SCROLL || overflow == CSS_OVERFLOW_AUTO) {
+ if (overflow == CSS_OVERFLOW_SCROLL || overflow == CSS_OVERFLOW_AUTO ||
+ (box->object &&
+ content_get_type(box->object) == CONTENT_HTML)) {
/* make space for scrollbars, unless height/width are AUTO */
if (which == BOTTOM && box->height != AUTO &&
(overflow == CSS_OVERFLOW_SCROLL ||
@@ -4496,6 +4498,13 @@
box->descendant_y1 = box->padding[TOP] + box->height +
box->padding[BOTTOM] + box->border[BOTTOM].width;
+ if (box->object && content_get_type(box->object) == CONTENT_HTML) {
+ if (box->descendant_x1 < content_get_width(box->object))
+ box->descendant_x1 = content_get_width(box->object);
+ if (box->descendant_y1 < content_get_height(box->object))
+ box->descendant_y1 = content_get_height(box->object);
+ }
+
if (box->type == BOX_INLINE || box->type == BOX_TEXT)
return;