Skip to content

Commit 5d54127

Browse files
committed
[css-animations] Update definition of CSSKeyframeRule
* Include the [SameObject, PutForwards=cssText] annotations on the style attribute in keeping with the other style attributes in CSSOM etc. * Specify that when an invalid keyText is set, not only is an exception thrown but the original value is unchanged. * Define the various properties of the object returned by the style attribute including the: readonly flag declarations parent CSS rule owner node This closes w3c#906.
1 parent a9f5688 commit 5d54127

1 file changed

Lines changed: 37 additions & 20 deletions

File tree

css-animations/Overview.bs

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ The 'animation-duration' property</h3>
553553
''both'', the first frame of the animation, as defined by
554554
'animation-direction', will be displayed during the
555555
'animation-delay'. Then the last frame of the animation,
556-
as defined by 'animation-direction', will be displayed if
557-
'animation-fill-mode' is set to ''forwards'' or ''both''.
558-
If 'animation-fill-mode' is set to ''animation-fill-mode/none''
556+
as defined by 'animation-direction', will be displayed if
557+
'animation-fill-mode' is set to ''forwards'' or ''both''. If
558+
'animation-fill-mode' is set to ''animation-fill-mode/none''
559559
then the animation has no visible effect.
560560
</dd>
561561
</dl>
@@ -1091,29 +1091,46 @@ IDL Definition</h4>
10911091

10921092
<pre class="idl">
10931093
interface CSSKeyframeRule : CSSRule {
1094-
attribute DOMString keyText;
1095-
readonly attribute CSSStyleDeclaration style;
1094+
attribute DOMString keyText;
1095+
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
10961096
};
10971097
</pre>
10981098

10991099
<h4 id="interface-csskeyframerule-attributes">
11001100
Attributes</h4>
11011101

1102-
<dl dfn-type=attribute dfn-for=CSSKeyframeRule>
1103-
1104-
<dt><dfn attribute for="CSSKeyframeRule">keyText</dfn>
1105-
<dd>
1106-
This attribute represents the keyframe selector as a comma-separated list of
1107-
percentage values. The ''from'' and ''to'' keywords map to 0% and 100%,
1108-
respectively.
1109-
1110-
If <a attribute for="CSSKeyframeRule">keyText</a> is updated with an invalid keyframe selector,
1111-
a <a spec="webidl" exception>SyntaxError</a> exception must be thrown.
1112-
1113-
<dt><dfn>style</dfn>
1114-
<dd>
1115-
This attribute represents the style associated with this keyframe.
1116-
</dl>
1102+
<dl dfn-type=attribute dfn-for=CSSKeyframeRule>
1103+
1104+
<dt><dfn>keyText</dfn>
1105+
<dd>
1106+
This attribute represents the keyframe selector as a comma-separated list
1107+
of percentage values. The ''from'' and ''to'' keywords map to 0% and 100%,
1108+
respectively.
1109+
1110+
If <a attribute for=CSSKeyframeRule>keyText</a> is updated with an
1111+
invalid keyframe selector, a <a spec=webidl exception>SyntaxError</a>
1112+
exception must be thrown and the value of <a attribute
1113+
for=CSSKeyframeRule>keyText</a> must remain unchanged.
1114+
</dd>
1115+
1116+
<dt><dfn>style</dfn>
1117+
<dd>
1118+
Must return a {{CSSStyleDeclaration}} object for the
1119+
keyframe rule, with the following properties:
1120+
1121+
<dl>
1122+
<dt><a spec=cssom for=CSSStyleDeclaration>readonly flag</a></dt>
1123+
<dd>Unset.</dd>
1124+
<dt><a spec=cssom for=CSSStyleDeclaration>declarations</a></dt>
1125+
<dd>The declared declarations in the rule, in <a spec=cssom>specified
1126+
order</a>.</dd>
1127+
<dt><a spec=cssom for=CSSStyleDeclaration>parent CSS rule</a></dt>
1128+
<dd>The <a>context object</a> (i.e. this {{CSSKeyframeRule}}).</dd>
1129+
<dt><a spec=cssom for=CSSStyleDeclaration>owner node</a></dt>
1130+
<dd>Null.</dd>
1131+
</dl>
1132+
</dd>
1133+
</dl>
11171134

11181135
<h3 id="interface-csskeyframesrule">
11191136
The <code>CSSKeyframesRule</code> Interface</h3>

0 commit comments

Comments
 (0)