diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-30 21:04:33 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-30 21:04:33 +0100 |
commit | 9062a1d41b5474d96d9760f6c6768900d613c557 (patch) | |
tree | 6e84323bae8cdede489e191d96f890c61e2cad1b /src | |
parent | 728e69c56a0fd440af3ae0e2c3d18ab263ad248a (diff) |
simplify CssSimpleSelector::specificity()
Diffstat (limited to 'src')
-rw-r--r-- | src/css.cc | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -193,15 +193,13 @@ int CssSimpleSelector::specificity () { int spec = 0; if (id) - spec++; - spec <<= 10; + spec += 1 << 20; if (klass) - spec++; + spec += 1 << 10; if (pseudo) - spec++; - spec <<= 10; + spec += 1 << 10; if (element != ELEMENT_ANY) - spec++; + spec += 1; return spec; } |