aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-04 18:04:14 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-12-04 18:04:14 +0100
commit5b731bd8a0147e6ff9f2a69339312a9a1e08ae2e (patch)
tree1a3a7df143137b599b83ed36cf45769f1cc2f7fe
parent8065034cc6d7dec172b09714dc9383c425cd4448 (diff)
hook up <style>...</style> parsing
-rw-r--r--src/html.cc3
-rw-r--r--src/styleengine.cc6
-rw-r--r--src/styleengine.hh2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc
index 9f039e6f..3cdb147e 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -1679,7 +1679,8 @@ static void Html_tag_open_style(DilloHtml *html, const char *tag, int tagsize)
*/
static void Html_tag_close_style(DilloHtml *html, int TagIdx)
{
- /* eventually the stash will be sent to an interpreter for parsing */
+ html->styleEngine->parse(html->Stash->str, html->Stash->len,
+ 0, CSS_ORIGIN_AUTHOR);
a_Html_pop_tag(html, TagIdx);
}
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 09a90866..0bb559b6 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -361,3 +361,9 @@ Style * StyleEngine::style0 (CssPropertyList *nonCssProperties) {
return stack->getRef (stack->size () - 1)->style;
}
+
+void StyleEngine::parse (const char *buf, int buflen,
+ int order_count, CssOrigin origin) {
+
+ a_Css_parse (cssContext, buf, buflen, order_count, origin);
+}
diff --git a/src/styleengine.hh b/src/styleengine.hh
index b37aa0d7..a9440aa7 100644
--- a/src/styleengine.hh
+++ b/src/styleengine.hh
@@ -4,6 +4,7 @@
#include "dw/core.hh"
#include "doctree.hh"
#include "css.hh"
+#include "cssparser.hh"
class StyleEngine : public Doctree {
private:
@@ -38,6 +39,7 @@ class StyleEngine : public Doctree {
return NULL;
};
+ void parse (const char *buf, int buflen, int order_count, CssOrigin origin);
void startElement (int tag);
void setId (const char *id);
void setClass (const char *klass);