mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04:00
[libcss] Removed unused function
This commit is contained in:
parent
9ee4ebfa46
commit
cdf02f5e0c
@ -78,9 +78,6 @@ static css_error set_libcss_node_data(void *pw, void *node,
|
|||||||
static css_error get_libcss_node_data(void *pw, void *node,
|
static css_error get_libcss_node_data(void *pw, void *node,
|
||||||
void **libcss_node_data);
|
void **libcss_node_data);
|
||||||
|
|
||||||
static css_error compute_font_size(void *pw, const css_hint *parent,
|
|
||||||
css_hint *size);
|
|
||||||
|
|
||||||
static css_error named_ancestor_node(void *pw, void *node,
|
static css_error named_ancestor_node(void *pw, void *node,
|
||||||
const css_qname *qname, void **ancestor);
|
const css_qname *qname, void **ancestor);
|
||||||
|
|
||||||
@ -391,80 +388,6 @@ css_computed_style *nscss_get_blank_style(nscss_select_ctx *ctx,
|
|||||||
return composed;
|
return composed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Font size computation callback for libcss
|
|
||||||
*
|
|
||||||
* \param pw Computation context
|
|
||||||
* \param parent Parent font size (absolute)
|
|
||||||
* \param size Font size to compute
|
|
||||||
* \return CSS_OK on success
|
|
||||||
*
|
|
||||||
* \post \a size will be an absolute font size
|
|
||||||
*/
|
|
||||||
css_error compute_font_size(void *pw, const css_hint *parent, css_hint *size)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
static css_hint_length sizes[] = {
|
|
||||||
{ FLTTOFIX(6.75), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(7.50), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(9.75), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(12.0), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(13.5), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(18.0), CSS_UNIT_PT },
|
|
||||||
{ FLTTOFIX(24.0), CSS_UNIT_PT }
|
|
||||||
};
|
|
||||||
const css_hint_length *parent_size;
|
|
||||||
|
|
||||||
UNUSED(pw);
|
|
||||||
|
|
||||||
/* Grab parent size, defaulting to medium if none */
|
|
||||||
if (parent == NULL) {
|
|
||||||
parent_size = &sizes[CSS_FONT_SIZE_MEDIUM - 1];
|
|
||||||
} else {
|
|
||||||
assert(parent->status == CSS_FONT_SIZE_DIMENSION);
|
|
||||||
assert(parent->data.length.unit != CSS_UNIT_EM);
|
|
||||||
assert(parent->data.length.unit != CSS_UNIT_EX);
|
|
||||||
parent_size = &parent->data.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(size->status != CSS_FONT_SIZE_INHERIT);
|
|
||||||
|
|
||||||
if (size->status < CSS_FONT_SIZE_LARGER) {
|
|
||||||
/* Keyword -- simple */
|
|
||||||
size->data.length = sizes[size->status - 1];
|
|
||||||
} else if (size->status == CSS_FONT_SIZE_LARGER) {
|
|
||||||
/** \todo Step within table, if appropriate */
|
|
||||||
size->data.length.value =
|
|
||||||
FMUL(parent_size->value, FLTTOFIX(1.2));
|
|
||||||
size->data.length.unit = parent_size->unit;
|
|
||||||
} else if (size->status == CSS_FONT_SIZE_SMALLER) {
|
|
||||||
/** \todo Step within table, if appropriate */
|
|
||||||
size->data.length.value =
|
|
||||||
FMUL(parent_size->value, FLTTOFIX(1.2));
|
|
||||||
size->data.length.unit = parent_size->unit;
|
|
||||||
} else if (size->data.length.unit == CSS_UNIT_EM ||
|
|
||||||
size->data.length.unit == CSS_UNIT_EX) {
|
|
||||||
size->data.length.value =
|
|
||||||
FMUL(size->data.length.value, parent_size->value);
|
|
||||||
|
|
||||||
if (size->data.length.unit == CSS_UNIT_EX) {
|
|
||||||
size->data.length.value = FMUL(size->data.length.value,
|
|
||||||
FLTTOFIX(0.6));
|
|
||||||
}
|
|
||||||
|
|
||||||
size->data.length.unit = parent_size->unit;
|
|
||||||
} else if (size->data.length.unit == CSS_UNIT_PCT) {
|
|
||||||
size->data.length.value = FDIV(FMUL(size->data.length.value,
|
|
||||||
parent_size->value), FLTTOFIX(100));
|
|
||||||
size->data.length.unit = parent_size->unit;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
size->data.length.unit = CSS_UNIT_EM;
|
|
||||||
size->data.length.value = FMUL(1, 1);
|
|
||||||
size->status = CSS_FONT_SIZE_DIMENSION;
|
|
||||||
|
|
||||||
return CSS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Style selection callbacks *
|
* Style selection callbacks *
|
||||||
|
Loading…
Reference in New Issue
Block a user