@@ -34,6 +34,7 @@ public class CssAnimation extends org.w3c.css.properties.css.CssAnimation {
34
34
CssAnimationDirection cssAnimationDirection = null ;
35
35
CssAnimationFillMode cssAnimationFillMode = null ;
36
36
CssAnimationIterationCount cssAnimationIterationCount = null ;
37
+ CssAnimationPlayState cssAnimationPlayState = null ;
37
38
38
39
/**
39
40
* Create a new CssAnimation
@@ -47,6 +48,7 @@ public CssAnimation() {
47
48
cssAnimationIterationCount = new CssAnimationIterationCount ();
48
49
cssAnimationFillMode = new CssAnimationFillMode ();
49
50
cssAnimationDirection = new CssAnimationDirection ();
51
+ cssAnimationPlayState = new CssAnimationPlayState ();
50
52
}
51
53
52
54
/**
@@ -133,6 +135,10 @@ public CssAnimation(ApplContext ac, CssExpression expression, boolean check)
133
135
cssAnimationFillMode = new CssAnimationFillMode ();
134
136
cssAnimationFillMode .value = v .fillmode ;
135
137
}
138
+ if (v .playState != null ) {
139
+ cssAnimationPlayState = new CssAnimationPlayState ();
140
+ cssAnimationPlayState .value = v .playState ;
141
+ }
136
142
} else {
137
143
// TODO explode the layers for addToStyle...
138
144
value = new CssLayerList (values );
@@ -174,6 +180,9 @@ public void addToStyle(ApplContext ac, CssStyle style) {
174
180
if (cssAnimationFillMode != null ) {
175
181
cssAnimationFillMode .addToStyle (ac , style );
176
182
}
183
+ if (cssAnimationPlayState != null ) {
184
+ cssAnimationPlayState .addToStyle (ac , style );
185
+ }
177
186
}
178
187
179
188
private CssAnimationValue checkLayer (ApplContext ac ,
@@ -183,7 +192,7 @@ private CssAnimationValue checkLayer(ApplContext ac,
183
192
CssAnimationValue v = new CssAnimationValue ();
184
193
// here we know we have the right operator, we just need to check
185
194
// everything else.
186
- if (expression .getCount () > 7 ) {
195
+ if (expression .getCount () > 8 ) {
187
196
throw new InvalidParamException ("unrecognize" , ac );
188
197
}
189
198
CssValue val ;
@@ -261,6 +270,12 @@ private CssAnimationValue checkLayer(ApplContext ac,
261
270
break ;
262
271
}
263
272
}
273
+ if (v .playState == null ) {
274
+ if (CssAnimationPlayState .getAllowedIdent (id ) != null ) {
275
+ v .playState = val ;
276
+ break ;
277
+ }
278
+ }
264
279
if (v .name == null ) {
265
280
if (CssAnimationName .getAllowedIdent (ac , id ) != null ) {
266
281
v .name = val ;
@@ -287,6 +302,7 @@ private class CssAnimationValue extends CssValueList {
287
302
CssValue itercount = null ;
288
303
CssValue direction = null ;
289
304
CssValue fillmode = null ;
305
+ CssValue playState = null ;
290
306
291
307
292
308
public String toString () {
0 commit comments