diff options
-rw-r--r-- | src/css.cc | 2 | ||||
-rw-r--r-- | src/css.hh | 7 | ||||
-rw-r--r-- | src/doctree.hh | 2 |
3 files changed, 5 insertions, 6 deletions
@@ -48,7 +48,7 @@ CssSelector *CssSelector::parse (const char *buf) { bool CssSelector::match (Doctree *docTree) { const DoctreeNode *n = docTree-> top (); - if (tag >= 0 && tag != n->tag) + if (element >= 0 && element != n->element) return false; if (klass != NULL && (n->klass == NULL || strcmp (klass, n->klass) != 0)) @@ -12,7 +12,6 @@ class CssProperty { } Value; typedef enum { - CSS_PROPERTY_END = -1, CSS_PROPERTY_BACKGROUND_ATTACHMENT, CSS_PROPERTY_BACKGROUND_COLOR, CSS_PROPERTY_BACKGROUND_IMAGE, @@ -156,13 +155,13 @@ class CssPropertyList : public lout::misc::SimpleVector <CssProperty> { /** \todo proper implementation */ class CssSelector { public: - int tag; + int element; const char *klass, *pseudo, *id; public: - CssSelector (int tag = -1, const char *klass = NULL, + CssSelector (int element = -1, const char *klass = NULL, const char *pseudo = NULL, const char *id = NULL) { - this->tag = tag; + this->element = element; this->klass = klass; this->pseudo = pseudo; this->id = id; diff --git a/src/doctree.hh b/src/doctree.hh index 43eb742f..97686e40 100644 --- a/src/doctree.hh +++ b/src/doctree.hh @@ -4,7 +4,7 @@ class DoctreeNode { public: int depth; - int tag; + int element; const char *klass; const char *pseudo; const char *id; |