- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 07 Aug 2012 12:09:19 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv24330/w3c/css/properties/css3
Modified Files:
Css3Style.java
Added Files:
CssFontVariantCaps.java
Log Message:
font-variant-caps from w3c/csshttp://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-variant-caps-prop
Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Css3Style.java 6 Aug 2012 11:56:21 -0000 1.23
+++ Css3Style.java 7 Aug 2012 12:09:17 -0000 1.24
@@ -30,6 +30,7 @@
import org.w3c.css.properties.css.CssColumns;
import org.w3c.css.properties.css.CssFontKerning;
import org.w3c.css.properties.css.CssFontLanguageOverride;
+import org.w3c.css.properties.css.CssFontVariantCaps;
import org.w3c.css.properties.css.CssOpacity;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.Util;
@@ -38,1521 +39,1522 @@
public class Css3Style extends ATSCStyle {
[...3048 lines suppressed...]
+ if (cssColumnWidth != null) {
+ warnings.addWarning(new Warning(cssColumnWidth,
+ "block-level", 1, ac));
+ }
+ }
+ }
+ }
+
+ /**
+ * Find conflicts in this Style
+ *
+ * @param warnings For warnings reports.
+ * @param allSelectors All contexts is the entire style sheet.
+ */
+ public void findConflicts(ApplContext ac, Warnings warnings,
+ CssSelectors selector, CssSelectors[] allSelectors) {
+ findConflictsBlockElements(ac, warnings, selector, allSelectors);
+ super.findConflicts(ac, warnings, selector, allSelectors);
+ }
}
--- NEW FILE: CssFontVariantCaps.java ---
// $Id: CssFontVariantCaps.java,v 1.1 2012/08/07 12:09:17 ylafon Exp $
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM and Keio University, 2012.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css3;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;
import org.w3c.css.values.CssIdent;
import org.w3c.css.values.CssTypes;
import org.w3c.css.values.CssValue;
import java.util.HashMap;
/**
* @spec http://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-variant-caps-prop
*/
public class CssFontVariantCaps extends org.w3c.css.properties.css.CssFontVariantCaps {
public static final CssIdent normal;
public static final HashMap<String, CssIdent> capsValues;
public static final String _capsValues[] = {"small-caps", "all-small-caps",
"petite-caps", "all-petite-caps", "titling-caps", "unicase"};
static {
normal = CssIdent.getIdent("normal");
capsValues = new HashMap<String, CssIdent>(_capsValues.length);
for (String s: _capsValues) {
capsValues.put(s, CssIdent.getIdent(s));
}
}
/**
* Create a new CssFontVariantCaps
*/
public CssFontVariantCaps() {
value = initial;
}
/**
* Creates a new CssFontVariantCaps
*
* @param expression The expression for this property
* @throws org.w3c.css.util.InvalidParamException
* Expressions are incorrect
*/
public CssFontVariantCaps(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
if (check && expression.getCount() > 1) {
throw new InvalidParamException("unrecognize", ac);
}
setByUser();
CssValue val;
char op;
val = expression.getValue();
op = expression.getOperator();
if (val.getType() == CssTypes.CSS_IDENT) {
CssIdent ident = (CssIdent) val;
if (inherit.equals(ident)) {
value = inherit;
} else if (normal.equals(ident)) {
value = normal;
} else {
value = capsValues.get(ident.toString());
if (value == null) {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
}
} else {
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
}
expression.next();
}
public CssFontVariantCaps(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}
}
Received on Tuesday, 7 August 2012 12:09:25 UTC