diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-13 09:02:41 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-01-13 09:02:41 +0100 |
commit | c510c7315258501f7f43902589203b06fbc72b9a (patch) | |
tree | 404c6a20cf323dd582e3ddf4bb29e56ab34d08fc /src/css.hh | |
parent | 1b38c3eeac1bb16030323cb68859adb00bf98004 (diff) |
initial implementation of a CSS selector matching optimization
The idea is to avoid repeated checks of CssSimpleSelector against the
same part of the doctree.
E.g
.navigation * { background-color:green }
Would result in checking for class="navigation" all the way down to the
document root for all elements.
The optimization shortcuts this, for parts of the doctree that have been
checked before.
Diffstat (limited to 'src/css.hh')
-rw-r--r-- | src/css.hh | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -223,6 +223,7 @@ class CssSelector { private: struct CombinatorAndSelector { + int notMatchingBefore; // used for optimizing CSS selector matching Combinator combinator; CssSimpleSelector selector; }; |