From 40641db30283f66bc9d0e6c36a84f8389c570337 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 26 Jan 2009 12:54:30 +0000 Subject: 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 --- src/stylesheet.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stylesheet.c') 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; } -- cgit v1.2.3