@@ -79,31 +79,32 @@ static CssValue parsePaint(ApplContext ac, CssExpression expression,
79
79
80
80
switch (val .getType ()) {
81
81
case CssTypes .CSS_IDENT :
82
- if (inherit .equals (val )) {
83
- value = inherit ;
82
+ CssIdent id = val .getIdent ();
83
+ if (CssIdent .isCssWide (id )) {
84
+ value = val ;
84
85
if (expression .getCount () > 1 ) {
85
86
throw new InvalidParamException ("value" ,
86
87
val .toString (),
87
88
property .getPropertyName (), ac );
88
89
}
89
90
break ;
90
91
}
91
- if (none .equals (val )) {
92
+ if (none .equals (id )) {
92
93
if ((expression .getCount () > 1 && !gotFuncIRI ) || (expression .getCount () > 2 && gotFuncIRI )) {
93
94
throw new InvalidParamException ("value" ,
94
95
val .toString (),
95
96
property .getPropertyName (), ac );
96
97
}
97
- values .add (none );
98
+ values .add (val );
98
99
break ;
99
100
}
100
- if (currentColor .equals (val )) {
101
+ if (currentColor .equals (id )) {
101
102
if ((expression .getCount () > 1 && !gotFuncIRI ) || (expression .getCount () > 2 && gotFuncIRI )) {
102
103
throw new InvalidParamException ("value" ,
103
104
val .toString (),
104
105
property .getPropertyName (), ac );
105
106
}
106
- values .add (currentColor );
107
+ values .add (val );
107
108
gotColor = true ;
108
109
break ;
109
110
}
@@ -144,9 +145,9 @@ static CssValue parsePaint(ApplContext ac, CssExpression expression,
144
145
property .getPropertyName (), ac );
145
146
}
146
147
CssColor c = new CssColor ();
147
- c .setShortRGBColor (ac , val .toString ());
148
+ c .setShortRGBColor (ac , val .getHashIdent (). toString ());
148
149
gotColor = true ;
149
- values .add (c );
150
+ values .add (val );
150
151
break ;
151
152
case CssTypes .CSS_COLOR :
152
153
if (gotColor ) {
0 commit comments