- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 18 Oct 2012 09:55:41 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv19384/css3
Modified Files:
Css3Style.java CssNavDown.java CssNavLeft.java
CssNavRight.java CssNavUp.java
Log Message:
nav-right/left/down per http://www.w3.org/TR/2012/WD-css3-ui-20120117/#nav-down and others
Index: CssNavLeft.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssNavLeft.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssNavLeft.java 5 Jan 2010 13:49:53 -0000 1.3
+++ CssNavLeft.java 18 Oct 2012 09:55:39 -0000 1.4
@@ -1,137 +1,60 @@
-//
// $Id$
-// From Sijtsche de Jong (sy.de.jong@let.rug.nl)
+// Author: Yves Lafon <ylafon@w3.org>
//
-// (c) COPYLeft 1995-2000 World Wide Web Consortium (MIT, INRIA, Keio University)
-// Please first read the full copyLeft statement at
-// http://www.w3.org/Consortium/Legal/copyLeft-software-19980720
-
+// (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.parser.CssStyle;
-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.CssURL;
-import org.w3c.css.values.CssValue;
-
-public class CssNavLeft extends CssProperty {
-
- CssValue navLeft;
-
- static CssIdent auto = new CssIdent("auto");
- /**
- * Create a new CssNavLeft
- */
- public CssNavLeft() {
- // nothing to do
- }
-
- /**
- * Create a new CssNavLeft
- *
- * @param expression The expression for this property
- * @exception InvalidParamException Incorrect value
- */
- public CssNavLeft(ApplContext ac, CssExpression expression,
- boolean check) throws InvalidParamException {
+/**
+ * @spec http://www.w3.org/TR/2012/WD-css3-ui-20120117/#nav-left0
+ * @see org.w3c.css.properties.css3.CssNavUp
+ */
+public class CssNavLeft extends org.w3c.css.properties.css.CssNavLeft {
- setByUser();
- CssValue val = expression.getValue();
+ public static final CssIdent auto = CssIdent.getIdent("auto");
- if (val.equals(inherit)) {
- navLeft = val;
- expression.next();
- } else if (val.equals(auto)) {
- navLeft = val;
- expression.next();
- } else if (val instanceof CssURL) {
- navLeft = val;
- expression.next();
- } else {
- throw new InvalidParamException("value", expression.getValue(),
- getPropertyName(), ac);
+ /**
+ * Create a new CssNavLeft
+ */
+ public CssNavLeft() {
+ value = initial;
}
- }
-
- public CssNavLeft(ApplContext ac, CssExpression expression)
- throws InvalidParamException {
- this(ac, expression, false);
- }
- /**
- * Add this property to the CssStyle
- *
- * @param style The CssStyle
- */
- public void addToStyle(ApplContext ac, CssStyle style) {
- if (((Css3Style) style).cssNavLeft != null)
- style.addRedefinitionWarning(ac, this);
- ((Css3Style) style).cssNavLeft = this;
- }
+ /**
+ * Create a new CssNavLeft
+ *
+ * @param ac The context
+ * @param expression The expression for this property
+ * @param check true will test the number of parameters
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavLeft(ApplContext ac, CssExpression expression, boolean check)
+ throws InvalidParamException {
- /**
- * Get this property in the style.
- *
- * @param style The style where the property is
- * @param resolve if true, resolve the style to find this property
- */
- public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
- if (resolve) {
- return ((Css3Style) style).getNavLeftCSS3();
- }
- else {
- return ((Css3Style) style).cssNavLeft;
+ setByUser();
+ value = CssNavUp.checkValues(ac, expression, check, this);
}
- }
-
- /**
- * Compares two properties for equality.
- *
- * @param value The other property.
- */
- public boolean equals(CssProperty property) {
- return (property instanceof CssNavLeft &&
- navLeft.equals(((CssNavLeft) property).navLeft));
- }
-
- /**
- * Returns the name of this property
- */
- public String getPropertyName() {
- return "nav-left";
- }
-
- /**
- * Returns the value of this property
- */
- public Object get() {
- return navLeft;
- }
-
- /**
- * Returns true if this property is "softly" inherited
- */
- public boolean isSoftlyInherited() {
- return navLeft.equals(inherit);
- }
-
- /**
- * Returns a string representation of the object
- */
- public String toString() {
- return navLeft.toString();
- }
- /**
- * Is the value of this property a default value
- * It is used by alle macro for the function <code>print</code>
- */
- public boolean isDefault() {
- return (navLeft == auto);
- }
+ /**
+ * Create a new CssNavLeft
+ *
+ * @param ac, the Context
+ * @param expression The expression for this property
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavLeft(ApplContext ac, CssExpression expression)
+ throws InvalidParamException {
+ this(ac, expression, false);
+ }
+ public boolean isDefault() {
+ return (auto == value) || (auto == initial);
+ }
}
Index: Css3Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/Css3Style.java,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- Css3Style.java 18 Oct 2012 09:46:02 -0000 1.136
+++ Css3Style.java 18 Oct 2012 09:55:39 -0000 1.137
@@ -72,6 +72,9 @@
import org.w3c.css.properties.css.CssMarqueeStyle;
import org.w3c.css.properties.css.CssNavIndex;
import org.w3c.css.properties.css.CssNavUp;
+import org.w3c.css.properties.css.CssNavDown;
+import org.w3c.css.properties.css.CssNavLeft;
+import org.w3c.css.properties.css.CssNavRight;
import org.w3c.css.properties.css.CssOpacity;
import org.w3c.css.properties.css.CssOrder;
import org.w3c.css.properties.css.CssOutlineOffset;
@@ -217,6 +220,9 @@
public CssImeMode cssImeMode;
public CssNavIndex cssNavIndex;
public CssNavUp cssNavUp;
+ public CssNavRight cssNavRight;
+ public CssNavDown cssNavDown;
+ public CssNavLeft cssNavLeft;
public CssTextOverflow cssTextOverflow;
public CssIcon cssIcon;
@@ -233,9 +239,6 @@
CssLineStackingStrategy cssLineStackingStrategy;
CssTextHeight cssTextHeight;
CssAppearance cssAppearance;
- CssNavRight cssNavRight;
- CssNavDown cssNavDown;
- CssNavLeft cssNavLeft;
CssOverflowX cssOverflowX;
CssOverflowY cssOverflowY;
CssRubySpan cssRubySpan;
Index: CssNavRight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssNavRight.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssNavRight.java 5 Jan 2010 13:49:54 -0000 1.3
+++ CssNavRight.java 18 Oct 2012 09:55:39 -0000 1.4
@@ -1,137 +1,60 @@
-//
// $Id$
-// From Sijtsche de Jong (sy.de.jong@let.rug.nl)
+// Author: Yves Lafon <ylafon@w3.org>
//
-// (c) COPYRIGHT 1995-2000 World Wide Web Consortium (MIT, INRIA, Keio University)
-// Please first read the full copyright statement at
-// http://www.w3.org/Consortium/Legal/copyright-software-19980720
-
+// (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.parser.CssStyle;
-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.CssURL;
-import org.w3c.css.values.CssValue;
-
-public class CssNavRight extends CssProperty {
-
- CssValue navRight;
-
- static CssIdent auto = new CssIdent("auto");
- /**
- * Create a new CssNavRight
- */
- public CssNavRight() {
- // nothing to do
- }
-
- /**
- * Create a new CssNavRight
- *
- * @param expression The expression for this property
- * @exception InvalidParamException Incorrect value
- */
- public CssNavRight(ApplContext ac, CssExpression expression,
- boolean check) throws InvalidParamException {
+/**
+ * @spec http://www.w3.org/TR/2012/WD-css3-ui-20120117/#nav-right0
+ * @see org.w3c.css.properties.css3.CssNavUp
+ */
+public class CssNavRight extends org.w3c.css.properties.css.CssNavRight {
- setByUser();
- CssValue val = expression.getValue();
+ public static final CssIdent auto = CssIdent.getIdent("auto");
- if (val.equals(inherit)) {
- navRight = val;
- expression.next();
- } else if (val.equals(auto)) {
- navRight = val;
- expression.next();
- } else if (val instanceof CssURL) {
- navRight = val;
- expression.next();
- } else {
- throw new InvalidParamException("value", expression.getValue(),
- getPropertyName(), ac);
+ /**
+ * Create a new CssNavRight
+ */
+ public CssNavRight() {
+ value = initial;
}
- }
-
- public CssNavRight(ApplContext ac, CssExpression expression)
- throws InvalidParamException {
- this(ac, expression, false);
- }
- /**
- * Add this property to the CssStyle
- *
- * @param style The CssStyle
- */
- public void addToStyle(ApplContext ac, CssStyle style) {
- if (((Css3Style) style).cssNavRight != null)
- style.addRedefinitionWarning(ac, this);
- ((Css3Style) style).cssNavRight = this;
- }
+ /**
+ * Create a new CssNavRight
+ *
+ * @param ac The context
+ * @param expression The expression for this property
+ * @param check true will test the number of parameters
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavRight(ApplContext ac, CssExpression expression, boolean check)
+ throws InvalidParamException {
- /**
- * Get this property in the style.
- *
- * @param style The style where the property is
- * @param resolve if true, resolve the style to find this property
- */
- public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
- if (resolve) {
- return ((Css3Style) style).getNavRightCSS3();
- }
- else {
- return ((Css3Style) style).cssNavRight;
+ setByUser();
+ value = CssNavUp.checkValues(ac, expression, check, this);
}
- }
-
- /**
- * Compares two properties for equality.
- *
- * @param value The other property.
- */
- public boolean equals(CssProperty property) {
- return (property instanceof CssNavRight &&
- navRight.equals(((CssNavRight) property).navRight));
- }
-
- /**
- * Returns the name of this property
- */
- public String getPropertyName() {
- return "nav-right";
- }
-
- /**
- * Returns the value of this property
- */
- public Object get() {
- return navRight;
- }
-
- /**
- * Returns true if this property is "softly" inherited
- */
- public boolean isSoftlyInherited() {
- return navRight.equals(inherit);
- }
-
- /**
- * Returns a string representation of the object
- */
- public String toString() {
- return navRight.toString();
- }
- /**
- * Is the value of this property a default value
- * It is used by alle macro for the function <code>print</code>
- */
- public boolean isDefault() {
- return (navRight == auto);
- }
+ /**
+ * Create a new CssNavRight
+ *
+ * @param ac, the Context
+ * @param expression The expression for this property
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavRight(ApplContext ac, CssExpression expression)
+ throws InvalidParamException {
+ this(ac, expression, false);
+ }
+ public boolean isDefault() {
+ return (auto == value) || (auto == initial);
+ }
}
Index: CssNavDown.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssNavDown.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssNavDown.java 5 Jan 2010 13:49:53 -0000 1.3
+++ CssNavDown.java 18 Oct 2012 09:55:39 -0000 1.4
@@ -1,137 +1,60 @@
-//
// $Id$
-// From Sijtsche de Jong (sy.de.jong@let.rug.nl)
+// Author: Yves Lafon <ylafon@w3.org>
//
-// (c) COPYDown 1995-2000 World Wide Web Consortium (MIT, INRIA, Keio University)
-// Please first read the full copyDown statement at
-// http://www.w3.org/Consortium/Legal/copyDown-software-19980720
-
+// (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.parser.CssStyle;
-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.CssURL;
-import org.w3c.css.values.CssValue;
-
-public class CssNavDown extends CssProperty {
-
- CssValue navDown;
-
- static CssIdent auto = new CssIdent("auto");
- /**
- * Create a new CssNavDown
- */
- public CssNavDown() {
- // nothing to do
- }
-
- /**
- * Create a new CssNavDown
- *
- * @param expression The expression for this property
- * @exception InvalidParamException Incorrect value
- */
- public CssNavDown(ApplContext ac, CssExpression expression,
- boolean check) throws InvalidParamException {
+/**
+ * @spec http://www.w3.org/TR/2012/WD-css3-ui-20120117/#nav-down0
+ * @see CssNavUp
+ */
+public class CssNavDown extends org.w3c.css.properties.css.CssNavDown {
- setByUser();
- CssValue val = expression.getValue();
+ public static final CssIdent auto = CssIdent.getIdent("auto");
- if (val.equals(inherit)) {
- navDown = val;
- expression.next();
- } else if (val.equals(auto)) {
- navDown = val;
- expression.next();
- } else if (val instanceof CssURL) {
- navDown = val;
- expression.next();
- } else {
- throw new InvalidParamException("value", expression.getValue(),
- getPropertyName(), ac);
+ /**
+ * Create a new CssNavDown
+ */
+ public CssNavDown() {
+ value = initial;
}
- }
-
- public CssNavDown(ApplContext ac, CssExpression expression)
- throws InvalidParamException {
- this(ac, expression, false);
- }
- /**
- * Add this property to the CssStyle
- *
- * @param style The CssStyle
- */
- public void addToStyle(ApplContext ac, CssStyle style) {
- if (((Css3Style) style).cssNavDown != null)
- style.addRedefinitionWarning(ac, this);
- ((Css3Style) style).cssNavDown = this;
- }
+ /**
+ * Create a new CssNavDown
+ *
+ * @param ac The context
+ * @param expression The expression for this property
+ * @param check true will test the number of parameters
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavDown(ApplContext ac, CssExpression expression, boolean check)
+ throws InvalidParamException {
- /**
- * Get this property in the style.
- *
- * @param style The style where the property is
- * @param resolve if true, resolve the style to find this property
- */
- public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
- if (resolve) {
- return ((Css3Style) style).getNavDownCSS3();
- }
- else {
- return ((Css3Style) style).cssNavDown;
+ setByUser();
+ value = CssNavUp.checkValues(ac, expression, check, this);
}
- }
-
- /**
- * Compares two properties for equality.
- *
- * @param value The other property.
- */
- public boolean equals(CssProperty property) {
- return (property instanceof CssNavDown &&
- navDown.equals(((CssNavDown) property).navDown));
- }
-
- /**
- * Returns the name of this property
- */
- public String getPropertyName() {
- return "nav-down";
- }
-
- /**
- * Returns the value of this property
- */
- public Object get() {
- return navDown;
- }
-
- /**
- * Returns true if this property is "softly" inherited
- */
- public boolean isSoftlyInherited() {
- return navDown.equals(inherit);
- }
-
- /**
- * Returns a string representation of the object
- */
- public String toString() {
- return navDown.toString();
- }
- /**
- * Is the value of this property a default value
- * It is used by alle macro for the function <code>print</code>
- */
- public boolean isDefault() {
- return (navDown == auto);
- }
+ /**
+ * Create a new CssNavDown
+ *
+ * @param ac, the Context
+ * @param expression The expression for this property
+ * @throws org.w3c.css.util.InvalidParamException
+ * The expression is incorrect
+ */
+ public CssNavDown(ApplContext ac, CssExpression expression)
+ throws InvalidParamException {
+ this(ac, expression, false);
+ }
+ public boolean isDefault() {
+ return (auto == value) || (auto == initial);
+ }
}
Index: CssNavUp.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssNavUp.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssNavUp.java 18 Oct 2012 09:45:22 -0000 1.4
+++ CssNavUp.java 18 Oct 2012 09:55:39 -0000 1.5
@@ -96,7 +96,7 @@
// the main check is here (to be shared with other
// nav-<dir>
- public static CssValue checkValues(ApplContext ac, CssExpression expression,
+ protected static CssValue checkValues(ApplContext ac, CssExpression expression,
boolean check, CssProperty caller)
throws InvalidParamException {
if (check && expression.getCount() > 2) {
Received on Thursday, 18 October 2012 09:55:48 UTC