summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-12 16:17:35 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-12 16:17:35 +0100
commitd09211b48b1f9041ed3ae3933b8a7cfab9d40eaa (patch)
tree1f60753fcd1de1488143d5d8cfec304c8083a849
parentc76ae0059b90c0ed62918d9e4a1a2e0b739f00b7 (diff)
tag -> element
-rw-r--r--src/css.cc2
-rw-r--r--src/css.hh7
-rw-r--r--src/doctree.hh2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/css.cc b/src/css.cc
index d35e818c..43523079 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -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))
diff --git a/src/css.hh b/src/css.hh
index af7cc960..d196fe1e 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -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;