Skip to content

Commit 3413c4f

Browse files
iText-CIars18wrw
authored andcommitted
Remove redundant FORCED_PLACEMENT check.
DEVSIX-1490 Autoported commit. Original commit hash: [2f9dfa37] Manual files: src/main/java/com/itextpdf/html2pdf/attach/impl/layout/form/renderer/AbstractFormFieldRenderer.java
1 parent 80cb3f8 commit 3413c4f

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

itext/itext.html2pdf/itext/html2pdf/attach/impl/layout/form/renderer/AbstractFormFieldRenderer.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,6 @@ public override LayoutResult Layout(LayoutContext layoutContext) {
107107
Rectangle bBox = layoutContext.GetArea().GetBBox().Clone().MoveDown(INF - parentHeight).SetHeight(INF);
108108
layoutContext.GetArea().SetBBox(bBox);
109109
LayoutResult result = base.Layout(layoutContext);
110-
if (!true.Equals(GetPropertyAsBoolean(Property.FORCED_PLACEMENT)) && (result.GetStatus() != LayoutResult.FULL
111-
)) {
112-
//@TODO investigate this tricky code a little more.
113-
FloatPropertyValue? floatPropertyValue = this.GetProperty<FloatPropertyValue?>(Property.FLOAT);
114-
if (floatPropertyValue == null || floatPropertyValue == FloatPropertyValue.NONE) {
115-
SetProperty(Property.FORCED_PLACEMENT, true);
116-
}
117-
else {
118-
flatRenderer = childRenderers[0];
119-
ProcessLangAttribute();
120-
childRenderers.Clear();
121-
childRenderers.Add(flatRenderer);
122-
AdjustFieldLayout(layoutContext);
123-
if (IsLayoutBasedOnFlatRenderer()) {
124-
Rectangle fBox = flatRenderer.GetOccupiedArea().GetBBox();
125-
occupiedArea.GetBBox().SetX(fBox.GetX()).SetY(fBox.GetY()).SetWidth(fBox.GetWidth()).SetHeight(fBox.GetHeight
126-
());
127-
ApplyPaddings(occupiedArea.GetBBox(), true);
128-
ApplyBorderBox(occupiedArea.GetBBox(), true);
129-
ApplyMargins(occupiedArea.GetBBox(), true);
130-
}
131-
}
132-
return new MinMaxWidthLayoutResult(LayoutResult.NOTHING, occupiedArea, null, this, this).SetMinMaxWidth(new
133-
MinMaxWidth());
134-
}
135110
if (!childRenderers.IsEmpty()) {
136111
flatRenderer = childRenderers[0];
137112
ProcessLangAttribute();

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fd4207499f6bc5f6e99477e519beb4cc7f7c2aa8
1+
2f9dfa37f96dbf72ccf5ef4ec5e87878619eab83

0 commit comments

Comments
 (0)