diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-01-31 22:30:02 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-01-31 22:30:02 +0000 |
commit | 89c0440321f6f2a91dee1a2047f6bffc3eec382c (patch) | |
tree | 2d0cf0a24051fb8148d6b4e47d984786f15de7a4 /src/select/hash.c | |
parent | 653b9fe3f74649cdf8a364139e236183d24af3ad (diff) | |
download | libcss-89c0440321f6f2a91dee1a2047f6bffc3eec382c.tar.gz libcss-89c0440321f6f2a91dee1a2047f6bffc3eec382c.tar.bz2 |
Place negated class and id selectors in the universal hash chain
svn path=/trunk/libcss/; revision=11568
Diffstat (limited to 'src/select/hash.c')
-rw-r--r-- | src/select/hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/select/hash.c b/src/select/hash.c index d68ad82..43a696f 100644 --- a/src/select/hash.c +++ b/src/select/hash.c @@ -536,7 +536,8 @@ lwc_string *_class_name(const css_selector *selector) lwc_string *name = NULL; do { - if (detail->type == CSS_SELECTOR_CLASS) { + /* Ignore :not(.class) */ + if (detail->type == CSS_SELECTOR_CLASS && detail->negate == 0) { name = detail->name; break; } @@ -562,7 +563,8 @@ lwc_string *_id_name(const css_selector *selector) lwc_string *name = NULL; do { - if (detail->type == CSS_SELECTOR_ID) { + /* Ignore :not(#id) */ + if (detail->type == CSS_SELECTOR_ID && detail->negate == 0) { name = detail->name; break; } |