35
35
import io .sf .carte .doc .style .css .nsac .Selector ;
36
36
import io .sf .carte .doc .style .css .nsac .SelectorList ;
37
37
import io .sf .carte .doc .style .css .om .AbstractCSSStyleSheet ;
38
- import io .sf .carte .doc .style .css .om .CSSStyleDeclarationRule ;
39
38
import io .sf .carte .doc .style .css .om .DefaultSheetErrorHandler ;
40
39
import io .sf .carte .doc .style .css .om .DefaultStyleDeclarationErrorHandler ;
41
40
import io .sf .carte .doc .style .css .om .RuleParseException ;
41
+ import io .sf .carte .doc .style .css .om .StyleRule ;
42
42
import io .sf .carte .doc .style .css .property .CSSPropertyValueException ;
43
43
44
44
abstract public class BaseSiteErrorReporter implements SiteErrorReporter {
@@ -123,9 +123,7 @@ public void sideComparison(String message) {
123
123
public void leftHasMoreSheets (List <CSSStyleSheet <? extends CSSRule >> missingSheets , int smallerCount ) {
124
124
writeError (leftSide + " has more style sheets, " + (missingSheets .size () + smallerCount ) + " instead of "
125
125
+ smallerCount );
126
- Iterator <CSSStyleSheet <? extends CSSRule >> it = missingSheets .iterator ();
127
- while (it .hasNext ()) {
128
- CSSStyleSheet <? extends CSSRule > sheet = it .next ();
126
+ for (CSSStyleSheet <? extends CSSRule > sheet : missingSheets ) {
129
127
StringBuilder sb = new StringBuilder (128 );
130
128
sb .append ("The sheet is not in " ).append (rightSide ).append (", href " ).append (sheet .getHref ());
131
129
Node owner = sheet .getOwnerNode ();
@@ -141,9 +139,7 @@ public void leftHasMoreSheets(List<CSSStyleSheet<? extends CSSRule>> missingShee
141
139
public void rightHasMoreSheets (List <CSSStyleSheet <? extends CSSRule >> missingSheets , int smallerCount ) {
142
140
writeError (rightSide + " has more style sheets, " + (missingSheets .size () + smallerCount ) + " instead of "
143
141
+ smallerCount );
144
- Iterator <CSSStyleSheet <? extends CSSRule >> it = missingSheets .iterator ();
145
- while (it .hasNext ()) {
146
- CSSStyleSheet <? extends CSSRule > sheet = it .next ();
142
+ for (CSSStyleSheet <? extends CSSRule > sheet : missingSheets ) {
147
143
StringBuilder sb = new StringBuilder (128 );
148
144
sb .append ("The sheet is not in " ).append (leftSide ).append (", href " ).append (sheet .getHref ());
149
145
Node owner = sheet .getOwnerNode ();
@@ -198,7 +194,7 @@ public void presentationalHintError(DOMElement element, Throwable ex) {
198
194
}
199
195
200
196
@ Override
201
- public void ruleSelectorError (CSSStyleDeclarationRule stylerule , SelectorList selist , SelectorList otherSelist ,
197
+ public void ruleSelectorError (StyleRule stylerule , SelectorList selist , SelectorList otherSelist ,
202
198
String selectorText , int sheetIndex , int ruleIndex , AbstractCSSStyleSheet parent ) {
203
199
writeSerializationError ("Selector reparse error in rule: " + ruleIndex + " in sheet " + parent .getHref () + ":" );
204
200
writeSerializationError ("List 1 (CSSOM): " + stylerule .getSelectorText ());
@@ -436,14 +432,6 @@ public void omIssues(CSSStyleSheet<? extends CSSRule> sheet, int sheetIndex, She
436
432
writeError ("Rule parsing error: " + it .next ().toString ());
437
433
}
438
434
}
439
- LinkedList <String > emptyRules = dseh .getEmptyStyleRules ();
440
- if (emptyRules != null ) {
441
- selectWarningTargetSheet (sheet , sheetIndex );
442
- Iterator <String > it = emptyRules .iterator ();
443
- while (it .hasNext ()) {
444
- writeWarning ("Empty style rule with selector: " + it .next ());
445
- }
446
- }
447
435
}
448
436
}
449
437
0 commit comments