mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 14:07:05 +03:00
[project @ 2003-07-15 18:06:31 by bursa]
Temporarily stop freeing box->href, incorrect and crashing. svn path=/import/netsurf/; revision=220
This commit is contained in:
parent
9fec06838d
commit
52e4727abf
17
render/box.c
17
render/box.c
@ -490,9 +490,14 @@ struct css_style * box_get_style(struct content ** stylesheet,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "height"))) {
|
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "height"))) {
|
||||||
style->height.height = CSS_HEIGHT_LENGTH;
|
if (strrchr(s, '%')) {
|
||||||
style->height.length.unit = CSS_UNIT_PX;
|
/* tne specification doesn't make clear what
|
||||||
style->height.length.value = atof(s);
|
* percentage heights mean, so ignore them */
|
||||||
|
} else {
|
||||||
|
style->height.height = CSS_HEIGHT_LENGTH;
|
||||||
|
style->height.length.unit = CSS_UNIT_PX;
|
||||||
|
style->height.length.value = atof(s);
|
||||||
|
}
|
||||||
xmlFree(s);
|
xmlFree(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,9 +558,9 @@ struct result box_a(xmlNode *n, struct status *status,
|
|||||||
{
|
{
|
||||||
struct box *box;
|
struct box *box;
|
||||||
char *s;
|
char *s;
|
||||||
box = box_create(style, status->href, status->title);
|
|
||||||
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "href")))
|
if ((s = (char *) xmlGetProp(n, (const xmlChar *) "href")))
|
||||||
status->href = s;
|
status->href = s;
|
||||||
|
box = box_create(style, status->href, status->title);
|
||||||
return (struct result) {box, 1};
|
return (struct result) {box, 1};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1342,13 +1347,13 @@ void box_free_box(struct box *box)
|
|||||||
xmlFree(box->title);
|
xmlFree(box->title);
|
||||||
|
|
||||||
/* only free href if we're the top most user */
|
/* only free href if we're the top most user */
|
||||||
if (box->href != 0)
|
/*if (box->href != 0)
|
||||||
{
|
{
|
||||||
if (box->parent == 0)
|
if (box->parent == 0)
|
||||||
xmlFree(box->href);
|
xmlFree(box->href);
|
||||||
else if (box->parent->href != box->href)
|
else if (box->parent->href != box->href)
|
||||||
xmlFree(box->href);
|
xmlFree(box->href);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* TODO: free object_params */
|
/* TODO: free object_params */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user