summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/handlers/html/box.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/handlers/html/box.c b/content/handlers/html/box.c
index d9e649558..30cb4e2a0 100644
--- a/content/handlers/html/box.c
+++ b/content/handlers/html/box.c
@@ -307,11 +307,11 @@ void box_coords(struct box *box, int *x, int *y)
*y = box->y;
while (box->parent) {
if (box_is_float(box)) {
- do {
- box = box->parent;
- } while (!box->float_children);
- } else
+ assert(box->float_container);
+ box = box->float_container;
+ } else {
box = box->parent;
+ }
*x += box->x - scrollbar_get_offset(box->scroll_x);
*y += box->y - scrollbar_get_offset(box->scroll_y);
}