diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-25 18:59:53 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-25 18:59:53 +0000 |
commit | c5911904de7f412b67bafc8fa9bb57a0dbe6a881 (patch) | |
tree | 9746a1e5ea828e0dea5919f3c35b638e922ab3c8 /src/stylesheet.h | |
parent | b4d0d63be81dce36b1ddc4365235036c8e9d1a3d (diff) | |
download | libcss-c5911904de7f412b67bafc8fa9bb57a0dbe6a881.tar.gz libcss-c5911904de7f412b67bafc8fa9bb57a0dbe6a881.tar.bz2 |
Beginnings of specificity.
Note that we store the specificity on each simple selector. Thus the total specificity for a combinator chain is obtained by summing the specificity of each chain member.
TODO: distinguish between pseudo classes and elements.
svn path=/trunk/libcss/; revision=6267
Diffstat (limited to 'src/stylesheet.h')
-rw-r--r-- | src/stylesheet.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stylesheet.h b/src/stylesheet.h index 532afc0..48b08c2 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -63,6 +63,10 @@ struct css_selector { css_rule *rule; /**< Owning rule */ +#define CSS_SPECIFICITY_A 0x01000000 +#define CSS_SPECIFICITY_B 0x00010000 +#define CSS_SPECIFICITY_C 0x00000100 +#define CSS_SPECIFICITY_D 0x00000001 uint32_t specificity; /**< Specificity of selector */ css_selector_detail data; /**< Selector data */ |