diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-03-12 21:59:03 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-03-12 21:59:03 +0000 |
commit | 44c70db481c005bceba5bc4ab23fb1af2e93f1f3 (patch) | |
tree | 64c03fb09c8f3cb9fdc11d1d66d3d784203ec469 /src | |
parent | 4b79442b86af66a2c5f7b215e52f32a8b3f5c72a (diff) | |
download | libcss-44c70db481c005bceba5bc4ab23fb1af2e93f1f3.tar.gz libcss-44c70db481c005bceba5bc4ab23fb1af2e93f1f3.tar.bz2 |
Ensure that the uncommon extension block is initialised correctly
svn path=/trunk/libcss/; revision=11990
Diffstat (limited to 'src')
-rw-r--r-- | src/select/propset.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/select/propset.h b/src/select/propset.h index f3c314e..7c29db4 100644 --- a/src/select/propset.h +++ b/src/select/propset.h @@ -16,6 +16,29 @@ /* Important: keep this file in sync with computed.h */ /** \todo Is there a better way to ensure this happens? */ +static const css_computed_uncommon default_uncommon = { + { (CSS_LETTER_SPACING_INHERIT << 2) | CSS_OUTLINE_COLOR_INVERT, + (CSS_OUTLINE_WIDTH_MEDIUM << 1) | CSS_BORDER_SPACING_INHERIT, + 0, + (CSS_WORD_SPACING_INHERIT << 2) | + (CSS_COUNTER_INCREMENT_NONE << 1) | CSS_COUNTER_RESET_NONE, + (CSS_CURSOR_INHERIT << 3) | 0, + 0, + 0, + (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL + }, + { 0, 0 }, + { 0, 0, 0, 0 }, + 0, + 0, + 0, + 0, + NULL, + NULL, + NULL, + NULL +}; + #define ENSURE_UNCOMMON do { \ if (style->uncommon == NULL) { \ style->uncommon = style->alloc(NULL, \ @@ -23,7 +46,7 @@ if (style->uncommon == NULL) \ return CSS_NOMEM; \ \ - memset(style->uncommon, 0, \ + memcpy(style->uncommon, &default_uncommon, \ sizeof(css_computed_uncommon)); \ } \ } while(0) |