summaryrefslogtreecommitdiff
path: root/src/select/propset.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 00:06:01 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-14 00:06:01 +0000
commit7ecab92e9a8508c44a758a8ca58defe9a5965bb4 (patch)
tree069accf001b7f948edcbc9d32433002685abc61a /src/select/propset.h
parentc9899180b84909a15f3dcc17378a60d4e9e9fc3e (diff)
downloadlibcss-7ecab92e9a8508c44a758a8ca58defe9a5965bb4.tar.gz
libcss-7ecab92e9a8508c44a758a8ca58defe9a5965bb4.tar.bz2
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
Diffstat (limited to 'src/select/propset.h')
-rw-r--r--src/select/propset.h18
1 files changed, 14 insertions, 4 deletions
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;
}