diff options
author | jcid <devnull@localhost> | 2007-10-28 01:15:19 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-10-28 01:15:19 +0200 |
commit | 4c6e82430a895d577d3767ef12fccff27922ac25 (patch) | |
tree | 8baa24a9f27b16cc9f48e20f35f05d8b8d95cc9e /src | |
parent | 6e982fdd085aded757765aadf2b26d6aa896da62 (diff) |
Added missing size-parsing for the <hr> element.
Diffstat (limited to 'src')
-rw-r--r-- | src/html.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/html.cc b/src/html.cc index 9e790174..5059e4ff 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2973,10 +2973,12 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) const char *attrbuf; int32_t size = 0; - width_ptr = Html_get_attr_wdef(html, tag, tagsize, "width", "100%"); - style_attrs = *S_TOP(html)->style; - + + width_ptr = Html_get_attr_wdef(html, tag, tagsize, "width", "100%"); + style_attrs.width = Html_parse_length (html, width_ptr); + dFree(width_ptr); + if ((attrbuf = Html_get_attr(html, tag, tagsize, "size"))) size = strtol(attrbuf, NULL, 10); @@ -3009,17 +3011,16 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) style_attrs.borderWidth.left = (size + 1) / 2; style_attrs.borderWidth.bottom = style_attrs.borderWidth.right = size / 2; - style = Style::create (HT2LT(html), &style_attrs); + style = Style::create (HT2LT(html), &style_attrs); DW2TB(html->dw)->addParbreak (5, S_TOP(html)->style); hruler = new Ruler(); - hruler->setStyle (style); - DW2TB(html->dw)->addWidget (hruler, style); - style->unref (); + hruler->setStyle (style); + DW2TB(html->dw)->addWidget (hruler, style); + style->unref (); //DW2TB(html->dw)->addWidget (hruler, S_TOP(html)->style); DW2TB(html->dw)->addParbreak (5, S_TOP(html)->style); - dFree(width_ptr); } /* |