diff options
Diffstat (limited to 'src/html_common.hh')
-rw-r--r-- | src/html_common.hh | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/html_common.hh b/src/html_common.hh index 302d9ece..4c6f40c5 100644 --- a/src/html_common.hh +++ b/src/html_common.hh @@ -13,6 +13,8 @@ #include "form.hh" +#include "styleengine.hh" + /* * Macros */ @@ -36,6 +38,7 @@ * Change one toplevel attribute. var should be an identifier. val is * only evaluated once, so you can safely use a function call for it. */ +#if 0 #define HTML_SET_TOP_ATTR(html, var, val) \ do { \ StyleAttrs style_attrs; \ @@ -48,7 +51,9 @@ Style::create (HT2LT(html), &style_attrs); \ old_style->unref (); \ } while (FALSE) - +#else +#define HTML_SET_TOP_ATTR(html, var, val) +#endif /* * Typedefs */ @@ -109,7 +114,7 @@ struct _DilloLinkImage { }; struct _DilloHtmlState { - dw::core::style::Style *style, *table_cell_style; + CssPropertyList *table_cell_props; DilloHtmlParseMode parse_mode; DilloHtmlTableMode table_mode; bool cell_text_align_set; @@ -167,6 +172,9 @@ public: //BUG: for now everything is public char *content_type, *charset; bool stop_parser; + bool stop_parser_after_head; + bool repush_after_head; + size_t CurrTagOfs; size_t OldTagOfs, OldTagLine; @@ -174,6 +182,7 @@ public: //BUG: for now everything is public float DocTypeVersion; /* HTML or XHTML version number */ lout::misc::SimpleVector<DilloHtmlState> *stack; + StyleEngine *styleEngine; int InFlags; /* tracks which elements we are in */ @@ -232,6 +241,8 @@ public: * Parser functions */ +int a_Html_tag_index(const char *tag); + const char *a_Html_get_attr(DilloHtml *html, const char *tag, int tagsize, @@ -249,7 +260,6 @@ DilloUrl *a_Html_url_new(DilloHtml *html, DilloImage *a_Html_add_new_image(DilloHtml *html, const char *tag, int tagsize, DilloUrl *url, - dw::core::style::StyleAttrs *style_attrs, bool add); char *a_Html_parse_entities(DilloHtml *html, const char *token, int toksize); @@ -259,11 +269,11 @@ int32_t a_Html_color_parse(DilloHtml *html, const char *subtag, int32_t default_color); dw::core::style::Length a_Html_parse_length (DilloHtml *html, const char *attr); -void a_Html_tag_set_align_attr(DilloHtml *html, +void a_Html_tag_set_align_attr(DilloHtml *html, CssPropertyList *props, const char *tag, int tagsize); bool a_Html_tag_set_valign_attr(DilloHtml *html, const char *tag, int tagsize, - dw::core::style::StyleAttrs *style_attrs); + CssPropertyList *props); void a_Html_set_top_font(DilloHtml *html, const char *name, int size, int BI, int BImask); |