aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-10-28 01:15:19 +0200
committerjcid <devnull@localhost>2007-10-28 01:15:19 +0200
commit4c6e82430a895d577d3767ef12fccff27922ac25 (patch)
tree8baa24a9f27b16cc9f48e20f35f05d8b8d95cc9e
parent6e982fdd085aded757765aadf2b26d6aa896da62 (diff)
Added missing size-parsing for the <hr> element.
-rw-r--r--ChangeLog1
-rw-r--r--src/html.cc17
2 files changed, 10 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index d30d0497..e444e026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}
/*