summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-08 15:56:28 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-11-08 15:56:28 +0100
commit4391a4ec4043ebc417390214cd226a980db9df38 (patch)
treec79f66189a510f2e2fa05ac37844ff2ff21637d4 /src
parent79a3a198352597ceda154ce3a5c93373967ab5bf (diff)
minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/css.hh2
-rw-r--r--src/styleengine.cc9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/css.hh b/src/css.hh
index c98a3850..991a926e 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -111,7 +111,7 @@ class CssProperty {
CSS_FONT_WEIGHT_BOLD = 700,
CSS_FONT_WEIGHT_MIN = 100,
CSS_FONT_WEIGHT_MAX = 900,
- } CssFontWeightExtensions;
+ } FontWeightExtensions;
Name name;
Value value;
diff --git a/src/styleengine.cc b/src/styleengine.cc
index c1b4f718..4b5f3f7a 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -59,6 +59,7 @@ void StyleEngine::startElement (int tag, const char *id, const char *klass,
n->tag = tag;
n->id = id;
n->klass = klass;
+ n->pseudoClass = NULL;
n->styleAttribute = style;
}
@@ -71,6 +72,13 @@ void StyleEngine::setNonCssProperties (CssPropertyList *props) {
}
/**
+ * \brief set the CSS pseudo class (e.g. "link", "visited").
+ */
+void StyleEngine::setPseudoClass (const char *pseudoClass) {
+ stack->getRef (stack->size () - 1)->pseudoClass = pseudoClass;
+}
+
+/**
* \brief tell the styleEngine that a html element has ended.
*/
void StyleEngine::endElement (int tag) {
@@ -129,6 +137,7 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
break;
default:
fontAttrs.weight = p->value.intVal;
+ break;
}
if (fontAttrs.weight < CssProperty::CSS_FONT_WEIGHT_MIN)
fontAttrs.weight = CssProperty::CSS_FONT_WEIGHT_MIN;