diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-26 12:54:30 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-26 12:54:30 +0000 |
commit | 40641db30283f66bc9d0e6c36a84f8389c570337 (patch) | |
tree | c830ec91dff443b8ce67dc33078aa13ae4bc48b1 /src | |
parent | 0a33fa9dc390f0f124a1910d03af1c4dbc78e99c (diff) | |
download | libcss-40641db30283f66bc9d0e6c36a84f8389c570337.tar.gz libcss-40641db30283f66bc9d0e6c36a84f8389c570337.tar.bz2 |
Propagate specificity of simple selectors to the head of each combinator chain.
This saves us having to calculate the specificity every time we want it.
svn path=/trunk/libcss/; revision=6278
Diffstat (limited to 'src')
-rw-r--r-- | src/stylesheet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c index 71aee9c..ac7dcd5 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -575,6 +575,9 @@ css_error css_stylesheet_selector_combine(css_stylesheet *sheet, b->combinator = a; b->data.comb = type; + /* And propagate A's specificity to B */ + b->specificity += a->specificity; + return CSS_OK; } |