- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 18 Oct 2012 09:46:04 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2
In directory hutz:/tmp/cvs-serv16512/css2
Modified Files:
CssBackground.java CssBackgroundColor.java CssBorder.java
CssBorderColor.java CssColor.java CssOutline.java
CssOutlineColor.java
Log Message:
color changed because of hashident
Index: CssOutlineColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssOutlineColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssOutlineColor.java 16 Oct 2012 20:43:59 -0000 1.1
+++ CssOutlineColor.java 18 Oct 2012 09:46:02 -0000 1.2
@@ -51,6 +51,11 @@
case CssTypes.CSS_COLOR:
value = val;
break;
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ value = c;
+ break;
case CssTypes.CSS_IDENT:
if (invert.equals(val)) {
value = invert;
Index: CssBorderColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssBorderColor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderColor.java 26 Apr 2012 12:40:07 -0000 1.2
+++ CssBorderColor.java 18 Oct 2012 09:46:02 -0000 1.3
@@ -64,6 +64,11 @@
op = expression.getOperator();
switch (val.getType()) {
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ res.add(c);
+ break;
case CssTypes.CSS_COLOR:
res.add(val);
break;
@@ -141,6 +146,11 @@
CssValue val = expression.getValue();
switch (val.getType()) {
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ retval = c;
+ break;
case CssTypes.CSS_COLOR:
retval = val;
break;
Index: CssBorder.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssBorder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorder.java 26 Apr 2012 12:40:06 -0000 1.2
+++ CssBorder.java 18 Oct 2012 09:46:02 -0000 1.3
@@ -128,6 +128,11 @@
}
_width = val;
break;
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ _color = c;
+ break;
case CssTypes.CSS_COLOR:
_color = val;
break;
Index: CssBackground.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssBackground.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackground.java 13 Feb 2012 15:48:11 -0000 1.2
+++ CssBackground.java 18 Oct 2012 09:46:02 -0000 1.3
@@ -148,6 +148,7 @@
}
find = false;
break;
+ case CssTypes.CSS_HASH_IDENT:
case CssTypes.CSS_COLOR:
if (getColor2() == null) {
setColor(new CssBackgroundColor(ac, expression));
Index: CssOutline.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssOutline.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssOutline.java 16 Oct 2012 21:22:53 -0000 1.2
+++ CssOutline.java 18 Oct 2012 09:46:02 -0000 1.3
@@ -73,6 +73,7 @@
throw new InvalidParamException("value",
val.toString(),
getPropertyName(), ac);
+ case CssTypes.CSS_HASH_IDENT:
case CssTypes.CSS_COLOR:
if (_color.value == null) {
CssExpression ex = new CssExpression();
@@ -151,7 +152,7 @@
if (_style.value != null) {
values.add(_style.value);
}
- if (_color.value != null ){
+ if (_color.value != null) {
values.add(_color.value);
}
value = new CssValueList(values);
Index: CssColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssColor.java 4 Oct 2011 13:05:24 -0000 1.1
+++ CssColor.java 18 Oct 2012 09:46:02 -0000 1.2
@@ -20,108 +20,113 @@
*/
public class CssColor extends org.w3c.css.properties.css.CssColor {
- org.w3c.css.values.CssColor color;
- String attrvalue = null;
- boolean inherited;
+ org.w3c.css.values.CssColor color;
+ String attrvalue = null;
+ boolean inherited;
- /**
- * Create a new CssColor
- */
- public CssColor() {
- }
+ /**
+ * Create a new CssColor
+ */
+ public CssColor() {
+ }
- /**
- * Set the value of the property
- *
- * @param expression The expression for this property
- * @throws org.w3c.css.util.InvalidParamException
- * Values are incorrect
- */
- public CssColor(ApplContext ac, CssExpression expression, boolean check)
- throws InvalidParamException {
- if (check && expression.getCount() > 1) {
- throw new InvalidParamException("unrecognize", ac);
- }
+ /**
+ * Set the value of the property
+ *
+ * @param expression The expression for this property
+ * @throws org.w3c.css.util.InvalidParamException
+ * Values are incorrect
+ */
+ public CssColor(ApplContext ac, CssExpression expression, boolean check)
+ throws InvalidParamException {
+ if (check && expression.getCount() > 1) {
+ throw new InvalidParamException("unrecognize", ac);
+ }
- CssValue val = expression.getValue();
- setByUser();
- switch (val.getType()) {
- case CssTypes.CSS_IDENT:
- if (inherit.equals(val)) {
- inherited = true;
- } else {
- color = new org.w3c.css.values.CssColor(ac, (String) val.get());
- }
- break;
- // in the parser, rgb func and hexval func generate a CssColor directly
- // so, no need for a CSS_FUNCTION case
- case CssTypes.CSS_COLOR:
- try {
- color = (org.w3c.css.values.CssColor) val;
- } catch (ClassCastException ex) {
- // as we checked the type, it can't happen
- throw new InvalidParamException("value", expression.getValue(),
- getPropertyName(), ac);
- }
- break;
- default:
- throw new InvalidParamException("value", expression.getValue(),
- getPropertyName(), ac);
- }
- expression.next();
- }
+ CssValue val = expression.getValue();
+ setByUser();
+ switch (val.getType()) {
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ color = c;
+ break;
+ case CssTypes.CSS_IDENT:
+ if (inherit.equals(val)) {
+ inherited = true;
+ } else {
+ color = new org.w3c.css.values.CssColor(ac, (String) val.get());
+ }
+ break;
+ // in the parser, rgb func and hexval func generate a CssColor directly
+ // so, no need for a CSS_FUNCTION case
+ case CssTypes.CSS_COLOR:
+ try {
+ color = (org.w3c.css.values.CssColor) val;
+ } catch (ClassCastException ex) {
+ // as we checked the type, it can't happen
+ throw new InvalidParamException("value", expression.getValue(),
+ getPropertyName(), ac);
+ }
+ break;
+ default:
+ throw new InvalidParamException("value", expression.getValue(),
+ getPropertyName(), ac);
+ }
+ expression.next();
+ }
- public CssColor(ApplContext ac, CssExpression expression)
- throws InvalidParamException {
- this(ac, expression, false);
- }
+ public CssColor(ApplContext ac, CssExpression expression)
+ throws InvalidParamException {
+ this(ac, expression, false);
+ }
- /**
- * Returns the value of this property
- */
- public Object get() {
- return (inherited) ? inherit : color;
- }
+ /**
+ * Returns the value of this property
+ */
+ public Object get() {
+ return (inherited) ? inherit : color;
+ }
- /**
- * Returns the color
- */
- public org.w3c.css.values.CssColor getColor() {
- return (inherited) ? null : color;
- }
+ /**
+ * Returns the color
+ */
+ public org.w3c.css.values.CssColor getColor() {
+ return (inherited) ? null : color;
+ }
- /**
- * Returns true if this property is "softly" inherited
- * e.g. his value equals inherit
- */
- public boolean isSoftlyInherited() {
- return inherited;
- }
+ /**
+ * Returns true if this property is "softly" inherited
+ * e.g. his value equals inherit
+ */
+ public boolean isSoftlyInherited() {
+ return inherited;
+ }
- /**
- * Returns a string representation of the object.
- */
- public String toString() {
- if (attrvalue != null) {
- return attrvalue;
- } else {
- return (inherited) ? inherit.toString() : color.toString();
- }
- }
+ /**
+ * Returns a string representation of the object.
+ */
+ public String toString() {
+ if (attrvalue != null) {
+ return attrvalue;
+ } else {
+ return (inherited) ? inherit.toString() : color.toString();
+ }
+ }
- /**
- * Compares two properties for equality.
- *
- * @param property The other property.
- */
- public boolean equals(CssProperty property) {
- CssColor other;
- try {
- other = (CssColor) property;
- return ((inherited && other.inherited) ||
- (!inherited && !other.inherited) && (color.equals(other.color)));
- } catch (ClassCastException ex) {
- return false;
- }
- }
+ /**
+ * Compares two properties for equality.
+ *
+ * @param property The other property.
+ */
+ public boolean equals(CssProperty property) {
+ CssColor other;
+ try {
+ other = (CssColor) property;
+ return ((inherited && other.inherited) ||
+ (!inherited && !other.inherited) && (color.equals(other.color)));
+ } catch (ClassCastException ex) {
+ return false;
+ }
+ }
}
Index: CssBackgroundColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/CssBackgroundColor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundColor.java 9 Feb 2012 17:36:30 -0000 1.1
+++ CssBackgroundColor.java 18 Oct 2012 09:46:02 -0000 1.2
@@ -47,6 +47,11 @@
CssValue val = expression.getValue();
switch (val.getType()) {
+ case CssTypes.CSS_HASH_IDENT:
+ org.w3c.css.values.CssColor c = new org.w3c.css.values.CssColor();
+ c.setShortRGBColor(val.toString(), ac);
+ setColor(c);
+ break;
case CssTypes.CSS_COLOR:
setColor(val);
break;
Received on Thursday, 18 October 2012 09:46:05 UTC