CVS 2009/dap/vibration

Update of /sources/public/2009/dap/vibration
In directory roscoe:/tmp/cvs-serv14724

Modified Files:
	Overview.html 
Log Message:
update the "processing vibration patterns" algorithm (ACTION-628)

--- /sources/public/2009/dap/vibration/Overview.html	2013/05/06 11:42:41	1.35
+++ /sources/public/2009/dap/vibration/Overview.html	2013/05/10 11:56:32	1.36
@@ -80,7 +80,7 @@
     <section>
       <h2>Vibration Interface</h2>
       <dl title='partial interface Navigator' class='idl'>
-      <dt>void vibrate()</dt>
+      <dt>boolean vibrate()</dt>
       <dd>
         <dl class='parameters'>
           <dt>(unsigned long or sequence&lt;unsigned long&gt;) pattern</dt>
@@ -110,32 +110,29 @@
               <var>pattern</var> to <var>list</var>.
             </li>
             <li>
-              Let <var>pattern</var> be <var>list</var>.
+              Set <var>pattern</var> to <var>list</var>.
             </li>
           </ol>
         </li>
         <li>
           If any entry of <var>pattern</var> exceeds an
-          implementation-dependent limit, then the
-          <a class="product-ua" href="#ua">user agent</a> MAY throw a
-          <code>NotSupportedError</code> exception [[!DOM4]] and abort these
-          steps.
+          implementation-dependent limit, then return false and terminate
+          these steps.
         </li>
         <li>
-          If the length of <var>pattern</var> is even, then remove the last
-          entry in <var>pattern</var>.
+          If the length of <var>pattern</var> is even and is not zero, then
+          remove the last entry in <var>pattern</var>.
         </li>
         <li>
-          If the length of <var>pattern</var> exceeds an implementation
-          dependent limit, the <a class="product-ua" href="#ua">user agent</a>
-          MAY throw a <code>NotSupportedError</code> exception [[!DOM4]] and
-          abort these steps.
+          If the length of <var>pattern</var> exceeds an
+          implementation-dependent limit, then return false and terminate
+          these steps.
         </li>
         <li>
           If the <code>
           <a href="http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-hidden">
           hidden</a></code> attribute [[!PAGE-VISIBILITY]] is set to true,
-          abort these steps.
+          then return false and terminate these steps.
           <div class="note">
             A trusted (also known as privileged) application that integrates
             closely with the operating system's functionality may vibrate the
@@ -144,7 +141,7 @@
           </div>
         </li>
         <li>
-          An implementation MAY abort the algorithm at this point.
+          An implementation MAY return false and terminate these steps.
           <div class="note">
             For example, an implementation might abort the
             algorithm because the user has set a preference indicating that
@@ -159,9 +156,12 @@
           patterns</a> algorithm, if any.
         </li>
         <li>
-          If <var>pattern</var> is 0, an empty list, or if the device does
-          not provide a vibration mechanism (or it is disabled) abort these 
-          steps.
+          If <var>pattern</var> is an empty list, or if the device does
+          not provide a vibration mechanism (or it is disabled), then return
+          true and terminate these steps.
+        </li>
+        <li>
+          Return true, and then continue running these steps asynchronously.
         </li>
         <li>
           For each <var>time</var> in <var>pattern</var>, run the following
@@ -172,8 +172,7 @@
               index 0), vibrate the device for <var>time</var> milliseconds.
             </li>
             <li>
-              Otherwise <a>spin the event loop</a> for <var>time</var>
-              milliseconds.
+              Otherwise wait for <var>time</var> milliseconds.
             </li>
           </ol>
         </li>

Received on Friday, 10 May 2013 11:56:33 UTC