From 18aea52cfc1086999ce2463ccd08c5813341d32f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 7 Aug 2012 14:27:29 +0100 Subject: Fix not([node_name]) selection. --- src/select/select.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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, -- cgit v1.2.3