From 7ecab92e9a8508c44a758a8ca58defe9a5965bb4 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 14 Feb 2009 00:06:01 +0000 Subject: A motley selection of changes. Vague summary: + Add config makefile (not that there's anything to configure at present :) + Fix dumping of UNIT_MS to actually use sprintf and not printf + Extend computed style dumping (still loads of properties missing) + Make result buffer larger in select-auto.c -- avoids buffer overflows when there's way more output than expected + Expand expected test output to contain defaulted properties (more of this will be needed once the computed style dumping is complete) + Store interned string pointers in css_select_state. + Intern pseudo class/element names at start of selecting styles for a sheet + Group properties so we know which ones appear in the extension blocks + Fixup unset properties once the cascade has completed + Implement matching of pseudo class/element selectors + Fix setting of background-image and list-style-image when there's no URL. svn path=/trunk/libcss/; revision=6470 --- src/select/propset.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/select/propset.h') diff --git a/src/select/propset.h b/src/select/propset.h index ff9658c..bdc85bb 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -457,8 +457,13 @@ static inline css_error set_background_image( *bits = (*bits & ~BACKGROUND_IMAGE_MASK) | ((type & 0x1) << BACKGROUND_IMAGE_SHIFT); - style->background_image.data = (uint8_t *) url->data; - style->background_image.len = url->len; + if (url != NULL) { + style->background_image.data = (uint8_t *) url->data; + style->background_image.len = url->len; + } else { + style->background_image.data = NULL; + style->background_image.len = 0; + } return CSS_OK; } @@ -500,8 +505,13 @@ static inline css_error set_list_style_image( *bits = (*bits & ~LIST_STYLE_IMAGE_MASK) | ((type & 0x1) << LIST_STYLE_IMAGE_SHIFT); - style->list_style_image.data = (uint8_t *) url->data; - style->list_style_image.len = url->len; + if (url != NULL) { + style->list_style_image.data = (uint8_t *) url->data; + style->list_style_image.len = url->len; + } else { + style->list_style_image.data = NULL; + style->list_style_image.len = 0; + } return CSS_OK; } -- cgit v1.2.1