Skip to content

Commit 90d4aff

Browse files
committed
proper check for css-wide idents (cont.)
1 parent 957861a commit 90d4aff

9 files changed

+16
-14
lines changed

org/w3c/css/properties/css3/CssTextJustify.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public CssTextJustify(ApplContext ac, CssExpression expression, boolean check)
6767
// ident, so inherit, or allowed value
6868
CssIdent id = val.getIdent();
6969

70-
if (!inherit.equals(id) && (getMatchingIdent(id) == null)) {
70+
if (!CssIdent.isCssWide(id) && (getMatchingIdent(id) == null)) {
7171
throw new InvalidParamException("value",
7272
expression.getValue(),
7373
getPropertyName(), ac);

org/w3c/css/properties/css3/CssTextOrientation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public CssTextOrientation(ApplContext ac, CssExpression expression, boolean chec
6565
getPropertyName(), ac);
6666
}
6767
CssIdent id = val.getIdent();
68-
if (!inherit.equals(id) && (getAllowedIdent(id) == null)) {
68+
if (!CssIdent.isCssWide(id) && (getAllowedIdent(id) == null)) {
6969
throw new InvalidParamException("value", expression.getValue(),
7070
getPropertyName(), ac);
7171
}

org/w3c/css/properties/css3/CssTextOverflow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public CssTextOverflow(ApplContext ac, CssExpression expression, boolean check)
6969
getPropertyName(), ac);
7070
}
7171
CssIdent id = val.getIdent();
72-
if (!inherit.equals(id) && (getAllowedIdent(id) == null)) {
72+
if (!CssIdent.isCssWide(id) && (getAllowedIdent(id) == null)) {
7373
throw new InvalidParamException("value",
7474
val.toString(),
7575
getPropertyName(), ac);

org/w3c/css/properties/css3/CssTextShadow.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.w3c.css.util.InvalidParamException;
1010
import org.w3c.css.values.CssCheckableValue;
1111
import org.w3c.css.values.CssExpression;
12+
import org.w3c.css.values.CssIdent;
1213
import org.w3c.css.values.CssLayerList;
1314
import org.w3c.css.values.CssTypes;
1415
import org.w3c.css.values.CssValue;
@@ -53,8 +54,9 @@ public CssTextShadow(ApplContext ac, CssExpression expression, boolean check)
5354
while (!expression.end()) {
5455
val = expression.getValue();
5556
op = expression.getOperator();
56-
57-
if ((val.getType() == CssTypes.CSS_IDENT) && none.equals(val.getIdent())) {
57+
58+
if ((val.getType() == CssTypes.CSS_IDENT) &&
59+
(none.equals(val.getIdent()) || CssIdent.isCssWide(val.getIdent()))) {
5860
if (expression.getCount() > 1) {
5961
throw new InvalidParamException("value", val,
6062
getPropertyName(), ac);

org/w3c/css/properties/css3/CssTextSizeAdjust.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public CssTextSizeAdjust(ApplContext ac, CssExpression expression,
6969
switch (val.getType()) {
7070
case CssTypes.CSS_IDENT:
7171
CssIdent id = val.getIdent();
72-
if (inherit.equals(id)) {
72+
if (CssIdent.isCssWide(id)) {
7373
value = val;
7474
break;
7575
} else {

org/w3c/css/properties/css3/CssTextTransform.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,26 @@ public CssTextTransform(ApplContext ac, CssExpression expression, boolean check)
8585
getPropertyName(), ac);
8686
}
8787
// ident, so inherit, or allowed value
88-
if (inherit.equals(val.getIdent())) {
88+
if (CssIdent.isCssWide(val.getIdent())) {
8989
if (expression.getCount() > 1) {
9090
throw new InvalidParamException("value",
9191
expression.getValue(),
9292
getPropertyName(), ac);
9393
}
94-
values.add(inherit);
94+
values.add(val);
9595
} else if (none.equals(val.getIdent())) {
9696
if (expression.getCount() > 1) {
9797
throw new InvalidParamException("value",
9898
expression.getValue(),
9999
getPropertyName(), ac);
100100
}
101-
values.add(none);
101+
values.add(val);
102102
} else if (fullWidth.equals(val.getIdent()) && !got_full_width) {
103103
got_full_width = true;
104-
values.add(fullWidth);
104+
values.add(val);
105105
} else if (fullSizeKana.equals(val.getIdent()) && !got_full_size_kana) {
106106
got_full_size_kana = true;
107-
values.add(fullSizeKana);
107+
values.add(val);
108108
} else if (!got_action) {
109109
if (getMatchingActionIdent(val.getIdent()) == null) {
110110
throw new InvalidParamException("value",

org/w3c/css/properties/css3/CssTextUnderlineOffset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public CssTextUnderlineOffset(ApplContext ac, CssExpression expression, boolean
6565
value = val;
6666
break;
6767
case CssTypes.CSS_IDENT:
68-
if (inherit.equals(val.getIdent())) {
68+
if (CssIdent.isCssWide(val.getIdent())) {
6969
value = val;
7070
break;
7171
}

org/w3c/css/properties/css3/CssTextUnderlinePosition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public CssTextUnderlinePosition(ApplContext ac, CssExpression expression, boolea
105105
}
106106

107107
CssIdent ident = val.getIdent();
108-
if (inherit.equals(ident)) {
108+
if (CssIdent.isCssWide(ident)) {
109109
value = val;
110110
if (check && expression.getCount() != 1) {
111111
throw new InvalidParamException("value",

org/w3c/css/properties/css3/CssTouchAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public CssTouchAction(ApplContext ac, CssExpression expression,
123123
getPropertyName(), ac);
124124
}
125125
id = val.getIdent();
126-
if (id.equals(inherit)) {
126+
if (CssIdent.isCssWide(id)) {
127127
if (expression.getCount() > 1) {
128128
throw new InvalidParamException("value",
129129
expression.getValue(),

0 commit comments

Comments
 (0)