Author: jmb
Date: Mon Jan 26 06:54:30 2009
New Revision: 6278
URL: http://source.netsurf-browser.org?rev=6278&view=rev
Log:
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.
Modified:
trunk/libcss/src/stylesheet.c
Modified: trunk/libcss/src/stylesheet.c
URL:
http://source.netsurf-browser.org/trunk/libcss/src/stylesheet.c?rev=6278&r1=6277&r2=6278&view=diff
==============================================================================
--- trunk/libcss/src/stylesheet.c (original)
+++ trunk/libcss/src/stylesheet.c Mon Jan 26 06:54:30 2009
@@ -575,6 +575,9 @@
b->combinator = a;
b->data.comb = type;
+ /* And propagate A's specificity to B */
+ b->specificity += a->specificity;
+
return CSS_OK;
}
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org