diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-08-04 14:59:48 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-08-04 14:59:48 +0100 |
commit | 96dbdee3a4795527ccd50035f9e1b18a95a4fbf1 (patch) | |
tree | 50f0eb8ea51bea1b8a6045d14a07552c5b6be967 | |
parent | 2ea5ca5805326a07311745e9cdb39fb30215716f (diff) | |
download | netsurf-96dbdee3a4795527ccd50035f9e1b18a95a4fbf1.tar.gz netsurf-96dbdee3a4795527ccd50035f9e1b18a95a4fbf1.tar.bz2 |
Remove unused code.
-rw-r--r-- | render/box.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/render/box.c b/render/box.c index 0c71a96b4..dd7c31f69 100644 --- a/render/box.c +++ b/render/box.c @@ -342,79 +342,6 @@ void box_bounds(struct box *box, struct rect *r) r->y1 = r->y0 + height; } -enum box_walk_dir { - BOX_WALK_CHILDREN, - BOX_WALK_PARENT, - BOX_WALK_NEXT_SIBLING, - BOX_WALK_FLOAT_CHILDREN, - BOX_WALK_NEXT_FLOAT_SIBLING -}; - -static inline struct box *box_move_xy(struct box *b, enum box_walk_dir dir, - int *x, int *y) -{ - switch (dir) { - case BOX_WALK_CHILDREN: - b = b->children; - *x += b->x; - *y += b->y; - return b; - - case BOX_WALK_PARENT: - *x -= b->x; - *y -= b->y; - return b->parent; - - case BOX_WALK_NEXT_SIBLING: - *x -= b->x; - *y -= b->y; - b = b->next; - *x += b->x; - *y += b->y; - return b; - - case BOX_WALK_FLOAT_CHILDREN: - b = b->float_children; - *x += b->x; - *y += b->y; - return b; - - case BOX_WALK_NEXT_FLOAT_SIBLING: - *x -= b->x; - *y -= b->y; - b = b->next_float; - *x += b->x; - *y += b->y; - return b; - } -} - - -static struct box *box_next_xy(struct box *b, int *x, int *y) -{ - assert(b != NULL); - - if (b->float_children != NULL) { - /* Next node is float child */ - b = box_move_xy(b, BOX_WALK_FLOAT_CHILDREN, x, y); - } else if (b->children != NULL) { - /* Next node is child */ - b = box_move_xy(b, BOX_WALK_CHILDREN, x, y); - } else if (b->type == BOX_FLOAT_LEFT || b->type == BOX_FLOAT_RIGHT) { - /* Go to next float sibling */ - b = box_move_xy(b, BOX_WALK_NEXT_FLOAT_SIBLING, x, y); - } else { - /* Go to next sibling, or nearest ancestor with next sibling. */ - while (b->next == NULL && b->parent != NULL) { - b = box_move_xy(b, BOX_WALK_PARENT, x, y); - } - - b = box_move_xy(b, BOX_WALK_NEXT_SIBLING, x, y); - } - - return b; -} - /** * Find the boxes at a point. |