summaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-01-08 14:51:23 +0100
committerSebastian Geerken <devnull@localhost>2015-01-08 14:51:23 +0100
commit3fa61740d50d8a8fd6c61eb86e1f7a45a3762570 (patch)
treeb6d857642d861fc594292ec69260bfc3cc617be0 /src/html.cc
parente05ebd46d570cd64c116ed4bdde669ea0962e99b (diff)
parent428094b178eb03d8e500c81837caac402e4b138c (diff)
Merge with main repo.
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/html.cc b/src/html.cc
index be4d3526..8e4f6ded 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -357,16 +357,22 @@ bool a_Html_tag_set_valign_attr(DilloHtml *html, const char *tag, int tagsize)
/*
- * Create and add a new Textblock to the current Textblock
+ * Create and add a new Textblock to the current Textblock. Typically
+ * only one of addBreaks and addBreakOpt is true.
*/
-static void Html_add_textblock(DilloHtml *html, bool addBreaks, int breakSpace)
+static void Html_add_textblock(DilloHtml *html, bool addBreaks, int breakSpace,
+ bool addBreakOpt)
{
Textblock *textblock = new Textblock (prefs.limit_text_width);
if (addBreaks)
HT2TB(html)->addParbreak (breakSpace, html->wordStyle ());
+
HT2TB(html)->addWidget (textblock, html->style ()); /* Works also for floats
etc. */
+ if (addBreakOpt)
+ HT2TB(html)->addBreakOption (html->style (), false);
+
if (addBreaks)
HT2TB(html)->addParbreak (breakSpace, html->wordStyle ());
S_TOP(html)->textblock = html->dw = textblock;
@@ -2029,7 +2035,7 @@ static void Html_tag_content_frameset (DilloHtml *html,
{
HT2TB(html)->addParbreak (9, html->wordStyle ());
HT2TB(html)->addText("--FRAME--", html->wordStyle ());
- Html_add_textblock(html, true, 5);
+ Html_add_textblock(html, true, 5, false);
}
/*
@@ -2811,7 +2817,7 @@ static void Html_tag_close_a(DilloHtml *html)
static void Html_tag_open_blockquote(DilloHtml *html,
const char *tag, int tagsize)
{
- Html_add_textblock(html, true, 9);
+ Html_add_textblock(html, true, 9, false);
}
/*
@@ -3075,7 +3081,7 @@ static void Html_tag_open_dt(DilloHtml *html, const char *tag, int tagsize)
*/
static void Html_tag_open_dd(DilloHtml *html, const char *tag, int tagsize)
{
- Html_add_textblock(html, true, 9);
+ Html_add_textblock(html, true, 9, false);
}
/*
@@ -3868,12 +3874,13 @@ static void Html_check_html5_obsolete(DilloHtml *html, int ni)
static void Html_display_block(DilloHtml *html)
{
- Html_add_textblock(html, !Html_will_textblock_be_out_of_flow (html), 0);
+ Html_add_textblock(html, !Html_will_textblock_be_out_of_flow (html), 0,
+ false /* Perhaps true for widgets oof? */);
}
static void Html_display_inline_block(DilloHtml *html)
{
- Html_add_textblock(html, false, 0);
+ Html_add_textblock(html, false, 0, true);
}
static void Html_display_listitem(DilloHtml *html)