Skip to content

Commit b0f38c8

Browse files
Fix issues with returned LayoutResult, split renderer children and RootRenderer float kids splitting
DEVSIX-1267
1 parent 5175c41 commit b0f38c8

File tree

8 files changed

+6
-4
lines changed

8 files changed

+6
-4
lines changed

src/main/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ public void addChild(IRenderer renderer) {
170170
@Override
171171
public void close() {
172172
if (waitingElement != null) {
173-
super.addChild(waitingElement);
173+
IRenderer r = this.waitingElement;
174+
waitingElement = null;
175+
super.addChild(r);
174176
}
175177
super.close();
176178
if (TRIM_LAST_BLANK_PAGE) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public void float54Test() throws IOException, InterruptedException {
361361
runTest("float54Test", "diff54_");
362362
}
363363

364-
@Test@Ignore("DEVSIX-1437")
364+
@Test
365365
public void float55Test() throws IOException, InterruptedException {
366366
runTest("float55Test", "diff55_");
367367
}
@@ -459,7 +459,7 @@ private void runTest(String testName, String diff) throws IOException, Interrupt
459459
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, diff));
460460
}
461461

462-
@Test@Ignore("DEVSIX-1437")
462+
@Test
463463
public void responsiveIText() throws IOException, InterruptedException {
464464
PageSize[] pageSizes = {
465465
null,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/test/resources/com/itextpdf/html2pdf/css/FloatTest/float55Test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</style>
1212

1313
<body>
14-
<p style="height: 900px">somep</p>
14+
<p style="height: 900px; border: solid;">somep</p>
1515
<div class="div1">
1616
<div class="div2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse suscipit, nisl quis ullamcorper euismod, nulla dui luctus nulla, ut ullamcorper orci felis sit amet sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam sit amet augue a quam varius vestibulum. Sed faucibus, diam vel ornare semper, arcu tortor congue ligula, non auctor dolor ante in leo. Cras sit amet magna velit. In iaculis felis eget turpis viverra, vel tristique felis hendrerit. Etiam tincidunt, orci eget convallis mattis, sem est lacinia orci, vel euismod dolor lectus non tortor. Nunc auctor egestas scelerisque. Integer eget orci accumsan, sagittis est non, vestibulum arcu. Pellentesque consectetur risus a tortor imperdiet blandit.</div>
1717
<div style="clear:both"></div>
Binary file not shown.

0 commit comments

Comments
 (0)