File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed
itext.tests/itext.styledxmlparser.tests/itext/styledxmlparser/css/parse
itext/itext.styledxmlparser/itext/styledxmlparser/css Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,7 @@ public virtual void Test10() {
139
139
140
140
[ NUnit . Framework . Test ]
141
141
public virtual void Test11 ( ) {
142
- // TODO in this test declarations of the page at-rule with compound selector are duplicated.
143
- // See CssPageRule#addBodyCssDeclarations() method for the reason and possible solution if this becomes important.
142
+ // TODO DEVSIX-6364 Fix the body declarations duplication for each pageSelector part
144
143
String cssFile = sourceFolder + "css11.css" ;
145
144
String cmpFile = sourceFolder + "cmp_css11.css" ;
146
145
CssStyleSheet styleSheet = CssStyleSheetParser . Parse ( new FileStream ( cssFile , FileMode . Open , FileAccess . Read
Original file line number Diff line number Diff line change @@ -241,7 +241,8 @@ public virtual bool Matches(MediaDeviceDescription deviceDescription) {
241
241
/// </returns>
242
242
private static float ParseAbsoluteLength ( String value ) {
243
243
if ( CssTypesValidationUtils . IsRelativeValue ( value ) ) {
244
- // TODO here should be used default font size of the browser, it probably should be fetched from the more generic place than private class constant
244
+ // TODO Use some shared default value (from default.css or CssDefaults)
245
+ // rather than a constant of this class
245
246
return CssDimensionParsingUtils . ParseRelativeValue ( value , DEFAULT_FONT_SIZE ) ;
246
247
}
247
248
else {
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public CssMarginRule(String ruleName)
68
68
* @see com.itextpdf.styledxmlparser.css.CssNestedAtRule#addBodyCssDeclarations(java.util.List)
69
69
*/
70
70
public override void AddBodyCssDeclarations ( IList < CssDeclaration > cssDeclarations ) {
71
+ // TODO DEVSIX-6364 Fix the body declarations duplication for each pageSelector part
71
72
foreach ( ICssSelector pageSelector in pageSelectors ) {
72
73
this . body . Add ( new CssNonStandardRuleSet ( new CssPageMarginBoxSelector ( GetRuleName ( ) , pageSelector ) , cssDeclarations
73
74
) ) ;
Original file line number Diff line number Diff line change @@ -77,16 +77,17 @@ public CssPageRule(String ruleParameters)
77
77
* @see com.itextpdf.styledxmlparser.css.CssNestedAtRule#addBodyCssDeclarations(java.util.List)
78
78
*/
79
79
public override void AddBodyCssDeclarations ( IList < CssDeclaration > cssDeclarations ) {
80
- // TODO Due to this for-loop, on toString method call for the CssPageRule instance
80
+ // TODO DEVSIX-6364 Fix the body declarations duplication for each pageSelector part
81
+ // Due to this for-loop, on toString method call for the CssPageRule instance
81
82
// all the body declarations will be duplicated for each pageSelector part.
82
83
// This potentially could lead to a nasty behaviour when declarations will double
83
- // for each read-write iteration of the same css-file (however, this use case seems
84
- // to be unlikely to happen).
85
- // Possible solution would be to split single page rule with compound selector into
84
+ // for each read-write iteration of the same css-file (however, this use case seems
85
+ // to be unlikely to happen).
86
+ // Possible solution would be to split single page rule with compound selector into
86
87
// several page rules with simple selectors on addition of the page rule to it's parent.
87
88
//
88
89
// Also, the same concerns this method implementation in CssMarginRule class.
89
- //
90
+ //
90
91
// See CssStyleSheetParserTest#test11 test.
91
92
foreach ( ICssSelector pageSelector in pageSelectors ) {
92
93
this . body . Add ( new CssNonStandardRuleSet ( pageSelector , cssDeclarations ) ) ;
Original file line number Diff line number Diff line change 1
- 4575c74eaf100c0151ee203e9eac8aa2fa794de5
1
+ ffc141d097ec67efe16fc83fbf565125712f9da4
You can’t perform that action at this time.
0 commit comments