Mercurial > dillo_port1.3
changeset 643:eb0279297fde
hook up <style>...</style> parsing
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> |
---|---|
date | Thu, 04 Dec 2008 18:04:14 +0100 |
parents | 2b8a9d2bdf6e |
children | 9e4ad941cbdc |
files | src/html.cc src/styleengine.cc src/styleengine.hh |
diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/html.cc Tue Dec 02 21:44:13 2008 +0100 +++ b/src/html.cc Thu Dec 04 18:04:14 2008 +0100 @@ -1679,7 +1679,8 @@ */ 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); }
--- a/src/styleengine.cc Tue Dec 02 21:44:13 2008 +0100 +++ b/src/styleengine.cc Thu Dec 04 18:04:14 2008 +0100 @@ -361,3 +361,9 @@ 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); +}
--- a/src/styleengine.hh Tue Dec 02 21:44:13 2008 +0100 +++ b/src/styleengine.hh Thu Dec 04 18:04:14 2008 +0100 @@ -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 @@ 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);