From 10fa42cd126db59a7ef4982cae2e56db58c94413 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 9 Apr 2005 09:52:52 +0000 Subject: [project @ 2005-04-09 09:52:52 by bursa] Remove obsolete style_clone field from struct box. svn path=/import/netsurf/; revision=1609 --- render/box.c | 1 - render/box.h | 6 +----- render/box_construct.c | 8 -------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/render/box.c b/render/box.c index c6b8f51ed..e1959bd8d 100644 --- a/render/box.c +++ b/render/box.c @@ -65,7 +65,6 @@ struct box * box_create(struct css_style *style, box->length = 0; box->space = 0; box->clone = 0; - box->style_clone = 0; box->href = href; box->title = title; box->columns = 1; diff --git a/render/box.h b/render/box.h index 3e1b24182..8f55459ac 100644 --- a/render/box.h +++ b/render/box.h @@ -166,12 +166,8 @@ struct box { /** Text is followed by a space. */ unsigned int space : 1; /** This box is a continuation of the previous box (eg from line - * breaking). gadget, href, title, col and style are shared with the - * previous box, and must not be freed when this box is destroyed. */ + * breaking). */ unsigned int clone : 1; - /** style is shared with some other box, and must not be freed when - * this box is destroyed. */ - unsigned int style_clone : 1; char *href; /**< Link, or 0. */ char *title; /**< Title, or 0. */ diff --git a/render/box_construct.c b/render/box_construct.c index 8fc6881a3..94e24b7b0 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -477,7 +477,6 @@ bool box_construct_text(xmlNode *n, struct content *content, free(text); if (!box->text) return false; - box->style_clone = 1; box->length = strlen(box->text); /* strip ending space char off */ if (box->length > 1 && text[box->length - 1] == ' ') { @@ -549,7 +548,6 @@ bool box_construct_text(xmlNode *n, struct content *content, return false; } box->type = BOX_INLINE; - box->style_clone = 1; box->text = talloc_strdup(content, current); if (!box->text) { free(text); @@ -1649,7 +1647,6 @@ bool box_input(BOX_SPECIAL_PARAMS) if (!inline_box) goto no_memory; inline_box->type = BOX_INLINE; - inline_box->style_clone = 1; if (box->gadget->value != NULL) inline_box->text = talloc_strdup(content, box->gadget->value); @@ -1677,7 +1674,6 @@ bool box_input(BOX_SPECIAL_PARAMS) if (!inline_box) goto no_memory; inline_box->type = BOX_INLINE; - inline_box->style_clone = 1; if ((s = (char *) xmlGetProp(n, (const xmlChar *) "value"))) inline_box->text = talloc_strdup(content, s); else @@ -1793,7 +1789,6 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password) if (!inline_box) return 0; inline_box->type = BOX_INLINE; - inline_box->style_clone = 1; if (password) { inline_box->length = strlen(box->gadget->value); inline_box->text = talloc_array(content, char, @@ -1935,7 +1930,6 @@ bool box_select(BOX_SPECIAL_PARAMS) if (!inline_box) goto no_memory; inline_box->type = BOX_INLINE; - inline_box->style_clone = 1; box_add_child(inline_container, inline_box); box_add_child(box, inline_container); @@ -2067,7 +2061,6 @@ bool box_textarea(BOX_SPECIAL_PARAMS) if (!inline_box) return false; inline_box->type = BOX_INLINE; - inline_box->style_clone = 1; inline_box->text = s; inline_box->length = len; box_add_child(inline_container, inline_box); @@ -2082,7 +2075,6 @@ bool box_textarea(BOX_SPECIAL_PARAMS) if (!br_box) return false; br_box->type = BOX_BR; - br_box->style_clone = 1; box_add_child(inline_container, br_box); if (current[0] == '\r' && current[1] == '\n') -- cgit v1.2.3