diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-30 20:32:20 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-30 20:32:20 +0100 |
commit | 05581a769d934cf6231cd112c917ddde949354b4 (patch) | |
tree | b9b915a689fee809f960a01380b5b75b7a1ff612 | |
parent | a59deba5ca4253f5ad7fe0d01988742c657afd76 (diff) |
add CssRule::specificity
-rw-r--r-- | src/css.cc | 1 | ||||
-rw-r--r-- | src/css.hh | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -218,6 +218,7 @@ CssRule::CssRule (CssSelector *selector, CssPropertyList *props) { this->selector->ref (); this->props = props; this->props->ref (); + spec = selector->specificity (); }; CssRule::~CssRule () { @@ -271,6 +271,7 @@ class CssSelector { class CssRule { private: CssPropertyList *props; + int spec; public: CssSelector *selector; @@ -280,6 +281,7 @@ class CssRule { void apply (CssPropertyList *props, Doctree *docTree, const DoctreeNode *node); + inline int specificity () { return spec; }; void print (); }; |