Skip to content

Commit 7b18f49

Browse files
AnhelinaMiText-CI
authored andcommitted
Code refactoring for renderers
Fix formatting issues, rearrange imports Autoported commit. Original commit hash: [78eb8c509]
1 parent cba2050 commit 7b18f49

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/flex/FlexGapTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,11 @@ public virtual void GapNestedFlexContainerColumnTest() {
156156

157157
[NUnit.Framework.Test]
158158
public virtual void GapAlignContentTest() {
159-
// TODO DEVSIX-9473 Fix issues on page split
160159
ConvertToPdfAndCompare("gapAlignContent", SOURCE_FOLDER, DESTINATION_FOLDER);
161160
}
162161

163162
[NUnit.Framework.Test]
164163
public virtual void GapAlignContentRowRevDirTest() {
165-
// TODO DEVSIX-9473 Fix issues on page split
166164
ConvertToPdfAndCompare("gapAlignContentRowRevDir", SOURCE_FOLDER, DESTINATION_FOLDER);
167165
}
168166

@@ -180,7 +178,6 @@ public virtual void GapAlignContentColumnRevDirTest() {
180178

181179
[NUnit.Framework.Test]
182180
public virtual void GapAlignContentWrapRevTest() {
183-
// TODO DEVSIX-9473 Fix issues on page split
184181
ConvertToPdfAndCompare("gapAlignContentWrapRev", SOURCE_FOLDER, DESTINATION_FOLDER);
185182
}
186183

@@ -334,7 +331,6 @@ public virtual void ColGapRemTest() {
334331

335332
[NUnit.Framework.Test]
336333
public virtual void ColGapAlignContentTest() {
337-
// TODO DEVSIX-9473 Fix issues on page split
338334
ConvertToPdfAndCompare("colGapAlignContent", SOURCE_FOLDER, DESTINATION_FOLDER);
339335
}
340336

@@ -442,7 +438,6 @@ public virtual void RowGapWrapTest() {
442438

443439
[NUnit.Framework.Test]
444440
public virtual void RowGapAlignContentTest() {
445-
// TODO DEVSIX-9473 Fix issues on page split
446441
ConvertToPdfAndCompare("rowGapAlignContent", SOURCE_FOLDER, DESTINATION_FOLDER);
447442
}
448443

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/flex/PageSplitTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ You should have received a copy of the GNU Affero General Public License
2626
namespace iText.Html2pdf.Css.Flex {
2727
[NUnit.Framework.Category("IntegrationTest")]
2828
public class PageSplitTest : ExtendedHtmlConversionITextTest {
29-
// TODO DEVSIX-9473 Fix issues on page split
3029
private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
3130
.CurrentContext.TestDirectory) + "/resources/itext/html2pdf/css/flex/PageSplitTest/";
3231

itext/itext.html2pdf/itext/html2pdf/attach/impl/layout/HtmlDocumentRenderer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public class HtmlDocumentRenderer : DocumentRenderer {
4646
/// </remarks>
4747
private const bool TRIM_LAST_BLANK_PAGE = true;
4848

49+
private readonly HtmlBodyStylesApplierHandler htmlBodyHandler;
50+
51+
private readonly IDictionary<int, HtmlBodyStylesApplierHandler.PageStylesProperties> pageStylesPropertiesMap
52+
= new Dictionary<int, HtmlBodyStylesApplierHandler.PageStylesProperties>();
53+
4954
/// <summary>The page context processor for the first page.</summary>
5055
private PageContextProcessor firstPageProc;
5156

@@ -66,13 +71,8 @@ public class HtmlDocumentRenderer : DocumentRenderer {
6671

6772
private HtmlDocumentRenderer.PageMarginBoxesDrawingHandler marginBoxesHandler;
6873

69-
private HtmlBodyStylesApplierHandler htmlBodyHandler;
70-
71-
private IDictionary<int, HtmlBodyStylesApplierHandler.PageStylesProperties> pageStylesPropertiesMap = new
72-
Dictionary<int, HtmlBodyStylesApplierHandler.PageStylesProperties>();
73-
7474
/// <summary>
75-
/// The waiting element, an child element is kept waiting for the
75+
/// The waiting element, a child element is kept waiting for the
7676
/// next element to process the "keep with previous" property.
7777
/// </summary>
7878
private IRenderer waitingElement;

itext/itext.html2pdf/itext/html2pdf/attach/impl/layout/RunningElement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace iText.Html2pdf.Attach.Impl.Layout {
4040
/// from the normal flow. This element is designed to register where particular running element would have been placed.
4141
/// </remarks>
4242
public class RunningElement : Div {
43-
private RunningElementContainer runningElementContainer;
43+
private readonly RunningElementContainer runningElementContainer;
4444

4545
/// <summary>
4646
/// Creates a new instance of
@@ -60,7 +60,7 @@ protected override IRenderer MakeNewRenderer() {
6060
//\cond DO_NOT_DOCUMENT
6161
/// <summary>It's an empty div so it's not expected to be ever split between areas.</summary>
6262
internal class RunningElementRenderer : DivRenderer {
63-
private RunningElementContainer runningElementContainer;
63+
private readonly RunningElementContainer runningElementContainer;
6464

6565
private bool isFirstOnRootArea;
6666

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
04d01556f88421769b55c39ffec402cfa0bc57ae
1+
78eb8c50918acb087e5c7975653860258d1ff2d0

0 commit comments

Comments
 (0)