summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-13 11:34:29 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-13 11:34:29 +0000
commitcc46ab612c7b739d9ab4afc5b342ff4f0d5a56cc (patch)
treefe4d442f4533f1d6f2c4c75fb709eaf52b32aabf
parent46291d8b0a738acf15154d7d1abf401be5c31027 (diff)
downloadlibcss-cc46ab612c7b739d9ab4afc5b342ff4f0d5a56cc.tar.gz
libcss-cc46ab612c7b739d9ab4afc5b342ff4f0d5a56cc.tar.bz2
Ensure pseudo classes/elements fail to match.
Ensure that plain element selectors match. svn path=/trunk/libcss/; revision=6467
-rw-r--r--src/select/select.c6
1 files changed, 6 insertions, 0 deletions
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,