- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 08 Nov 2011 17:07:03 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/media/css3 In directory hutz:/tmp/cvs-serv19266/media/css3 Modified Files: AtRuleMedia.java Log Message: derecated media should be only a warning Index: AtRuleMedia.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/media/css3/AtRuleMedia.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AtRuleMedia.java 21 Oct 2011 14:14:41 -0000 1.2 +++ AtRuleMedia.java 8 Nov 2011 17:07:01 -0000 1.3 @@ -8,7 +8,6 @@ import org.w3c.css.media.Media; import org.w3c.css.media.MediaFeature; import org.w3c.css.parser.AtRule; -import org.w3c.css.parser.CssError; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; @@ -57,10 +56,9 @@ } for (String s : deprecatedMedia) { if (medium.equals(s)) { - InvalidParamException ipe = new InvalidParamException("deprecatedmedia", medium, ac); - ac.getFrame().addError(new CssError(ipe)); - media.setMedia(s); - allMedia.add(media); + // we add a warning as it has been deprecated + ac.getFrame().addWarning("deprecatedmedia", medium); + allMedia.add(new Media(s)); return this; } } @@ -69,14 +67,13 @@ } /** - * * @param feature * @param ac * @throws InvalidParamException */ public void addMediaFeature(MediaFeature feature, ApplContext ac) throws InvalidParamException { - Media latest = allMedia.get(allMedia.size()-1); + Media latest = allMedia.get(allMedia.size() - 1); latest.addFeature(feature); }
Received on Tuesday, 8 November 2011 17:07:06 UTC