Tidy cellpadding hint handling.

This commit is contained in:
Michael Drake 2015-05-19 08:56:48 +01:00 committed by Michael Drake
parent 8e580ccd19
commit e6c8188229

View File

@ -832,7 +832,6 @@ static css_error node_presentational_hint_padding_trbl(
{ {
dom_string *name; dom_string *name;
dom_exception exc; dom_exception exc;
dom_string *cellpadding = NULL;
css_error result = CSS_PROPERTY_NOT_SET; css_error result = CSS_PROPERTY_NOT_SET;
exc = dom_node_get_node_name(node, &name); exc = dom_node_get_node_name(node, &name);
@ -843,6 +842,8 @@ static css_error node_presentational_hint_padding_trbl(
dom_string_caseless_lwc_isequal(name, corestring_lwc_th)) { dom_string_caseless_lwc_isequal(name, corestring_lwc_th)) {
css_qname qs; css_qname qs;
dom_node *tablenode = NULL; dom_node *tablenode = NULL;
dom_string *cellpadding = NULL;
qs.ns = NULL; qs.ns = NULL;
qs.name = lwc_string_ref(corestring_lwc_table); qs.name = lwc_string_ref(corestring_lwc_table);
if (named_ancestor_node(ctx, node, &qs, if (named_ancestor_node(ctx, node, &qs,
@ -866,9 +867,6 @@ static css_error node_presentational_hint_padding_trbl(
/* No need to unref tablenode, named_ancestor_node does not /* No need to unref tablenode, named_ancestor_node does not
* return a reffed node to the CSS * return a reffed node to the CSS
*/ */
}
dom_string_unref(name);
if (cellpadding != NULL) { if (cellpadding != NULL) {
if (parse_dimension(dom_string_data(cellpadding), false, if (parse_dimension(dom_string_data(cellpadding), false,
@ -879,6 +877,9 @@ static css_error node_presentational_hint_padding_trbl(
} }
dom_string_unref(cellpadding); dom_string_unref(cellpadding);
} }
}
dom_string_unref(name);
return result; return result;
} }