diff options
Diffstat (limited to 'src/select/hash.c')
-rw-r--r-- | src/select/hash.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/select/hash.c b/src/select/hash.c index 4b11702..12e82aa 100644 --- a/src/select/hash.c +++ b/src/select/hash.c @@ -8,6 +8,8 @@ #include <stdio.h> #include <string.h> +#include <libcss/hint.h> + #include "stylesheet.h" #include "select/hash.h" #include "select/mq.h" @@ -368,7 +370,8 @@ css_error css__selector_hash_find(css_selector_hash *hash, head->sel_chain_bloom, req->node_bloom) && mq_rule_good_for_media(head->sel->rule, - req->media)) { + req->unit_ctx, req->media, + req->str)) { /* Found a match */ break; } @@ -444,10 +447,12 @@ css_error css__selector_hash_find_by_class(css_selector_hash *hash, _chain_good_for_element_name( head->sel, &(req->qname), - req->uni) && + req->str->universal) && mq_rule_good_for_media( head->sel->rule, - req->media)) { + req->unit_ctx, + req->media, + req->str)) { /* Found a match */ break; } @@ -524,10 +529,12 @@ css_error css__selector_hash_find_by_id(css_selector_hash *hash, _chain_good_for_element_name( head->sel, &req->qname, - req->uni) && + req->str->universal) && mq_rule_good_for_media( head->sel->rule, - req->media)) { + req->unit_ctx, + req->media, + req->str)) { /* Found a match */ break; } @@ -577,7 +584,8 @@ css_error css__selector_hash_find_universal(css_selector_hash *hash, head->sel_chain_bloom, req->node_bloom) && mq_rule_good_for_media(head->sel->rule, - req->media)) { + req->unit_ctx, req->media, + req->str)) { /* Found a match */ break; } @@ -757,7 +765,7 @@ static void print_chain_bloom_details(css_bloom bloom[CSS_BLOOM_SIZE]) { printf("Chain bloom:\t"); int total = 0, i; - int set[4]; + int set[CSS_BLOOM_SIZE]; for (i = 0; i < CSS_BLOOM_SIZE; i++) { set[i] = bits_set(bloom[i]); total += set[i]; @@ -920,7 +928,8 @@ css_error _iterate_elements( head->sel_chain_bloom, req->node_bloom) && mq_rule_good_for_media(head->sel->rule, - req->media)) { + req->unit_ctx, req->media, + req->str)) { /* Found a match */ break; } @@ -977,10 +986,12 @@ css_error _iterate_classes( _chain_good_for_element_name( head->sel, &(req->qname), - req->uni) && + req->str->universal) && mq_rule_good_for_media( head->sel->rule, - req->media)) { + req->unit_ctx, + req->media, + req->str)) { /* Found a match */ break; } @@ -1038,10 +1049,12 @@ css_error _iterate_ids( _chain_good_for_element_name( head->sel, &req->qname, - req->uni) && + req->str->universal) && mq_rule_good_for_media( head->sel->rule, - req->media)) { + req->unit_ctx, + req->media, + req->str)) { /* Found a match */ break; } @@ -1084,7 +1097,8 @@ css_error _iterate_universal( head->sel_chain_bloom, req->node_bloom) && mq_rule_good_for_media(head->sel->rule, - req->media)) { + req->unit_ctx, req->media, + req->str)) { /* Found a match */ break; } |