diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/html.cc | 17 |
2 files changed, 10 insertions, 8 deletions
@@ -39,6 +39,7 @@ dillo-fltk2 - Enabled clicking over image links. - Improved notification upon leaving links. - Implemented image-link URL showing in status bar. + - Added missing size-parsing for the <hr> element. Patches: place +- Fixed a problem with locally-installed dpis. Patch: place, Jorge Arellano 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); } /* |