Skip to content

Commit a1d8eeb

Browse files
Samuel HuylebroeckiText-CI
authored andcommitted
Deprecate VISIBLE and OVERFLOW in CssConstants
Deprecated in favour of the same constants in CommonCssConstants in Styled-Xml-parser DEVSIX-2240 Autoported commit. Original commit hash: [09bbe640]
1 parent 0696c83 commit a1d8eeb

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/PageRuleTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ source product.
5757
using iText.Layout;
5858
using iText.Layout.Element;
5959
using iText.Layout.Tagging;
60+
using iText.StyledXmlParser.Css;
6061
using iText.StyledXmlParser.Css.Media;
6162
using iText.StyledXmlParser.Css.Page;
6263
using iText.StyledXmlParser.Node;
@@ -243,7 +244,7 @@ public override void Apply(ProcessorContext context, IStylesContainer stylesCont
243244
) {
244245
IDictionary<String, String> styles = stylesContainer.GetStyles();
245246
if (styles.Get(CssConstants.OVERFLOW) == null) {
246-
styles.Put(CssConstants.OVERFLOW, CssConstants.VISIBLE);
247+
styles.Put(CssConstants.OVERFLOW, CommonCssConstants.VISIBLE);
247248
}
248249
base.Apply(context, stylesContainer, tagWorker);
249250
}

itext/itext.html2pdf/itext/html2pdf/attach/util/WaitingInlineElementsHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ source product.
4949
using iText.Kernel.Pdf.Tagging;
5050
using iText.Layout;
5151
using iText.Layout.Element;
52+
using iText.StyledXmlParser.Css;
5253
using iText.StyledXmlParser.Util;
5354

5455
namespace iText.Html2pdf.Attach.Util {
@@ -151,7 +152,7 @@ public virtual void FlushHangingLeaves(IPropertyContainer container) {
151152
Paragraph p = CreateLeavesContainer();
152153
if (p != null) {
153154
IDictionary<String, String> map = new Dictionary<String, String>();
154-
map.Put(CssConstants.OVERFLOW, CssConstants.VISIBLE);
155+
map.Put(CssConstants.OVERFLOW, CommonCssConstants.VISIBLE);
155156
OverflowApplierUtil.ApplyOverflow(map, p);
156157
if (container is Document) {
157158
((Document)container).Add(p);

itext/itext.html2pdf/itext/html2pdf/css/CssConstants.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public class CssConstants : CommonCssConstants {
9090
public const String OUTLINE_OFFSET = "outline-offset";
9191

9292
/// <summary>The Constant OVERFLOW.</summary>
93+
/// <remarks>The Constant OVERFLOW. @Deprecated in favour of CommonCssConstants.OVERFLOW</remarks>
94+
[Obsolete]
9395
public const String OVERFLOW = "overflow";
9496

9597
/// <summary>The Constant OVERFLOW_X.</summary>
@@ -117,6 +119,7 @@ public class CssConstants : CommonCssConstants {
117119
public const String VERTICAL_ALIGN = "vertical-align";
118120

119121
/// <summary>The Constant VISIBLE.</summary>
122+
[System.ObsoleteAttribute(@"in favour of StyledXmlParser")]
120123
public const String VISIBLE = "visible";
121124

122125
// property values
@@ -254,7 +257,7 @@ public class CssConstants : CommonCssConstants {
254257

255258
/// <summary>The Constant OVERFLOW_VALUES.</summary>
256259
public static readonly ICollection<String> OVERFLOW_VALUES = new HashSet<String>(JavaUtil.ArraysAsList(new
257-
String[] { VISIBLE, HIDDEN, SCROLL, AUTO }));
260+
String[] { CommonCssConstants.VISIBLE, HIDDEN, SCROLL, AUTO }));
258261

259262
// pseudo-elements
260263
/// <summary>The Constant AFTER.</summary>

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
908db288a1720230f09f1952879bd336e08d5606
1+
09bbe6400e33e289eebc0e77e94bd0719a581538

0 commit comments

Comments
 (0)