summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-10 21:43:57 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2015-01-10 21:43:57 +0000
commitf64ba5a6132769248043011c8102584596ae87a9 (patch)
treef254cbcb43d0298d9526f9ac6c69d5290624e490
parentd22595283b7e619d2552ea71b5c1e0d867c920a2 (diff)
parente09660c2551b73db73c6aa9b08160f2c951c6c2a (diff)
downloadlibcss-f64ba5a6132769248043011c8102584596ae87a9.tar.gz
libcss-f64ba5a6132769248043011c8102584596ae87a9.tar.bz2
Merge branch 'tlsa/remove-absolutification'
-rw-r--r--src/select/computed.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 11149c7..e653bf3 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -58,12 +58,6 @@ static css_error compute_absolute_length_none(css_computed_style *style,
css_fixed *len, css_unit *unit),
css_error (*set)(css_computed_style *style, uint8_t type,
css_fixed len, css_unit unit));
-static css_error compute_absolute_length_normal(css_computed_style *style,
- const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
- css_fixed *len, css_unit *unit),
- css_error (*set)(css_computed_style *style, uint8_t type,
- css_fixed len, css_unit unit));
static css_error compute_absolute_length_pair(css_computed_style *style,
const css_hint_length *ex_size,
uint8_t (*get)(const css_computed_style *style,
@@ -1178,7 +1172,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
/* Fix up letter-spacing */
- error = compute_absolute_length_normal(style,
+ error = compute_absolute_length(style,
&ex_size.data.length,
get_letter_spacing,
set_letter_spacing);
@@ -1201,7 +1195,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
/* Fix up word spacing */
- error = compute_absolute_length_normal(style,
+ error = compute_absolute_length(style,
&ex_size.data.length,
get_word_spacing,
set_word_spacing);
@@ -1687,41 +1681,6 @@ css_error compute_absolute_length_none(css_computed_style *style,
}
/**
- * Compute the absolute value of length or normal
- *
- * \param style Style to process
- * \param ex_size Ex size, in ems
- * \param get Function to read length
- * \param set Function to write length
- * \return CSS_OK on success
- */
-css_error compute_absolute_length_normal(css_computed_style *style,
- const css_hint_length *ex_size,
- uint8_t (*get)(const css_computed_style *style,
- css_fixed *len, css_unit *unit),
- css_error (*set)(css_computed_style *style, uint8_t type,
- css_fixed len, css_unit unit))
-{
- css_fixed length;
- css_unit unit;
- uint8_t type;
-
- type = get(style, &length, &unit);
- if (type == CSS_LETTER_SPACING_SET) {
- if (unit == CSS_UNIT_EX) {
- length = FMUL(length, ex_size->value);
- unit = ex_size->unit;
- }
- } else {
- /* NORMAL or INHERIT */
- length = INTTOFIX(0);
- unit = CSS_UNIT_PX;
- }
-
- return set(style, CSS_LETTER_SPACING_SET, length, unit);
-}
-
-/**
* Compute the absolute value of length pair
*
* \param style Style to process