aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-03-09 23:50:20 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-03-09 23:50:20 +0100
commitc74425a513d3cf98186298cda94528424aabfdbc (patch)
tree254cfc8e3cf9462500fe86ebd1aabf989b4ca34d /src/html.cc
parent0a2453a1e1e89e8821e4e8a230f0f56e2f7dd20c (diff)
support display:inline-block
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc
index 0cee0a8f..c7e02abf 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -42,6 +42,7 @@
#include "dw/textblock.hh"
#include "dw/bullet.hh"
#include "dw/listitem.hh"
+#include "dw/inlineblock.hh"
#include "dw/image.hh"
#include "dw/ruler.hh"
@@ -3448,6 +3449,13 @@ static void Html_display_block(DilloHtml *html)
Html_add_textblock(html, 0);
}
+static void Html_display_inline_block(DilloHtml *html)
+{
+ Textblock *textblock = new InlineBlock (prefs.limit_text_width);
+ HT2TB(html)->addWidget (textblock, html->styleEngine->style ());
+ S_TOP(html)->textblock = html->dw = textblock;
+}
+
static void Html_display_listitem(DilloHtml *html)
{
Style *style = html->styleEngine->style ();
@@ -3543,6 +3551,9 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize)
case DISPLAY_BLOCK:
Html_display_block(html);
break;
+ case DISPLAY_INLINE_BLOCK:
+ Html_display_inline_block(html);
+ break;
case DISPLAY_LIST_ITEM:
Html_display_listitem(html);
break;
@@ -3550,7 +3561,6 @@ static void Html_process_tag(DilloHtml *html, char *tag, int tagsize)
S_TOP(html)->display_none = true;
break;
case DISPLAY_INLINE:
- case DISPLAY_INLINE_BLOCK: // TODO: implement inline-block
default:
break;
}