- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 28 Aug 2012 20:31:49 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv24537
Modified Files:
CssBoxShadow.java
Log Message:
CssLayerList
Index: CssBoxShadow.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBoxShadow.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- CssBoxShadow.java 5 Apr 2012 19:50:25 -0000 1.10
+++ CssBoxShadow.java 28 Aug 2012 20:31:47 -0000 1.11
@@ -8,11 +8,11 @@
package org.w3c.css.properties.css3;
-import org.w3c.css.properties.css.CssProperty;
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.CssLayerList;
import org.w3c.css.values.CssLength;
import org.w3c.css.values.CssNumber;
import org.w3c.css.values.CssTypes;
@@ -31,7 +31,6 @@
public class CssBoxShadow extends org.w3c.css.properties.css.CssBoxShadow {
public static CssIdent inset;
- Object value;
static {
inset = CssIdent.getIdent("inset");
@@ -53,7 +52,7 @@
public CssBoxShadow(ApplContext ac, CssExpression expression,
boolean check) throws InvalidParamException {
CssExpression single_layer = null;
- ArrayList<CssBoxShadowValue> values;
+ ArrayList<CssValue> values;
CssBoxShadowValue boxShadowValue;
setByUser();
@@ -79,7 +78,7 @@
getPropertyName(), ac);
}
// ok, so we have one or multiple layers here...
- values = new ArrayList<CssBoxShadowValue>();
+ values = new ArrayList<CssValue>();
while (!expression.end()) {
val = expression.getValue();
@@ -113,7 +112,7 @@
if (values.size() == 1) {
value = values.get(0);
} else {
- value = values;
+ value = new CssLayerList(values);
}
}
@@ -228,52 +227,6 @@
}
/**
- * Compares two properties for equality.
- *
- * @param property The other property.
- */
- public boolean equals(CssProperty property) {
- return (property instanceof CssBoxShadow &&
- value.equals(((CssBoxShadow) property).value));
- }
-
- /**
- * Returns the value of this property
- */
- public Object get() {
- return value;
- }
-
- /**
- * Returns true if this property is "softly" inherited
- */
- public boolean isSoftlyInherited() {
- return (inherit == value);
- }
-
- /**
- * Returns a string representation of the object
- */
- public String toString() {
- if (value instanceof ArrayList) {
- ArrayList v_list;
- v_list = (ArrayList) value;
- StringBuilder sb = new StringBuilder();
- boolean isFirst = true;
- for (Object val : v_list) {
- if (isFirst) {
- isFirst = false;
- } else {
- sb.append(", ");
- }
- sb.append(val.toString());
- }
- return sb.toString();
- }
- return value.toString();
- }
-
- /**
* Is the value of this property a default value
* It is used by all macro for the function <code>print</code>
*/
Received on Tuesday, 28 August 2012 20:31:50 UTC