dap commit: define default values for the event interface members <http://lists.w3.org/Archives/Public/public-device-apis/2012Dec/0055.html>; rename "current light" to "current light level" and define "current light state" in Terminology

changeset:   326:2f675457d430
user:        Anssi Kostiainen <anssi.kostiainen@nokia.com>
date:        Thu Jan 10 10:58:30 2013 +0200
files:       light/Overview.html
description:
define default values for the event interface members <http://lists.w3.org/Archives/Public/public-device-apis/2012Dec/0055.html>; rename "current light" to "current light level" and define "current light state" in Terminology


diff -r 17843041bee5 -r 2f675457d430 light/Overview.html
--- a/light/Overview.html	Thu Jan 10 10:23:20 2013 +0200
+++ b/light/Overview.html	Thu Jan 10 10:58:30 2013 +0200
@@ -112,9 +112,13 @@
       <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#firing-events">
       fire an event</a></dfn> are defined in [[!DOM4]].
       <p>
-        The <dfn>current light</dfn> is a value that represents the ambient
+        The <dfn>current light level</dfn> is a value that represents the ambient
         light levels around the hosting device in lux units.
       </p>
+      <p>
+        The <dfn>current light state</dfn> represents the ambient light level
+        around the hosting device as a human-readable string.
+      </p>
     </section>
     
     <section>
@@ -157,6 +161,12 @@
           <dd></dd>
         </dl>
         <p>
+          The <code>value</code> attribute of the <a>DeviceLightEvent</a>
+          interface MUST return the value it was initialized to. When the
+          object is created, this attribute MUST be initialized to positive
+          Infinity. It represents the <a>current light level</a>.
+        </p>
+        <p>
           When a <dfn>user agent</dfn> is required to <dfn>fire a device
           light event</dfn>, the <dfn>user agent</dfn> MUST run the
           following steps:
@@ -170,15 +180,15 @@
             <ol>
               <li>
                 If the implementation is unable to report the <a>current
-                device light</a>, initialize the <code>value</code>
+                light level</a>, initialize the <code>value</code>
                 attribute to positive Infinity, otherwise initialize the
-                attribute to the <a>current device light</a>.
+                attribute to the <a>current light level</a>.
               </li>
             </ol>
           </li>
         </ol>
         <p>
-          When the <a>current light</a> changes, the <dfn>user agent</dfn>
+          When the <a>current light level</a> changes, the <dfn>user agent</dfn>
           MUST queue a task to <a>fire a device light event</a> at the
           <a>Window</a> object.
         </p>
@@ -236,11 +246,7 @@
                    interface LightLevelEvent : Event"
             class="idl" data-merge='LightLevelEventInit'>
           <dt>readonly attribute string value</dt>
-          <dd>
-            The <a>light level</a> may be one of the following
-	    strings: "normal", "dim", or "bright".  The
-	    corresponding lux values are left up to the UA.
-          </dd>
+          <dd></dd>
         </dl>
         <dl title="dictionary LightLevelEventInit : EventInit" class='idl'>
           <dt>
@@ -249,6 +255,12 @@
           <dd></dd>
         </dl>
         <p>
+          The <code>value</code> attribute of the <a>LightLevelEvent</a>
+          interface MUST return the value it was initialized to. When the
+          object is created, this attribute MUST be initialized to positive
+          Infinity. It represents the <a>current light state</a>.
+        </p>
+        <p>
           When a <dfn>user agent</dfn> is required to <dfn>fire a light
           level event</dfn>, the <dfn>user agent</dfn> MUST run the
           following steps:
@@ -262,15 +274,25 @@
             <ol>
               <li>
                 If the implementation is unable to report the <a>current
-                light level</a>, initialize the <code>value</code>
+                light state</a>, initialize the <code>value</code>
                 attribute to empty string, otherwise initialize the
-                attribute to the <a>current light level</a>.
+                attribute to the <a>current light state</a>, which MUST be one
+                of the following values:
+                <ul>
+                  <li><code>normal</code></li>
+                  <li><code>dim</code></li>
+                  <li><code>bright</code></li>
+                </ul>
+                <div class="note">
+                  The lux ranges that map to the <a>current light state</a>s
+                  are left to the implementation.
+                </div>
               </li>
             </ol>
           </li>
         </ol>
         <p>
-          When the <a>current light</a> changes, the <dfn>user agent</dfn>
+          When the <a>current light level</a> changes, the <dfn>user agent</dfn>
           MUST queue a task to <a>fire a user proximity event</a> at the
           <a>Window</a> object.
         </p>

Received on Thursday, 10 January 2013 11:30:52 UTC