diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-01-19 23:12:37 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-01-19 23:12:37 +0000 |
commit | 6a50bef84ae6a0a67e03ac1356f8d85d15fe09d6 (patch) | |
tree | 01f78f04b22517899f603787f6005f70b359271e /src/select/properties/font_family.c | |
parent | 63c21aca7c77b1d37cb64ad2b1fa76d6b0b92f48 (diff) | |
download | libcss-6a50bef84ae6a0a67e03ac1356f8d85d15fe09d6.tar.gz libcss-6a50bef84ae6a0a67e03ac1356f8d85d15fe09d6.tar.bz2 |
Merge parser autogeneration and string handling refactor branch r=jmb,kinnison,vince
svn path=/trunk/libcss/; revision=11408
Diffstat (limited to 'src/select/properties/font_family.c')
-rw-r--r-- | src/select/properties/font_family.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/select/properties/font_family.c b/src/select/properties/font_family.c index a0c7609..c8b3789 100644 --- a/src/select/properties/font_family.c +++ b/src/select/properties/font_family.c @@ -31,9 +31,8 @@ css_error cascade_font_family(uint32_t opv, css_style *style, switch (v) { case FONT_FAMILY_STRING: case FONT_FAMILY_IDENT_LIST: - font = *((lwc_string **) - style->bytecode); - advance_bytecode(style, sizeof(font)); + css_stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &font); + advance_bytecode(style, sizeof(css_code_t)); break; case FONT_FAMILY_SERIF: if (value == CSS_FONT_FAMILY_INHERIT) @@ -192,24 +191,3 @@ css_error compose_font_family(const css_computed_style *parent, return CSS_OK; } -uint32_t destroy_font_family(void *bytecode) -{ - uint32_t consumed = sizeof(uint32_t); - uint32_t value = getValue(*((uint32_t*)bytecode)); - bytecode = ((uint8_t*)bytecode) + sizeof(uint32_t); - - while (value != FONT_FAMILY_END) { - if (value == FONT_FAMILY_STRING || value == FONT_FAMILY_IDENT_LIST) { - lwc_string *str = *((lwc_string **)bytecode); - consumed += sizeof(lwc_string*); - bytecode = ((uint8_t*)bytecode) + sizeof(lwc_string*); - lwc_string_unref(str); - } - - consumed += sizeof(uint32_t); - value = *((uint32_t*)bytecode); - bytecode = ((uint8_t*)bytecode) + sizeof(uint32_t); - } - - return consumed; -} |