diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-11 15:50:50 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-11 15:50:50 +0000 |
commit | 5b0301a92513f386f9dcc892ec2aa540bd6e0d9c (patch) | |
tree | d5a87ee380b18784fe15f0096800b168a02339cf /src | |
parent | 54268f630795108ae11552b3acc79e2f6afa0887 (diff) | |
download | libcss-5b0301a92513f386f9dcc892ec2aa540bd6e0d9c.tar.gz libcss-5b0301a92513f386f9dcc892ec2aa540bd6e0d9c.tar.bz2 |
Handle content, not that we actually do anything with the data we read, however.
svn path=/trunk/libcss/; revision=6434
Diffstat (limited to 'src')
-rw-r--r-- | src/select/properties.c | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/src/select/properties.c b/src/select/properties.c index fac2ec5..e8c7b41 100644 --- a/src/select/properties.c +++ b/src/select/properties.c @@ -619,11 +619,60 @@ static css_error initial_color(css_computed_style *style) static css_error cascade_content(uint32_t opv, css_style *style, css_select_state *state) { - UNUSED(opv); - UNUSED(style); - UNUSED(state); + uint16_t value = 0; + + if (isInherit(opv) == false) { + uint32_t v = getValue(opv); + + if (v == CONTENT_NORMAL) { + value = 0; + } else if (v == CONTENT_NONE) { + value = 0; + } + + while (v != CONTENT_NORMAL) { + parserutils_hash_entry *he = + *((parserutils_hash_entry **) style->bytecode); - /** \todo content */ + switch (v & 0xff) { + case CONTENT_COUNTER: + advance_bytecode(style, sizeof(he)); + break; + case CONTENT_COUNTERS: + { + parserutils_hash_entry *sep; + + advance_bytecode(style, sizeof(he)); + + sep = *((parserutils_hash_entry **) + style->bytecode); + advance_bytecode(style, sizeof(sep)); + + } + break; + case CONTENT_URI: + case CONTENT_ATTR: + case CONTENT_STRING: + advance_bytecode(style, sizeof(he)); + break; + case CONTENT_OPEN_QUOTE: + break; + case CONTENT_CLOSE_QUOTE: + break; + case CONTENT_NO_OPEN_QUOTE: + break; + case CONTENT_NO_CLOSE_QUOTE: + break; + } + + v = *((uint32_t *) style->bytecode); + advance_bytecode(style, sizeof(v)); + } + } + + if (outranks_existing(getOpcode(opv), isImportant(opv), state)) { + /** \todo content */ + } return CSS_OK; } |