Addressed comments from timeless.
authorVincent Scheib <scheib@google.com>
Fri, 09 Jan 2015 15:53:00 -0800
changeset 47 25ad122a8000
parent 46 26738a28e9d3
child 48 057c5981d9a8
Addressed comments from timeless.

http://lists.w3.org/Archives/Public/public-webapps/2014OctDec/0543.html
index.html
--- a/index.html	Wed Jan 29 14:52:13 2014 -0800
+++ b/index.html	Fri Jan 09 15:53:00 2015 -0800
@@ -91,7 +91,7 @@
       mouse movement data while locking the target of mouse events to a single
       element and removing the cursor from view.  This is an essential input
       mode for certain classes of applications, especially first person
-      perspective 3D applications and 3D modelling software.
+      perspective 3D applications and 3D modeling software.
     </section>
 
     <section id="sotd"> <!-- Status of This Document -->
@@ -111,7 +111,11 @@
       interpreted for rotation of the view-port, there is no limit to how far
       movement can go, and no mouse cursor is displayed.</p>
 
-      <p>Pointer Lock is related to Mouse Capture [[MDN-SETCAPTURE]].  Capture provides
+      <p>Pointer Lock is related to
+      Mouse Capture [[MSDN-SETCAPTURE]] [[MDN-SETCAPTURE]]
+      (Mouse Capture is unspecified: bug
+      <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=14600">14600</a>).
+      Capture provides
       continued event delivery to a target element while a mouse is being
       dragged, but ceases when the mouse button is released.  Pointer Lock differs
       by being persistent, not limited by screen boundaries, sending events
@@ -134,7 +138,7 @@
     <section id='conformance'>
       <p>
         This specification defines conformance criteria that apply to a single
-        product: the <dfn>user agent</dfn> that implements
+        product: the <dfn id="dfn-user-agent">user agent</dfn> that implements
         the interfaces that it contains.
       </p>
 
@@ -157,12 +161,16 @@
       <dt><dfn>Engagement gesture</dfn></dt>
       <dd>
         An event generated by the user agent as a result of user interaction
-        intended to interact with the page. e.g. <code>click</code>, but not
+        processed by the user agent to interact with the page. e.g. <code>click</code>, but not
         <code>mousemove</code>.
         Engagement gestures are any events included in the definition of being
         <a href="http://www.whatwg.org/specs/web-apps/current-work/#allowed-to-show-a-popup">
           allowed to show a popup</a>
         with the addition of <code>keypress</code> and <code>keyup</code>.
+        Note that operating system level accessibility and internationalization
+        features may intercept gestures before the user agent processes them
+        for interaction with a page. E.g. multiple key press codes used to enter
+        an extended international character.
       </dd>
 
 
@@ -176,7 +184,7 @@
       and <dfn>pointerlockerror</dfn>. If pointer lock is entered or exited
       for any reason a <a>pointerlockchange</a> event must be sent.</p>
 
-      <p><a title="User Agent">User agents</a>
+      <p><a>User agent</a>s
       must deliver these events by <a
       href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">
       queuing a task</a> to <a class="external"
@@ -259,11 +267,11 @@
           <p>Once in the locked state the <a>user agent</a> must fire all relevant
           user generated <code>MouseEvent</code> events (for example:
           <code>mousemove</code>, <code>mousedown</code>, <code>mouseup</code>,
-          <code>click</code>, <code>wheel</code>)[[!DOM-LEVEL-3-EVENTS]]
+          <code>click</code>, and <code>wheel</code>)[[!DOM-LEVEL-3-EVENTS]]
           to the <a>target</a> of pointer lock, and not fire mouse events to
           other elements.  Events that require the concept of a mouse cursor must
           not be dispatched (for example: <code>mouseover</code>,
-          <code>mouseout</code>, <code>drag</code>, <code>drop</code>).</p>
+          <code>mouseout</code>, <code>drag</code>, and <code>drop</code>).</p>
 
           <p>In the locked state the system mouse cursor
           must be hidden. Movement and button presses of the mouse must not
@@ -315,7 +323,7 @@
 
           <p>The system mouse cursor must be displayed again and positioned at
           the same location that it was when pointer lock was entered (the same
-          location that is reported in <code>screenX</code>/<code>Y</code>
+          location that is reported in <code>screenX</code>, <code>screenY</code>,
           when the pointer is locked).</p>
         </dd>
       </dl>
@@ -324,7 +332,7 @@
     <section>
       <h2>Extensions to the <a>MouseEvent</a> Interface</h2>
 
-      <p><a title="User Agent">User agents</a> must extend the MouseEvent interface
+      <p><a>User agent</a>s must extend the MouseEvent interface
       [[!DOM-LEVEL-3-EVENTS]]
       with two members:</p>
 
@@ -337,7 +345,7 @@
 
       <p>The members <code>movementX</code> and <code>movementY</code> must
       provide the change in position of the pointer, as if the values of
-      <code>screenX</code>/<code>Y</code> were stored between two subsequent
+      <code>screenX</code>, <code>screenY</code>, were stored between two subsequent
       <code>mousemove</code> events <code>eNow</code> and
       <code>ePrevious</code> and the difference taken
       <code>movementX = eNow.screenX-ePrevious.screenX</code>.</p>
@@ -348,9 +356,11 @@
       <code>earlierEvent</code> and <code>currentEvent</code> the value of
       <code>currentEvent.screenX-earlierEvent.screenX</code> is equivalent to
       the sum of all <code>movementX</code> values received on
-      <code>mousemove</code> events after <code>earlierEvent</code>.</p>
+      <code>mousemove</code> events after <code>earlierEvent</code>, with
+      the exception of when screenX can not be updated because the pointer
+      is clipped by the user agent screen boundaries.</p>
 
-      <p><code>movementX</code>/<code>Y</code> must be valid regardless of pointer
+      <p><code>movementX</code>/<code>Y</code> must be updated regardless of pointer
       lock state.</p>
 
       <p>When unlocked, the system cursor can exit and re-enter the <a>user
@@ -377,7 +387,7 @@
     <section>
       <h2>Extensions to the <a>MouseEventInit</a> Dictionary</h2>
 
-      <p><a title="User Agent">User agents</a> must extend the MouseEventInit dictionary
+      <p><a>User agent</a>s must extend the MouseEventInit dictionary
       [[!DOM-LEVEL-3-EVENTS]] with two members <code>movementX</code> and
       <code>movementY</code> used to initialize respective members
       of <code>MouseEvent</code>.</p>
@@ -396,7 +406,7 @@
       <p>A <dfn>default unlock gesture</dfn> must always be available that
       will exit pointer lock.</p>
       <p class="note">The ESC key is the recommended <a>default unlock
-      gesture</a> for <a title="User Agent">user agents</a> with keyboard input. It is recommended that
+      gesture</a> for <a>user agent</a>s with keyboard input. It is recommended that
       the unlock gesture also match any used to exit fullscreen
       [[FULLSCREEN]].</p>
 
@@ -411,9 +421,9 @@
 
       <p>Pointer lock must not be exited when fullscreen [[FULLSCREEN]] is
       entered or exited unless the pointer is required to enable interaction
-      with the <a>user agent</a> graphical user interface or the <a>default
+      with the <a>user agent</a> graphical user interface, the <a>default
       unlock gesture</a> was used to exit both fullscreen and pointer
-      lock.</p>
+      lock, or window or tab focus was lost.</p>
     </section>
 
     <section class='informative'>
@@ -482,7 +492,7 @@
         following code should permit a custom cursor to send click events while
         the pointer is locked:</p>
 
-        <pre class='example highlight'>
+        <pre class='example highlight' id="example-synthetic-cursor">
             document.addEventListener("click", function (e) {
               if (e._isSynthetic)
                 return;
@@ -496,9 +506,9 @@
                                 y + e.screenY - e.clientY,
                                 x,
                                 y);
-              var target = document.elementFromPoint(x, y)
+              var target = document.elementFromPoint(x, y);
               if (target)
-                target.dispatchEvent(ee)
+                target.dispatchEvent(ee);
             });
         </pre>
 
@@ -558,16 +568,16 @@
           <li>Pointer Lock can be called repeated by script after user exits pointer
           lock, blocking user from meaningful progress.</li>
 
-          <li>Full screen exit instructions are displayed in some <a title="User Agent">user agents</a> when
+          <li>Full screen exit instructions are displayed in some <a>user agent</a>s when
           the pointer is moved to the top of the screen.  During pointer lock that
           gesture is not possible.</li>
         </ul>
 
         <p>Responses:</p>
         <ul>
-          <li><a title="User Agent">User agents</a> may limit what security origins may lock the pointer.</li>
+          <li><a>User agent</a>s may limit what security origins may lock the pointer.</li>
 
-          <li><a title="User Agent">User agents</a> may prompt for confirmation before locking, this
+          <li><a>User agent</a>s may prompt for confirmation before locking, this
           preference may be saved as a content setting.</li>
 
           <li>Escape will always be provided by a <a>default unlock
@@ -597,11 +607,11 @@
         <p>Pointer lock is a required user interaction mode for certain application
         types, but carries a usability concern if maliciously used.  An attacker
         could remove the ability for a user to control their mouse cursor on their
-        system.  <a title="User Agent">User agents</a> will prevent this by always providing a mechanism to
+        system.  <a>User agent</a>s will prevent this by always providing a mechanism to
         exit pointer lock, by informing the user of how, and by limiting how pointer
         lock can be entered.</p>
 
-        <p><a title="User Agent">User agents</a> will determine their own appropriate policies, which may be
+        <p><a>User agent</a>s will determine their own appropriate policies, which may be
         specialized per device or differ based on user options.
     </section>
 
@@ -613,7 +623,7 @@
 
         <p>Mouse Capture [[MDN-SETCAPTURE]]
         handles low security risk mouse event target lock for the duration of a
-        mouse drag gesture.  pointer lock removes the concept of the cursor and
+        mouse drag gesture.  Pointer lock removes the concept of the cursor and
         directs all events to a given target.  They are related, but
         different.</p>
 
@@ -652,7 +662,7 @@
         3 'wheel' event</a>.</p>
       </section>
 
-      <section>
+      <section id="why-bundle">
         <h2>Why bundle all functionality (hiding cursor, providing mouse deltas)
         instead of using CSS to hide the cursor, always providing delta values,
         and offering an API to restrict the cursor movement to a portion of the
@@ -676,7 +686,7 @@
         approach.  The first is a concern of specifying what units mouse movement
         data are provided in.  This specification defines .movementX/Y precisely
         as the same values that could be recorded when the mouse is not under lock
-        by changes in .screenX/Y.  Implementations across multiple <a title="User Agent">user agents</a> and
+        by changes in .screenX/Y.  Implementations across multiple <a>user agent</a>s and
         operating systems will easily be able to meet that requirement and provide
         application developers and users with a consistent experience.  Further,
         users are expected to have already configured the full system of hardware
@@ -689,13 +699,17 @@
         the mouse cursor is more difficult in the fine grained approach.  Bundling
         the features together gives implementations freedom to use a variety of
         techniques as appropriate on each operating system and is more practical
-        to implement.  Direct APIs do not exist on all platforms (Win, Mac, Linux)
+        to implement.  Direct APIs do not exist on major desktop platforms
+        (Windows, Mac OS X, Linux)
         to bound the cursor to a specific rectangle, and prototypes have not yet
-        been developed to demonstrate building that behavior by e.g.  invisible
-        windows with xlib or manual cursor movement on Mac.  Unaccelerated Delta
+        been developed to demonstrate building that behavior by e.g. 
+        <a href="http://tronche.com/gui/x/xlib/window/attributes/">
+        invisible windows</a>
+        with <a href="http://en.wikipedia.org/wiki/Xlib">Xlib</a>
+        or manual cursor movement on Mac.  Unaccelerated Delta
         values have been proposed to be accessed by reading raw Human Interface
-        Device (HID) data.  E.g.  WM_INPUT messages on windows, and USB device
-        APIs on Mac / Linux.  The challenge here is interpreting and normalizing
+        Device (HID) data.  E.g.  WM_INPUT messages on Windows, and USB device
+        APIs on Mac OS X / Linux.  The challenge here is interpreting and normalizing
         the units to some consistent and specifiable scale.  Also, most APIs
         considered to date are limited to USB devices.</p>
 
@@ -712,10 +726,11 @@
       <section>
         <h2>High resolution deltas / High frequency updates?</h2>
 
-        <p>Not yet, for the same reasons in the previous Q.  See "Why bundle all
+        <p>Not yet, for the same reasons in the previous question: 
+        <a href="#why-bundle">"Why bundle all
         functionality (hiding cursor, providing mouse deltas) instead of using CSS
         to hide the cursor, always providing delta values, and offering an API to
-        restrict the cursor movement to a portion of the web page?" above.</p>
+        restrict the cursor movement to a portion of the web page?"</a>.</p>
       </section>
 
       <section>
@@ -784,6 +799,7 @@
         <li>Olli Pettay</li>
         <li>Robert O'Callahan</li>
         <li>Tab Atkins Jr.</li>
+        <li>Timeless</li>
       </ul>
     </section>
   </body>