Ignore:
Timestamp:
2018-04-15T16:21:00+02:00 (19 months ago)
Author:
Don-vip
Message:

fix #16183 - automatically remove "areaStyle" pseudo-classes from map paint styles. This class only works for validator rules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r13597 r13633  
    1616import java.util.HashMap;
    1717import java.util.HashSet;
    18 import java.util.Iterator;
    1918import java.util.LinkedHashMap;
    2019import java.util.LinkedHashSet;
     
    376375            parser.sheet(source);
    377376            // Ignore "meta" rule(s) from external rules of JOSM wiki
    378             removeMetaRules(source);
     377            source.removeMetaRules();
    379378            // group rules with common declaration block
    380379            Map<Declaration, List<Selector>> g = new LinkedHashMap<>();
     
    399398            }
    400399            return new ParseResult(parseChecks, source.getErrors());
    401         }
    402 
    403         private static void removeMetaRules(MapCSSStyleSource source) {
    404             for (Iterator<MapCSSRule> it = source.rules.iterator(); it.hasNext();) {
    405                 MapCSSRule x = it.next();
    406                 if (x.selector instanceof GeneralSelector) {
    407                     GeneralSelector gs = (GeneralSelector) x.selector;
    408                     if ("meta".equals(gs.base)) {
    409                         it.remove();
    410                     }
    411                 }
    412             }
    413400        }
    414401
Note: See TracChangeset for help on using the changeset viewer.