Thu, 17 Apr 2014 16:42:28 +0900
[web-animations] Various fixes to WebIDL handling based on review feedback
See: http://lists.w3.org/Archives/Public/public-fx/2014AprJun/0039.html
web-animations/index.html | file | annotate | diff | comparison | revisions |
1.1 --- a/web-animations/index.html Thu Apr 17 14:58:15 2014 +0900 1.2 +++ b/web-animations/index.html Thu Apr 17 16:42:28 2014 +0900 1.3 @@ -6458,29 +6458,10 @@ 1.4 <a>Timing</a> object whose attributes are assigned the 1.5 value of the member of the same name on <var>timing input</var>. 1.6 </li> 1.7 - <li>Assign the animation effect based on the type of 1.8 - <var>effect</var> as follows, 1.9 - <dl class="switch"> 1.10 - <dt>If <var>effect</var> is an <a>AnimationEffect</a> 1.11 - object or an <a>EffectCallback</a> object,</dt> 1.12 - <dd> 1.13 - Assign <code><var>animation</var>.effect</code> to 1.14 - <var>effect</var>. 1.15 - </dd> 1.16 - <dt>If <var>effect</var> is a <a>Keyframe</a> object or 1.17 - a sequence of <a>Keyframe</a> objects,</dt> 1.18 - <dd> 1.19 - Set <code><var>animation</var>.effect</code> to 1.20 - a new <a>KeyframeEffect</a> object constructed by 1.21 - passing <var>effect</var> as the <var>frames</var> parameter 1.22 - and with the other parameters set to their default values. 1.23 - </dd> 1.24 - <dt>Otherwise,</dt> 1.25 - <dd> 1.26 - Set <code><var>animation</var>.effect</code> to 1.27 - <code>null</code>. 1.28 - </dd> 1.29 - </dl> 1.30 + <li> 1.31 + Set <code><var>animation</var>.effect</code> to 1.32 + the result of applying the <a>procedure for converting an effect 1.33 + to an IDL value</a> to <var>effect</var>. 1.34 </li> 1.35 </ol> 1.36 <p> 1.37 @@ -6641,34 +6622,26 @@ 1.38 with parameter <var>effect</var> is as follows: 1.39 </p> 1.40 <dl class="switch"> 1.41 - <dt>If <var>effect</var> is <span class="esvalue">null</span> or 1.42 - <span class="esvalue">undefined</span>,</dt> 1.43 + <dt>If <var>effect</var> is <span class="esvalue">null</span>,</dt> 1.44 <dd>Return <span class="idlvalue">null</span>.</dd> 1.45 <dt>If <var>effect</var> is a <a 1.46 href="http://www.w3.org/TR/WebIDL/#dfn-platform-object">platform 1.47 - object</a> but not a <a 1.48 - href="http://www.w3.org/TR/WebIDL/#dfn-platform-array-object">platform 1.49 - array object</a>, then</dt> 1.50 + object</a> that implements <a>AnimationEffect</a>,</dt> 1.51 <dd> 1.52 - <ol> 1.53 - <li>If <var>effect</var> implements <a>AnimationEffect</a>, 1.54 - return the IDL value that is a reference to the object 1.55 - <var>effect</var>. 1.56 - <li>Otherwise, throw a <span class="esvalue">TypeError</span>. 1.57 + return the IDL value that is a reference to the that platform 1.58 + object. 1.59 </dd> 1.60 <dt>If IsCallable(<var>effect</var>) is true,</dt> 1.61 <dd>Return the result of applying the <a 1.62 href="http://www.w3.org/TR/WebIDL/#es-callback-function">procedure 1.63 for converting an ECMAScript value to an IDL callback function 1.64 - type</a> to <var>effect</var>. 1.65 + type</a> to <var>effect</var> using <a>EffectCallback</a> as the 1.66 + callback function type. 1.67 </dd> 1.68 - <dt>If <var>effect</var> is any kind of object except for a native 1.69 - Date object or a native RegExp object,</dt> 1.70 - <dd>Return the result of applying the <a>procedure for converting 1.71 - an ECMAScript value into an IDL keyframe or sequence of 1.72 - keyframes</a> to <var>effect</var>. 1.73 <dt>Otherwise,</dt> 1.74 - <dd>Throw a TypeError.</dd> 1.75 + <dd>Return a new <a>KeyframeEffect</a> object constructed passing 1.76 + <var>effect</var> as the <var>frames</var> parameter. 1.77 + </dd> 1.78 </ol> 1.79 <p class="note"> 1.80 Note that since the processing of this parameter is defined in 1.81 @@ -7169,11 +7142,8 @@ 1.82 <var>keyframeOrKeyframeList</var> is as follows: 1.83 </p> 1.84 <dl class="switch"> 1.85 - <dt>If HasOwnProperty(<var>keyframeOrKeyframeList</var>, "length") 1.86 - is true or <var>keyframeOrKeyframeList</var> is a platform 1.87 - object that <a 1.88 - href="http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties">supports 1.89 - indexed properties</a>,</dt> 1.90 + <dt>If Array.isArray(<var>keyframeOrKeyframeList</var>) is 1.91 + true,</dt> 1.92 <dd>Return the result of following the steps for <a 1.93 href="http://www.w3.org/TR/WebIDL/#es-sequence">converting an 1.94 ECMAScript value into an IDL sequence</a> using the <a>procedure