From cc46ab612c7b739d9ab4afc5b342ff4f0d5a56cc Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 13 Feb 2009 11:34:29 +0000 Subject: Ensure pseudo classes/elements fail to match. Ensure that plain element selectors match. svn path=/trunk/libcss/; revision=6467 --- src/select/select.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/select/select.c') diff --git a/src/select/select.c b/src/select/select.c index 4159607..2397bf8 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -715,6 +715,10 @@ css_error match_details(css_select_ctx *ctx, void *node, { css_error error; + /* We match by default (if there are no details than the element + * selector, then we must match) */ + *match = true; + /** \todo Some details are easier to test than others (e.g. dashmatch * actually requires looking at data rather than simply comparing * pointers). Should we consider sorting the detail list such that the @@ -759,9 +763,11 @@ css_error match_detail(css_select_ctx *ctx, void *node, break; case CSS_SELECTOR_PSEUDO_CLASS: /** \todo pseudo classes */ + *match = false; break; case CSS_SELECTOR_PSEUDO_ELEMENT: /** \todo pseudo elements */ + *match = false; break; case CSS_SELECTOR_ATTRIBUTE: error = state->handler->node_has_attribute(state->pw, node, -- cgit v1.2.3