Skip to content

Commit ae116f4

Browse files
committed
Support continuous container for grid
DEVSIX-8331
1 parent d16c1ad commit ae116f4

File tree

189 files changed

+545
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+545
-5
lines changed

src/test/java/com/itextpdf/html2pdf/css/grid/GridAreaTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ public void borderBoxTest() throws IOException, InterruptedException {
104104
runTest("borderBoxTest");
105105
}
106106

107+
@Test
108+
public void borderBoxTest2() throws IOException, InterruptedException {
109+
runTest("borderBoxTest2");
110+
}
111+
107112
@Test
108113
public void differentRowSpanOnSplitTest() throws IOException, InterruptedException {
109114
runTest("differentRowSpanOnSplitTest");

src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public void templateCombinedMixedTest() throws IOException, InterruptedException
7171
}
7272

7373
@Test
74-
// TODO DEVSIX-8331
7574
public void templateCombinedMultiPageTest() throws IOException, InterruptedException {
7675
runTest("template-combined-multipage");
7776
}

src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ public void templateRowMixedTest() throws IOException, InterruptedException {
111111
}
112112

113113
@Test
114-
// TODO DEVSIX-8331
115114
public void templateRowMultiPageTest() throws IOException, InterruptedException {
116115
runTest("template-rows-multipage");
117116
}

src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplatesTest.java

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public void basicColumnFewDivs2Test() throws IOException, InterruptedException {
6767
}
6868

6969
@Test
70-
// TODO DEVSIX-8331
7170
public void basicColumnMultiPageTest() throws IOException, InterruptedException {
7271
runTest("basicColumnMultiPageTest");
7372
}
@@ -636,7 +635,7 @@ public void maxHeightFlexRowsTest() throws IOException, InterruptedException {
636635
public void maxHeightFlexRowsTest2() throws IOException, InterruptedException {
637636
runTest("maxHeightFlexRowsTest2");
638637
}
639-
638+
640639
@LogMessages(messages = {
641640
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, logLevel =
642641
LogLevelConstants.WARN)})
@@ -670,6 +669,49 @@ public void invalidTemplateRows() throws IOException, InterruptedException {
670669
runTest("invalidTemplateRows");
671670
}
672671

672+
@Test
673+
public void gridSplitPaddingMarginBorderTest() throws IOException, InterruptedException {
674+
runTest("gridSplitPaddingMarginBorderTest");
675+
}
676+
677+
@Test
678+
public void gridSplitPaddingMarginBorderTest2() throws IOException, InterruptedException {
679+
runTest("gridSplitPaddingMarginBorderTest2");
680+
}
681+
682+
@Test
683+
public void gridSplitPaddingMarginBorderTest3() throws IOException, InterruptedException {
684+
runTest("gridSplitPaddingMarginBorderTest3");
685+
}
686+
687+
@Test
688+
public void gridSplitPaddingMarginBorderTest4() throws IOException, InterruptedException {
689+
runTest("gridSplitPaddingMarginBorderTest4");
690+
}
691+
692+
@Test
693+
@LogMessages(messages = {
694+
@LogMessage(messageTemplate = LayoutLogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA, logLevel = LogLevelConstants.WARN)
695+
})
696+
public void gridSplitPaddingMarginBorderTest5() throws IOException, InterruptedException {
697+
runTest("gridSplitPaddingMarginBorderTest5");
698+
}
699+
700+
@Test
701+
public void gridSplitPaddingMarginBorderTest6() throws IOException, InterruptedException {
702+
runTest("gridSplitPaddingMarginBorderTest6");
703+
}
704+
705+
@Test
706+
public void gridSplitPaddingMarginBorderTest7() throws IOException, InterruptedException {
707+
runTest("gridSplitPaddingMarginBorderTest7");
708+
}
709+
710+
@Test
711+
public void gridSplitPaddingMarginBorderTest8() throws IOException, InterruptedException {
712+
runTest("gridSplitPaddingMarginBorderTest8");
713+
}
714+
673715
private void runTest(String testName) throws IOException, InterruptedException {
674716
convertToPdfAndCompare(testName,
675717
SOURCE_FOLDER, DESTINATION_FOLDER, false,

src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolSpanAll008Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This file is part of the iText (R) project.
2828
import com.itextpdf.test.annotations.LogMessages;
2929

3030

31-
@LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 5))
31+
@LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 9))
3232
public class MulticolSpanAll008Test extends W3CCssTest {
3333
@Override
3434
protected String getHtmlFileName() {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
.wrapper {
6+
display: grid;
7+
grid-template-columns: 1fr 2fr 3fr;
8+
grid-template-areas:
9+
"elem1 elem2 elem3"
10+
"elem1 elem4 elem5"
11+
"elem1 elem6 elem7";
12+
}
13+
14+
.wrapper {
15+
border: 2px solid #f76707;
16+
background-color: #fff4e6;
17+
}
18+
19+
.wrapper > div {
20+
border: 10px solid green;
21+
border-top: 20px solid green;
22+
box-sizing: border-box;
23+
background-color: #ffd8a8;
24+
padding: 15px;
25+
padding-top: 30px;
26+
margin: 15px;
27+
margin-top: 30px;
28+
}
29+
</style>
30+
</head>
31+
32+
<body>
33+
<p>Some text</p>
34+
<div class="wrapper">
35+
<div style="grid-area: elem1">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
36+
dolore magna aliquyam erat, sed diam voluptua.</div>
37+
<div style="grid-area: elem2">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
38+
<div style="grid-area: elem3">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
39+
<div style="grid-area: elem4">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
40+
<div style="grid-area: elem5">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
41+
<div style="grid-area: elem6">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
42+
<div style="grid-area: elem7">Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</div>
43+
</div>
44+
<p>Some bottom text</p>
45+
</body>
46+
</html>
2.2 KB
Binary file not shown.
-680 Bytes
Binary file not shown.
-60 Bytes
Binary file not shown.
-217 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)