comparison src/doctree.hh @ 763:df8153796f48

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.
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Tue, 13 Jan 2009 09:02:41 +0100
parents 145b8a4d65b3
children a913df1621ac
comparison
equal deleted inserted replaced
754:336ae7ab06a8 763:df8153796f48
1 #ifndef __DOCTREE_HH__ 1 #ifndef __DOCTREE_HH__
2 #define __DOCTREE_HH__ 2 #define __DOCTREE_HH__
3 3
4 class DoctreeNode { 4 class DoctreeNode {
5 public: 5 public:
6 int num; // unique ascending id
6 int depth; 7 int depth;
7 int element; 8 int element;
8 const char *klass; 9 const char *klass;
9 const char *pseudo; 10 const char *pseudo;
10 const char *id; 11 const char *id;