summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-03-02 18:27:41 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-03-02 18:27:41 +0000
commit77f67bccb666876fbeb0081550e0245de7ad411b (patch)
tree94a71b4822fef4b1972e9d8bbb74fe8a3b940507 /render/box.c
parentf744c9dfa0b283af31eb9bada8ffb63809acb0db (diff)
downloadnetsurf-77f67bccb666876fbeb0081550e0245de7ad411b.tar.gz
netsurf-77f67bccb666876fbeb0081550e0245de7ad411b.tar.bz2
Move style_owned to box flags.
svn path=/trunk/netsurf/; revision=11887
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/render/box.c b/render/box.c
index 0f73cbe57..91999b8ac 100644
--- a/render/box.c
+++ b/render/box.c
@@ -85,7 +85,7 @@ void *box_style_alloc(void *ptr, size_t len, void *pw)
static int
free_box_style(struct box *b)
{
- if (b->style_owned && b->style != NULL) {
+ if ((b->flags & STYLE_OWNED) && b->style != NULL) {
css_computed_style_destroy(b->style);
b->style = NULL;
}
@@ -132,9 +132,9 @@ struct box * box_create(css_select_results *styles, css_computed_style *style,
box->type = BOX_INLINE;
box->flags = 0;
+ box->flags = style_owned ? box->flags | STYLE_OWNED : box->flags;
box->styles = styles;
box->style = style;
- box->style_owned = style_owned;
box->x = box->y = 0;
box->width = UNKNOWN_WIDTH;
box->height = 0;