From: coltware@gmail.com Date: Thu, 5 Nov 2009 03:26:04 +0000 (+0000) Subject: for XHTML(ez) X-Git-Tag: v0.14.1~113 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=04a48e671fb725024ca451d51a1a81b10062dbc4;p=modchxj%2Fmod_chxj.git for XHTML(ez) git-svn-id: svn://coltware.com/home/svn/svnroot/mod_chxj/trunk@15 94a86f0a-4377-0410-8349-a3afc59ff858 --- diff --git a/src/chxj_xhtml_mobile_1_0.c b/src/chxj_xhtml_mobile_1_0.c index dd412ff5..f3ef247e 100644 --- a/src/chxj_xhtml_mobile_1_0.c +++ b/src/chxj_xhtml_mobile_1_0.c @@ -2608,6 +2608,7 @@ s_xhtml_1_0_start_h1_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -2627,6 +2628,7 @@ s_xhtml_1_0_start_h1_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -2639,14 +2641,32 @@ s_xhtml_1_0_start_h1_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L(""); @@ -2693,6 +2713,7 @@ s_xhtml_1_0_start_h2_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -2712,6 +2733,7 @@ s_xhtml_1_0_start_h2_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -2724,14 +2746,32 @@ s_xhtml_1_0_start_h2_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L(""); @@ -2778,6 +2818,7 @@ s_xhtml_1_0_start_h3_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -2797,6 +2838,7 @@ s_xhtml_1_0_start_h3_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -2809,14 +2851,32 @@ s_xhtml_1_0_start_h3_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L(""); @@ -2864,6 +2924,7 @@ s_xhtml_1_0_start_h4_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -2883,6 +2944,7 @@ s_xhtml_1_0_start_h4_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -2895,14 +2957,32 @@ s_xhtml_1_0_start_h4_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L(""); @@ -2950,6 +3030,7 @@ s_xhtml_1_0_start_h5_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -2969,6 +3050,7 @@ s_xhtml_1_0_start_h5_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -2981,14 +3063,32 @@ s_xhtml_1_0_start_h5_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L(""); @@ -3036,6 +3136,7 @@ s_xhtml_1_0_start_h6_tag(void *pdoc, Node *node) Attr *attr; char *attr_style = NULL; char *attr_align = NULL; + char *css_clear = NULL; for (attr = qs_get_attr(doc,node); attr; @@ -3055,6 +3156,7 @@ s_xhtml_1_0_start_h6_tag(void *pdoc, Node *node) css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *list_style_type_prop = chxj_css_get_property_value(doc, style, "text-align"); + css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = list_style_type_prop->next; cur != list_style_type_prop; cur = cur->next) { if (STRCASEEQ('l','L',"left", cur->value)) { @@ -3067,14 +3169,32 @@ s_xhtml_1_0_start_h6_tag(void *pdoc, Node *node) attr_align = apr_pstrdup(doc->pool, "right"); } } + for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { + if (STRCASEEQ('b','B',"both", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "both"); + } + else if (STRCASEEQ('r','R',"right", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "right"); + } + else if (STRCASEEQ('l','L',"left", cur->value)) { + css_clear = apr_pstrdup(doc->pool, "left"); + } + } } } W_L("");