summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-07 13:27:29 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2012-08-07 13:27:29 (GMT)
commit18aea52cfc1086999ce2463ccd08c5813341d32f (patch)
tree7ab0a51f084088030a280e92efacf724a890eb77
parentc7aba9bbcaf635a2ec4ba0fb5870ec0ba2902b4a (diff)
downloadlibcss-18aea52cfc1086999ce2463ccd08c5813341d32f.tar.gz
libcss-18aea52cfc1086999ce2463ccd08c5813341d32f.tar.bz2
Fix not([node_name]) selection.
-rw-r--r--src/select/select.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/select/select.c b/src/select/select.c
index 4243140..3543dd5 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -1778,7 +1778,13 @@ css_error match_detail(css_select_ctx *ctx, void *node,
switch (detail->type) {
case CSS_SELECTOR_ELEMENT:
- /* Never any need to match this detail type. */
+ if (detail->negate != 0) {
+ /* Only need to test this inside not(), since
+ * it will have been considered as a named node
+ * otherwise. */
+ error = state->handler->node_has_name(state->pw, node,
+ &detail->qname, match);
+ }
break;
case CSS_SELECTOR_CLASS:
error = state->handler->node_has_class(state->pw, node,