From 5861733529f3ab3549033599a3b3e9a4dc018ee6 Mon Sep 17 00:00:00 2001
From: Tor Andersson <tor.andersson@artifex.com>
Date: Tue, 5 May 2015 18:32:51 +0200
Subject: epub: Parse (and ignore) display: inline-block.

---
 source/html/css-apply.c   | 2 ++
 source/html/html-layout.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'source/html')

diff --git a/source/html/css-apply.c b/source/html/css-apply.c
index fbccac8d..bf0336eb 100644
--- a/source/html/css-apply.c
+++ b/source/html/css-apply.c
@@ -892,6 +892,8 @@ fz_get_css_match_display(fz_css_match *match)
 			return DIS_BLOCK;
 		if (!strcmp(value->data, "list-item"))
 			return DIS_LIST_ITEM;
+		if (!strcmp(value->data, "inline-block"))
+			return DIS_INLINE_BLOCK;
 	}
 	return DIS_INLINE;
 }
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 4926dc51..6e9655db 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -316,7 +316,7 @@ static void generate_boxes(fz_context *ctx, fz_html_font_set *set, fz_archive *z
 				box = new_box(ctx);
 				fz_apply_css_style(ctx, set, &box->style, &match);
 
-				if (display == DIS_BLOCK)
+				if (display == DIS_BLOCK || display == DIS_INLINE_BLOCK)
 				{
 					top = insert_block_box(ctx, box, top);
 				}
-- 
cgit v1.2.3