From e7683d74a3a5ad954a9ce2b8a7d4cce89a3aec4e Mon Sep 17 00:00:00 2001 From: "coltware@gmail.com" Date: Wed, 25 Nov 2009 15:18:31 +0000 Subject: [PATCH] bug a@clear ez, y! : style="clear:both" -> clear="all" i,ez,y!: use s_xxxx_nopush_and_get_now_style --- src/chxj_ixhtml10.c | 2 +- src/chxj_jxhtml.c | 8 +++++--- src/chxj_xhtml_mobile_1_0.c | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/chxj_ixhtml10.c b/src/chxj_ixhtml10.c index cc5a6802..49c72dcd 100755 --- a/src/chxj_ixhtml10.c +++ b/src/chxj_ixhtml10.c @@ -1406,7 +1406,7 @@ s_ixhtml10_start_br_tag(void *pdoc, Node *node) } } if (IS_CSS_ON(ixhtml10->entryp)) { - css_prop_list_t *style = s_ixhtml10_push_and_get_now_style(pdoc, node, attr_style); + css_prop_list_t *style = s_ixhtml10_nopush_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; diff --git a/src/chxj_jxhtml.c b/src/chxj_jxhtml.c index bfb3f3c7..0765b97e 100755 --- a/src/chxj_jxhtml.c +++ b/src/chxj_jxhtml.c @@ -1438,17 +1438,19 @@ s_jxhtml_start_br_tag(void *pdoc, Node *node) } } if (IS_CSS_ON(jxhtml->entryp)) { - css_prop_list_t *style = s_jxhtml_push_and_get_now_style(pdoc, node, attr_style); + css_prop_list_t *style = s_jxhtml_nopush_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { if (cur->value && *cur->value) { if ( STRCASEEQ('l','L',"left", cur->value) - || STRCASEEQ('r','R',"right", cur->value) - || STRCASEEQ('b','B',"both" ,cur->value)) { + || STRCASEEQ('r','R',"right", cur->value)) { attr_clear = apr_pstrdup(doc->pool, cur->value); } + else if(STRCASEEQ('b','B',"both" ,cur->value)) { + attr_clear = apr_pstrdup(doc->pool, "all"); + } } } } diff --git a/src/chxj_xhtml_mobile_1_0.c b/src/chxj_xhtml_mobile_1_0.c index a837236d..16b2176e 100755 --- a/src/chxj_xhtml_mobile_1_0.c +++ b/src/chxj_xhtml_mobile_1_0.c @@ -1335,17 +1335,19 @@ s_xhtml_1_0_start_br_tag(void *pdoc, Node *node) } } if (IS_CSS_ON(xhtml->entryp)) { - css_prop_list_t *style = s_xhtml_1_0_push_and_get_now_style(pdoc, node, attr_style); + css_prop_list_t *style = s_xhtml_1_0_nopush_and_get_now_style(pdoc, node, attr_style); if (style) { css_property_t *clear_prop = chxj_css_get_property_value(doc, style, "clear"); css_property_t *cur; for (cur = clear_prop->next; cur != clear_prop; cur = cur->next) { if (cur->value && *cur->value) { if ( STRCASEEQ('l','L',"left", cur->value) - || STRCASEEQ('r','R',"right", cur->value) - || STRCASEEQ('b','B',"both" ,cur->value)) { + || STRCASEEQ('r','R',"right", cur->value)) { attr_clear = apr_pstrdup(doc->pool, cur->value); } + else if(STRCASEEQ('b','B',"both" ,cur->value)) { + attr_clear = apr_pstrdup(doc->pool, "all"); + } } } } -- 2.11.0