summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render/box.c1
-rw-r--r--render/box.h6
-rw-r--r--render/box_construct.c8
3 files changed, 1 insertions, 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')