diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-09 17:45:27 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-09 17:45:27 +0000 |
commit | 600c5449ee6929e3571d956285630fd58da79932 (patch) | |
tree | 890580099db246b81045af6cc3a736db609351d3 /include/libcss | |
parent | 85aeb5b9d3f96161fb3be021c6aee135afde15f7 (diff) | |
download | libcss-600c5449ee6929e3571d956285630fd58da79932.tar.gz libcss-600c5449ee6929e3571d956285630fd58da79932.tar.bz2 |
This is more likely to handle universal simple_selectors correctly.
Refactor stuff while we're at it.
Selector chains containing universal simple components are expensive to match/reject, as they require matching details on every previous sibling/ancestor (depending on the combinator type). Thus, we aim to handle the universal case last, to have the best chance of avoiding it.
svn path=/trunk/libcss/; revision=6403
Diffstat (limited to 'include/libcss')
-rw-r--r-- | include/libcss/select.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/libcss/select.h b/include/libcss/select.h index 90f72a9..f51efe5 100644 --- a/include/libcss/select.h +++ b/include/libcss/select.h @@ -16,15 +16,18 @@ typedef struct css_select_handler { css_error (*node_name)(void *pw, void *node, const uint8_t **name, size_t *len); - css_error (*ancestor_node)(void *pw, void *node, + css_error (*named_ancestor_node)(void *pw, void *node, const uint8_t *name, size_t len, void **ancestor); - css_error (*parent_node)(void *pw, void *node, + css_error (*named_parent_node)(void *pw, void *node, const uint8_t *name, size_t len, void **parent); - css_error (*sibling_node)(void *pw, void *node, + css_error (*named_sibling_node)(void *pw, void *node, const uint8_t *name, size_t len, void **sibling); + + css_error (*parent_node)(void *pw, void *node, void **parent); + css_error (*sibling_node)(void *pw, void *node, void **sibling); } css_select_handler; css_error css_select_ctx_create(css_alloc alloc, void *pw, |