Skip to content

Commit d263f09

Browse files
Kate IvanovaiText-CI
authored andcommitted
Add LineHeightTest#inlineBlockFloatAndLineHeightTest
DEVSIX-4574
1 parent 308db0c commit d263f09

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/LineHeightTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ public void lineHeightInheritInSpanTest() throws IOException, InterruptedExcepti
204204
testLineHeight("lineHeightInheritInSpan");
205205
}
206206

207+
@Test
208+
// TODO: update cmp file after fixing DEVSIX-4604
209+
public void inlineBlockFloatAndLineHeightTest() throws IOException, InterruptedException {
210+
testLineHeight("inlineBlockFloatAndLineHeight");
211+
}
212+
207213
void testLineHeight(String name) throws IOException, InterruptedException {
208214
String sourceHtml = SOURCE_FOLDER + name + ".html";
209215
String destinationPdf = DESTINATION_FOLDER + name + ".pdf";
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<style>
6+
div {
7+
width: 400px;
8+
font-size:50px;
9+
border: solid blue 2px;
10+
display: inline-block;
11+
line-height: 2;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
<p>Span with red border has float: left, it's height should be the same as in Div with blue border</p>
17+
<p>Span with yellow border has no float</p>
18+
<p>Span with green border has float: left and line-height: 1.2</p>
19+
<div>
20+
<span style="border: solid red 2px; float: left; width: 100;">Text1</span>
21+
<span style="border: solid yellow 2px; width: 100;">Text2</span>
22+
<span style="border: solid green 2px; float: left; line-height: 1.2; width: 100;">Text3</span>
23+
</div>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)