From f1f3155ef6f28fb8595920e5423336b39bba4ed0 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 14 Feb 2009 22:55:32 +0000 Subject: Port libcss to libwapcaplet. It passes the tests, perhaps we need more of them. Lifetimes of lwc_string objects really need attention before we can consider this finished. svn path=/trunk/libcss/; revision=6517 --- src/select/propset.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/select/propset.h') diff --git a/src/select/propset.h b/src/select/propset.h index 64f7829..730822a 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -219,7 +219,7 @@ static inline css_error set_counter_reset( #define CURSOR_MASK 0xf8 static inline css_error set_cursor( css_computed_style *style, uint8_t type, - css_string *urls) + lwc_string **urls) { uint8_t *bits; @@ -244,7 +244,7 @@ static inline css_error set_cursor( #define QUOTES_MASK 0x6 static inline css_error set_quotes( css_computed_style *style, uint8_t type, - css_string *quotes) + lwc_string **quotes) { uint8_t *bits; @@ -480,7 +480,7 @@ static inline css_error set_border_left_width( #define BACKGROUND_IMAGE_MASK 0x1 static inline css_error set_background_image( css_computed_style *style, uint8_t type, - const parserutils_hash_entry *url) + lwc_string *url) { uint8_t *bits = &style->bits[BACKGROUND_IMAGE_INDEX]; @@ -489,11 +489,9 @@ static inline css_error set_background_image( ((type & 0x1) << BACKGROUND_IMAGE_SHIFT); if (url != NULL) { - style->background_image.data = (uint8_t *) url->data; - style->background_image.len = url->len; + style->background_image = url; } else { - style->background_image.data = NULL; - style->background_image.len = 0; + style->background_image = NULL; } return CSS_OK; @@ -528,7 +526,7 @@ static inline css_error set_color( #define LIST_STYLE_IMAGE_MASK 0x1 static inline css_error set_list_style_image( css_computed_style *style, uint8_t type, - const parserutils_hash_entry *url) + lwc_string *url) { uint8_t *bits = &style->bits[LIST_STYLE_IMAGE_INDEX]; @@ -537,11 +535,9 @@ static inline css_error set_list_style_image( ((type & 0x1) << LIST_STYLE_IMAGE_SHIFT); if (url != NULL) { - style->list_style_image.data = (uint8_t *) url->data; - style->list_style_image.len = url->len; + style->list_style_image = url; } else { - style->list_style_image.data = NULL; - style->list_style_image.len = 0; + style->list_style_image = NULL; } return CSS_OK; @@ -1444,7 +1440,7 @@ static inline css_error set_text_decoration( #define FONT_FAMILY_MASK 0x7 static inline css_error set_font_family( css_computed_style *style, uint8_t type, - css_string *names) + lwc_string **names) { uint8_t *bits = &style->bits[FONT_FAMILY_INDEX]; -- cgit v1.2.3