Skip to content

Commit 17b47a2

Browse files
committed
Cover some inline-block as td children cases
DEVSIX-6158
1 parent e6c02df commit 17b47a2

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

src/test/java/com/itextpdf/html2pdf/element/TableTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,16 @@ public void thTagConvertToPdfTest() throws IOException, InterruptedException {
635635
runTest("thTagConvertToPdf");
636636
}
637637

638+
@Test
639+
public void inlineWithInlineBlockAsTdChildTest() throws IOException, InterruptedException {
640+
runTest("inlineWithInlineBlockAsTdChild");
641+
}
642+
643+
@Test
644+
public void inlineWithInlineBlockAsTdChildWrappedTest() throws IOException, InterruptedException {
645+
runTest("inlineWithInlineBlockAsTdChildWrapped");
646+
}
647+
638648
private void runTest(String testName) throws IOException, InterruptedException {
639649
runTest(testName, false);
640650
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<table style="background-color: yellow;">
2+
<tr>
3+
<td style="background-color: green;">
4+
<span style="background-color: blue;">
5+
In inline before inner inline block
6+
<div style="display: inline-block; background-color: red;">Inner inline block</div>
7+
In inline after inner inline block
8+
</span>
9+
</td>
10+
</tr>
11+
</table>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<table style="background-color: yellow;">
2+
<tr>
3+
<td style="background-color: green;">
4+
<span style="background-color: blue;">
5+
In this span there is some text and then an inline-block, which should be wrapped rather than split
6+
<div style="display: inline-block; background-color: red;">Inner inline block</div>
7+
</span>
8+
</td>
9+
</tr>
10+
</table>

0 commit comments

Comments
 (0)