diff options
author | James Bursa <james@netsurf-browser.org> | 2006-10-08 22:46:25 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2006-10-08 22:46:25 +0000 |
commit | a785bc25f7d34a7121739219ccdc063e4ac8ba33 (patch) | |
tree | 405d361f065cc5a01ee19ca228eb7816c3bb0c93 /render/box.c | |
parent | d2469b806c00b82a708cd14caec8c9e3d1286833 (diff) | |
download | netsurf-a785bc25f7d34a7121739219ccdc063e4ac8ba33.tar.gz netsurf-a785bc25f7d34a7121739219ccdc063e4ac8ba33.tar.bz2 |
Modify implementation of absolute positioning to support "static positions". Absolutely positioned boxes are now in their original place in the tree instead of linked from absolute_children.
svn path=/trunk/netsurf/; revision=2984
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/render/box.c b/render/box.c index f31b636ec..506d94215 100644 --- a/render/box.c +++ b/render/box.c @@ -84,7 +84,6 @@ struct box * box_create(struct css_style *style, box->inline_end = NULL; box->float_children = NULL; box->next_float = NULL; - box->absolute_children = NULL; box->col = NULL; box->gadget = NULL; box->usemap = NULL; @@ -123,30 +122,6 @@ void box_add_child(struct box *parent, struct box *child) /** - * Add an absolutely positioned child to a box tree node. - * - * \param parent box giving birth - * \param child box to link as last child of parent - */ - -void box_add_absolute_child(struct box *parent, struct box *child) -{ - assert(parent); - assert(child); - - if (parent->absolute_children != 0) { /* has children already */ - child->next = parent->absolute_children; - parent->absolute_children->prev = child; - } else { /* this is the first child */ - child->next = 0; - } - - parent->absolute_children = child; - child->parent = parent; -} - - -/** * Insert a new box as a sibling to a box in a tree. * * \param box box already in tree @@ -212,11 +187,6 @@ void box_free(struct box *box) box_free(child); } - for (child = box->absolute_children; child; child = next) { - next = child->next; - box_free(child); - } - /* last this box */ box_free_box(box); } @@ -331,15 +301,6 @@ struct box *box_at_point(struct box *box, int x, int y, } } - /* consider absolute children first */ - for (child = box->absolute_children; child; child = child->next) { - if (box_contains_point(child, x - bx, y - by)) { - *box_x = bx + child->x - child->scroll_x; - *box_y = by + child->y - child->scroll_y; - return child; - } - } - /* consider floats second, since they will often overlap other boxes */ for (child = box->float_children; child; child = child->next_float) { if (box_contains_point(child, x - bx, y - by)) { @@ -596,11 +557,4 @@ void box_dump(struct box *box, unsigned int depth) for (c = box->fallback; c; c = c->next) box_dump(c, depth + 1); } - if (box->absolute_children) { - for (i = 0; i != depth; i++) - fprintf(stderr, " "); - fprintf(stderr, "absolute_children:\n"); - for (c = box->absolute_children; c; c = c->next) - box_dump(c, depth + 1); - } } |