summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-07-13 18:21:50 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-07-13 18:21:50 +0100
commit779deb855921f307fcd451ad63eeeee9e060203f (patch)
tree31752cdadf4c1b0b98f2f0651eef038b252b640e /render/layout.c
parent0d3faeb4bd256883f4ec3fb4d391b9ceeec6866e (diff)
downloadnetsurf-779deb855921f307fcd451ad63eeeee9e060203f.tar.gz
netsurf-779deb855921f307fcd451ad63eeeee9e060203f.tar.bz2
Fix overflow handling issue.
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/render/layout.c b/render/layout.c
index 975c8828f..5b0d8a004 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -5103,39 +5103,24 @@ static void layout_update_descendant_bbox(struct box *box, struct box *child,
overflow_y = css_computed_overflow_y(child->style);
}
- if (html_object == true ||
- overflow_x != CSS_OVERFLOW_VISIBLE ||
- overflow_y != CSS_OVERFLOW_VISIBLE)
- layout_get_box_bbox(child, &child_desc_x0, &child_desc_y0,
- &child_desc_x1, &child_desc_y1);
-
if (child->style == NULL ||
(child->style &&
overflow_x == CSS_OVERFLOW_VISIBLE &&
- html_object == false)) {
- /* get child's descendant bbox relative to box */
- child_desc_x0 = child_x + child->descendant_x0;
- child_desc_x1 = child_x + child->descendant_x1;
- } else {
- /* child's descendants don't matter; use child's border edge */
- /* get the bbox relative to box */
- child_desc_x0 += child_x;
- child_desc_x1 += child_x;
- }
-
- if (child->style == NULL ||
- (child->style &&
overflow_y == CSS_OVERFLOW_VISIBLE &&
html_object == false)) {
/* get child's descendant bbox relative to box */
+ child_desc_x0 = child_x + child->descendant_x0;
child_desc_y0 = child_y + child->descendant_y0;
+ child_desc_x1 = child_x + child->descendant_x1;
child_desc_y1 = child_y + child->descendant_y1;
} else {
/* child's descendants don't matter; use child's border edge */
layout_get_box_bbox(child, &child_desc_x0, &child_desc_y0,
&child_desc_x1, &child_desc_y1);
/* get the bbox relative to box */
+ child_desc_x0 += child_x;
child_desc_y0 += child_y;
+ child_desc_x1 += child_x;
child_desc_y1 += child_y;
}