[html5] r8544 - / images

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 14 16:05:30 PDT 2014


Author: ianh
Date: 2014-03-14 16:05:29 -0700 (Fri, 14 Mar 2014)
New Revision: 8544

Modified:
   complete.html
   images/Qp-overlap-outline.png
   index
   source
Log:
[giow] (0) More work on event rerouting for hit regions
Affected topics: Canvas, HTML

Modified: complete.html
===================================================================
--- complete.html	2014-03-13 23:33:04 UTC (rev 8543)
+++ complete.html	2014-03-14 23:05:29 UTC (rev 8544)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 13 March 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 14 March 2014</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -58690,6 +58690,9 @@
    <li><p>If <var title="">control</var> is not a descendant of <var title="">ancestor</var>, then
    return nothing and abort these steps.</li>
 
+   <li><p>If <var title="">control</var> is no longer a <a href=#supported-interactive-canvas-fallback-element>supported interactive canvas fallback
+   element</a>, then return nothing and abort these steps.</li>
+
    <li><p>Otherwise, return <var title="">control</var>.</li>
 
   </ol><p><dfn id=the-cursor-for-a-hit-region>The cursor for a hit region</dfn> <var title="">region</var> of a <code><a href=#the-canvas-element>canvas</a></code>
@@ -58747,7 +58750,36 @@
   reset, e.g. when a <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object is bound to or unbound from a
   <code><a href=#the-canvas-element>canvas</a></code>, or when the dimensions of the bitmap are changed.</p>
 
-  <hr><p>When the <dfn id=dom-context-2d-addhitregion title=dom-context-2d-addHitRegion><code>addHitRegion()</code></dfn> method is
+  <hr><p>An element is a <dfn id=supported-interactive-canvas-fallback-element>supported interactive canvas fallback element</dfn> if it is one of the
+  following:</p>
+
+  <ul class=brief><li><p>an <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a
+   <a href=#hyperlink>hyperlink</a> and that does not have any <code><a href=#the-img-element>img</a></code> descendants</li>
+
+   <li><p>a <code><a href=#the-button-element>button</a></code> element</li>
+
+   <li><p>an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+   attribute is in one of the <a href="#checkbox-state-(type=checkbox)" title=attr-input-type-checkbox>Checkbox</a> or <a href="#radio-button-state-(type=radio)" title=attr-input-type-radio>Radio Button</a> states</li>
+
+   <li><p>an <code><a href=#the-input-element>input</a></code> element that is a <a href=#concept-button title=concept-button>button</a></li>
+
+   <li><p>a <code><a href=#the-select-element>select</a></code> element with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
+
+   <li><p>an <code><a href=#the-option-element>option</a></code> element that is in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> of a <code><a href=#the-select-element>select</a></code> element
+   with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
+
+   <li><p>a <a href=#sorting-interface-th-element>sorting interface <code>th</code> element</a></li>
+
+   <li><p>an element that would not be <a href=#interactive-content>interactive content</a> except for having the
+   <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute specified</li>
+
+   <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
+   entire table, to see the whole context -->
+   <li><p>a non-<a href=#interactive-content title="interactive content">interactive</a> <code><a href=#the-table-element>table</a></code>,
+   <code><a href=#the-caption-element>caption</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>,
+   <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, or <code><a href=#the-th-element>th</a></code> element</li>
+
+  </ul><hr><p>When the <dfn id=dom-context-2d-addhitregion title=dom-context-2d-addHitRegion><code>addHitRegion()</code></dfn> method is
   invoked, the user agent must run the following steps:</p>
 
   <ol><li><p>Let <var title="">arguments</var> be the dictionary object provided as the method's
@@ -58812,40 +58844,9 @@
 
      <li><p>The <var title="">specified pixels</var> has no pixels.</li>
 
-     <li>
+     <li><p>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is neither null nor a
+     <a href=#supported-interactive-canvas-fallback-element>supported interactive canvas fallback element</a>.</li>
 
-      <p>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is not one of the following:</p>
-
-      <ul class=brief><li><p>null</li>
-
-       <li><p>an <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a
-       <a href=#hyperlink>hyperlink</a></li>
-
-       <li><p>a <code><a href=#the-button-element>button</a></code> element</li>
-
-       <li><p>an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
-       attribute is in one of the <a href="#checkbox-state-(type=checkbox)" title=attr-input-type-checkbox>Checkbox</a> or <a href="#radio-button-state-(type=radio)" title=attr-input-type-radio>Radio Button</a> states</li>
-
-       <li><p>an <code><a href=#the-input-element>input</a></code> element that is a <a href=#concept-button title=concept-button>button</a></li>
-
-       <li><p>a <code><a href=#the-select-element>select</a></code> element with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
-
-       <li><p>an <code><a href=#the-option-element>option</a></code> element that is in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> of a <code><a href=#the-select-element>select</a></code> element
-       with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
-
-       <li><p>a <a href=#sorting-interface-th-element>sorting interface <code>th</code> element</a></li>
-
-       <li><p>an element that would not be <a href=#interactive-content>interactive content</a> except for having the
-       <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute specified</li>
-
-       <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
-       entire table, to see the whole context -->
-       <li><p>a non-<a href=#interactive-content title="interactive content">interactive</a> <code><a href=#the-table-element>table</a></code>,
-       <code><a href=#the-caption-element>caption</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>,
-       <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, or <code><a href=#the-th-element>th</a></code> element</li>
-
-      </ul></li>
-
      <li><p>The <var title="">parent region</var> is not null but has a <a href="#hit-region's-control" title="hit region's
      control">control</a>.</li>
 
@@ -59002,7 +59003,7 @@
 
   </ol></div>
 
-  <hr><p>The <code><a href=#mouseevent>MouseEvent</a></code> interface is extended to support hit
+  <hr><!--CLEANUP--><p>The <code><a href=#mouseevent>MouseEvent</a></code> interface is extended to support hit
   regions:</p>
 
   <pre class=idl>partial interface <a href=#mouseevent id=MouseEvent-partial>MouseEvent</a> {
@@ -59017,6 +59018,7 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>If the mouse was over a <a href=#hit-region>hit region</a>, then this returns the <a href="#hit-region's-id">hit region's ID</a>, if it has one.</p>
 
     <p>Otherwise, returns null.</p>
@@ -59031,14 +59033,26 @@
   ID</a> if the mouse was over a hit region when the event was fired.</p>
 
   <p>When a <code><a href=#mouseevent>MouseEvent</a></code> is to be fired at a <code><a href=#the-canvas-element>canvas</a></code> element by the user
-  agent in response to a pointing device action, if the <code><a href=#the-canvas-element>canvas</a></code> element has a <a href=#hit-region-list>hit
-  region list</a>, the user agent must instead follow these steps. If these steps say to <i>act
-  as normal</i>, that means that the event must be fired as it would have had these requirements not
-  been applied.</p>
+  agent in response to a pointing device action other than a click (e.g. a <code title=event-mousedown><a href=#event-mousedown>mousedown</a></code> event or a <code title=event-mousemove><a href=#event-mousemove>mousemove</a></code> event), the user agent must run the <a href=#canvas-mouseevent-rerouting-steps>canvas
+  <code>MouseEvent</code> rerouting steps</a> immediately prior to dispatching the event<!--
+  interaction event spec point -->. This does not affect default actions (so for instance, if the
+  event gets rerouted to an element that has a default action for <code title=event-mousemove><a href=#event-mousemove>mousemove</a></code> events, this default action doesn't trigger<!-- this
+  would be significantly more obvious if there was a real spec defining how mouse events trigger
+  that we could actually properly hook into -->).</p>
 
+  <p class=note>Actual clicks are handled by the <a href=#run-authentic-click-activation-steps>run authentic click activation
+  steps</a>, which also invoke these steps.</p>
+
+  <p>The <dfn id=canvas-mouseevent-rerouting-steps>canvas <code>MouseEvent</code> rerouting steps</dfn> are as follows. If these steps
+  say to <i>act as normal</i>, that means that the event must be fired as it would have had these
+  requirements not been applied.</p>
+
   <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, act as normal
    and abort these steps.</li>
 
+   <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then act as normal
+   and abort these steps.</li>
+
    <li><p>Let <var title="">pixel</var> be the pixel indicated by the pointing device.</li>
 
    <li><p>Let <var title="">region</var> be the <a href=#hit-region>hit region</a> that is <a href=#the-region-for-a-pixel title="the
@@ -76320,22 +76334,34 @@
 
    <li><p>Set the <var title="">click in progress</var> flag on the element to false.</li>
 
-  </ol><p>When a pointing device is clicked, the user agent must run these steps:</p>
+  </ol><p>When a pointing device is clicked, the user agent must <a href=#run-authentic-click-activation-steps>run authentic click activation
+  steps</a> instead of firing the click event<!-- interaction event spec point -->. When a user
+  agent is to <dfn id=run-authentic-click-activation-steps>run authentic click activation steps</dfn> for a given event <var title="">event</var>, it must follow these steps:</p>
 
-  <ol><li><p>If the element's <var title="">click in progress</var> flag is set to true, then abort
-   these steps.</li>
+  <ol><li><p>Let <var title="">target</var> be the element designated by the user (the target of <var title="">event</var>).</li>
 
-   <li><p>Set the <var title="">click in progress</var> flag on the element to true.</li>
+   <li><p>If <var title="">target</var> is a <code><a href=#the-canvas-element>canvas</a></code> element, run the <a href=#canvas-mouseevent-rerouting-steps>canvas
+   <code>MouseEvent</code> rerouting steps</a>. If this changes <var title="">event</var>'s
+   target, then let <var title="">target</var> be the new target.</li>
 
-   <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable element</a> of the element
-   designated by the user (defined below), if any.</li>
+<!--(this is commented out because you can't possibly get here reentrantly and you can't get here while click() is running.)
+   <li><p>If <var title="">target</var>'s <var title="">click in progress</var> flag is set to
+   true, then abort these steps.</p></li>
+-->
 
+   <li><p>Set the <var title="">click in progress</var> flag on <var title="">target</var> to
+   true.</li>
+
+   <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable element</a> of <var title="">target</var> (defined below), if any.</li>
+
    <li><p>If there is an element <var title="">e</var>, <a href=#run-pre-click-activation-steps>run pre-click activation steps</a>
    on it.</li>
 
    <li>
 
-    <p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the required <code title=event-click><a href=#event-click>click</a></code> event.</p> <!-- interaction event spec point -->
+    <p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> <var title="">event</var> (the
+    required <code title=event-click><a href=#event-click>click</a></code> event) at <var title="">target</var>.</p> <!--
+    interaction event spec point -->
 
     <p>If there is an element <var title="">e</var> and the <code title=event-click><a href=#event-click>click</a></code>
     event is not canceled, <a href=#run-post-click-activation-steps>run post-click activation steps</a> on element <var title="">e</var>.</p>
@@ -76345,7 +76371,8 @@
 
    </li>
 
-   <li><p>Set the <var title="">click in progress</var> flag on the element to false.</li>
+   <li><p>Set the <var title="">click in progress</var> flag on <var title="">target</var> to
+   false.</li>
 
   </ol><p class=note>The algorithms above don't run for arbitrary synthetic events dispatched by author
   script. The <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make the <a href=#run-synthetic-click-activation-steps>run

Modified: images/Qp-overlap-outline.png
===================================================================
(Binary files differ)

Modified: index
===================================================================
--- index	2014-03-13 23:33:04 UTC (rev 8543)
+++ index	2014-03-14 23:05:29 UTC (rev 8544)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 13 March 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 14 March 2014</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -58690,6 +58690,9 @@
    <li><p>If <var title="">control</var> is not a descendant of <var title="">ancestor</var>, then
    return nothing and abort these steps.</li>
 
+   <li><p>If <var title="">control</var> is no longer a <a href=#supported-interactive-canvas-fallback-element>supported interactive canvas fallback
+   element</a>, then return nothing and abort these steps.</li>
+
    <li><p>Otherwise, return <var title="">control</var>.</li>
 
   </ol><p><dfn id=the-cursor-for-a-hit-region>The cursor for a hit region</dfn> <var title="">region</var> of a <code><a href=#the-canvas-element>canvas</a></code>
@@ -58747,7 +58750,36 @@
   reset, e.g. when a <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object is bound to or unbound from a
   <code><a href=#the-canvas-element>canvas</a></code>, or when the dimensions of the bitmap are changed.</p>
 
-  <hr><p>When the <dfn id=dom-context-2d-addhitregion title=dom-context-2d-addHitRegion><code>addHitRegion()</code></dfn> method is
+  <hr><p>An element is a <dfn id=supported-interactive-canvas-fallback-element>supported interactive canvas fallback element</dfn> if it is one of the
+  following:</p>
+
+  <ul class=brief><li><p>an <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a
+   <a href=#hyperlink>hyperlink</a> and that does not have any <code><a href=#the-img-element>img</a></code> descendants</li>
+
+   <li><p>a <code><a href=#the-button-element>button</a></code> element</li>
+
+   <li><p>an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
+   attribute is in one of the <a href="#checkbox-state-(type=checkbox)" title=attr-input-type-checkbox>Checkbox</a> or <a href="#radio-button-state-(type=radio)" title=attr-input-type-radio>Radio Button</a> states</li>
+
+   <li><p>an <code><a href=#the-input-element>input</a></code> element that is a <a href=#concept-button title=concept-button>button</a></li>
+
+   <li><p>a <code><a href=#the-select-element>select</a></code> element with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
+
+   <li><p>an <code><a href=#the-option-element>option</a></code> element that is in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> of a <code><a href=#the-select-element>select</a></code> element
+   with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
+
+   <li><p>a <a href=#sorting-interface-th-element>sorting interface <code>th</code> element</a></li>
+
+   <li><p>an element that would not be <a href=#interactive-content>interactive content</a> except for having the
+   <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute specified</li>
+
+   <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
+   entire table, to see the whole context -->
+   <li><p>a non-<a href=#interactive-content title="interactive content">interactive</a> <code><a href=#the-table-element>table</a></code>,
+   <code><a href=#the-caption-element>caption</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>,
+   <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, or <code><a href=#the-th-element>th</a></code> element</li>
+
+  </ul><hr><p>When the <dfn id=dom-context-2d-addhitregion title=dom-context-2d-addHitRegion><code>addHitRegion()</code></dfn> method is
   invoked, the user agent must run the following steps:</p>
 
   <ol><li><p>Let <var title="">arguments</var> be the dictionary object provided as the method's
@@ -58812,40 +58844,9 @@
 
      <li><p>The <var title="">specified pixels</var> has no pixels.</li>
 
-     <li>
+     <li><p>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is neither null nor a
+     <a href=#supported-interactive-canvas-fallback-element>supported interactive canvas fallback element</a>.</li>
 
-      <p>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is not one of the following:</p>
-
-      <ul class=brief><li><p>null</li>
-
-       <li><p>an <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a
-       <a href=#hyperlink>hyperlink</a></li>
-
-       <li><p>a <code><a href=#the-button-element>button</a></code> element</li>
-
-       <li><p>an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
-       attribute is in one of the <a href="#checkbox-state-(type=checkbox)" title=attr-input-type-checkbox>Checkbox</a> or <a href="#radio-button-state-(type=radio)" title=attr-input-type-radio>Radio Button</a> states</li>
-
-       <li><p>an <code><a href=#the-input-element>input</a></code> element that is a <a href=#concept-button title=concept-button>button</a></li>
-
-       <li><p>a <code><a href=#the-select-element>select</a></code> element with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
-
-       <li><p>an <code><a href=#the-option-element>option</a></code> element that is in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> of a <code><a href=#the-select-element>select</a></code> element
-       with a <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code> attribute or a <a href=#concept-select-size title=concept-select-size>display size</a> greater than 1</li>
-
-       <li><p>a <a href=#sorting-interface-th-element>sorting interface <code>th</code> element</a></li>
-
-       <li><p>an element that would not be <a href=#interactive-content>interactive content</a> except for having the
-       <code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code> attribute specified</li>
-
-       <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
-       entire table, to see the whole context -->
-       <li><p>a non-<a href=#interactive-content title="interactive content">interactive</a> <code><a href=#the-table-element>table</a></code>,
-       <code><a href=#the-caption-element>caption</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>,
-       <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-td-element>td</a></code>, or <code><a href=#the-th-element>th</a></code> element</li>
-
-      </ul></li>
-
      <li><p>The <var title="">parent region</var> is not null but has a <a href="#hit-region's-control" title="hit region's
      control">control</a>.</li>
 
@@ -59002,7 +59003,7 @@
 
   </ol></div>
 
-  <hr><p>The <code><a href=#mouseevent>MouseEvent</a></code> interface is extended to support hit
+  <hr><!--CLEANUP--><p>The <code><a href=#mouseevent>MouseEvent</a></code> interface is extended to support hit
   regions:</p>
 
   <pre class=idl>partial interface <a href=#mouseevent id=MouseEvent-partial>MouseEvent</a> {
@@ -59017,6 +59018,7 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>If the mouse was over a <a href=#hit-region>hit region</a>, then this returns the <a href="#hit-region's-id">hit region's ID</a>, if it has one.</p>
 
     <p>Otherwise, returns null.</p>
@@ -59031,14 +59033,26 @@
   ID</a> if the mouse was over a hit region when the event was fired.</p>
 
   <p>When a <code><a href=#mouseevent>MouseEvent</a></code> is to be fired at a <code><a href=#the-canvas-element>canvas</a></code> element by the user
-  agent in response to a pointing device action, if the <code><a href=#the-canvas-element>canvas</a></code> element has a <a href=#hit-region-list>hit
-  region list</a>, the user agent must instead follow these steps. If these steps say to <i>act
-  as normal</i>, that means that the event must be fired as it would have had these requirements not
-  been applied.</p>
+  agent in response to a pointing device action other than a click (e.g. a <code title=event-mousedown><a href=#event-mousedown>mousedown</a></code> event or a <code title=event-mousemove><a href=#event-mousemove>mousemove</a></code> event), the user agent must run the <a href=#canvas-mouseevent-rerouting-steps>canvas
+  <code>MouseEvent</code> rerouting steps</a> immediately prior to dispatching the event<!--
+  interaction event spec point -->. This does not affect default actions (so for instance, if the
+  event gets rerouted to an element that has a default action for <code title=event-mousemove><a href=#event-mousemove>mousemove</a></code> events, this default action doesn't trigger<!-- this
+  would be significantly more obvious if there was a real spec defining how mouse events trigger
+  that we could actually properly hook into -->).</p>
 
+  <p class=note>Actual clicks are handled by the <a href=#run-authentic-click-activation-steps>run authentic click activation
+  steps</a>, which also invoke these steps.</p>
+
+  <p>The <dfn id=canvas-mouseevent-rerouting-steps>canvas <code>MouseEvent</code> rerouting steps</dfn> are as follows. If these steps
+  say to <i>act as normal</i>, that means that the event must be fired as it would have had these
+  requirements not been applied.</p>
+
   <ol><li><p>If the pointing device is not indicating a pixel on the <code><a href=#the-canvas-element>canvas</a></code>, act as normal
    and abort these steps.</li>
 
+   <li><p>If the <code><a href=#the-canvas-element>canvas</a></code> element has no <a href=#hit-region-list>hit region list</a>, then act as normal
+   and abort these steps.</li>
+
    <li><p>Let <var title="">pixel</var> be the pixel indicated by the pointing device.</li>
 
    <li><p>Let <var title="">region</var> be the <a href=#hit-region>hit region</a> that is <a href=#the-region-for-a-pixel title="the
@@ -76320,22 +76334,34 @@
 
    <li><p>Set the <var title="">click in progress</var> flag on the element to false.</li>
 
-  </ol><p>When a pointing device is clicked, the user agent must run these steps:</p>
+  </ol><p>When a pointing device is clicked, the user agent must <a href=#run-authentic-click-activation-steps>run authentic click activation
+  steps</a> instead of firing the click event<!-- interaction event spec point -->. When a user
+  agent is to <dfn id=run-authentic-click-activation-steps>run authentic click activation steps</dfn> for a given event <var title="">event</var>, it must follow these steps:</p>
 
-  <ol><li><p>If the element's <var title="">click in progress</var> flag is set to true, then abort
-   these steps.</li>
+  <ol><li><p>Let <var title="">target</var> be the element designated by the user (the target of <var title="">event</var>).</li>
 
-   <li><p>Set the <var title="">click in progress</var> flag on the element to true.</li>
+   <li><p>If <var title="">target</var> is a <code><a href=#the-canvas-element>canvas</a></code> element, run the <a href=#canvas-mouseevent-rerouting-steps>canvas
+   <code>MouseEvent</code> rerouting steps</a>. If this changes <var title="">event</var>'s
+   target, then let <var title="">target</var> be the new target.</li>
 
-   <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable element</a> of the element
-   designated by the user (defined below), if any.</li>
+<!--(this is commented out because you can't possibly get here reentrantly and you can't get here while click() is running.)
+   <li><p>If <var title="">target</var>'s <var title="">click in progress</var> flag is set to
+   true, then abort these steps.</p></li>
+-->
 
+   <li><p>Set the <var title="">click in progress</var> flag on <var title="">target</var> to
+   true.</li>
+
+   <li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable element</a> of <var title="">target</var> (defined below), if any.</li>
+
    <li><p>If there is an element <var title="">e</var>, <a href=#run-pre-click-activation-steps>run pre-click activation steps</a>
    on it.</li>
 
    <li>
 
-    <p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the required <code title=event-click><a href=#event-click>click</a></code> event.</p> <!-- interaction event spec point -->
+    <p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> <var title="">event</var> (the
+    required <code title=event-click><a href=#event-click>click</a></code> event) at <var title="">target</var>.</p> <!--
+    interaction event spec point -->
 
     <p>If there is an element <var title="">e</var> and the <code title=event-click><a href=#event-click>click</a></code>
     event is not canceled, <a href=#run-post-click-activation-steps>run post-click activation steps</a> on element <var title="">e</var>.</p>
@@ -76345,7 +76371,8 @@
 
    </li>
 
-   <li><p>Set the <var title="">click in progress</var> flag on the element to false.</li>
+   <li><p>Set the <var title="">click in progress</var> flag on <var title="">target</var> to
+   false.</li>
 
   </ol><p class=note>The algorithms above don't run for arbitrary synthetic events dispatched by author
   script. The <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make the <a href=#run-synthetic-click-activation-steps>run

Modified: source
===================================================================
--- source	2014-03-13 23:33:04 UTC (rev 8543)
+++ source	2014-03-14 23:05:29 UTC (rev 8544)
@@ -65285,6 +65285,9 @@
    <li><p>If <var data-x="">control</var> is not a descendant of <var data-x="">ancestor</var>, then
    return nothing and abort these steps.</p></li>
 
+   <li><p>If <var data-x="">control</var> is no longer a <span>supported interactive canvas fallback
+   element</span>, then return nothing and abort these steps.</p></li>
+
    <li><p>Otherwise, return <var data-x="">control</var>.</p></li>
 
   </ol>
@@ -65370,6 +65373,47 @@
 
   <hr>
 
+  <p>An element is a <dfn>supported interactive canvas fallback element</dfn> if it is one of the
+  following:</p>
+
+  <ul class="brief">
+
+   <li><p>an <code>a</code> element that <span>represents</span> a
+   <span>hyperlink</span> and that does not have any <code>img</code> descendants</p></li>
+
+   <li><p>a <code>button</code> element</p></li>
+
+   <li><p>an <code>input</code> element whose <code data-x="attr-input-type">type</code>
+   attribute is in one of the <span data-x="attr-input-type-checkbox">Checkbox</span> or <span
+   data-x="attr-input-type-radio">Radio Button</span> states</p></li>
+
+   <li><p>an <code>input</code> element that is a <span
+   data-x="concept-button">button</span></p></li>
+
+   <li><p>a <code>select</code> element with a <code
+   data-x="attr-select-multiple">multiple</code> attribute or a <span
+   data-x="concept-select-size">display size</span> greater than 1</p></li>
+
+   <li><p>an <code>option</code> element that is in a <span
+   data-x="concept-select-option-list">list of options</span> of a <code>select</code> element
+   with a <code data-x="attr-select-multiple">multiple</code> attribute or a <span
+   data-x="concept-select-size">display size</span> greater than 1</p></li>
+
+   <li><p>a <span>sorting interface <code>th</code> element</span></p></li>
+
+   <li><p>an element that would not be <span>interactive content</span> except for having the
+   <code data-x="attr-tabindex">tabindex</code> attribute specified</p></li>
+
+   <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
+   entire table, to see the whole context -->
+   <li><p>a non-<span data-x="interactive content">interactive</span> <code>table</code>,
+   <code>caption</code>, <code>thead</code>, <code>tbody</code>, <code>tfoot</code>,
+   <code>tr</code>, <code>td</code>, or <code>th</code> element</p></li>
+
+  </ul>
+
+  <hr>
+
   <p>When the <dfn data-x="dom-context-2d-addHitRegion"><code>addHitRegion()</code></dfn> method is
   invoked, the user agent must run the following steps:</p>
 
@@ -65458,51 +65502,10 @@
 
      <li><p>The <var data-x="">specified pixels</var> has no pixels.</p></li>
 
-     <li>
+     <li><p>The <var data-x="">arguments</var> object's <code
+     data-x="dom-HitRegionOptions-control">control</code> member is neither null nor a
+     <span>supported interactive canvas fallback element</span>.</p></li>
 
-      <p>The <var data-x="">arguments</var> object's <code
-      data-x="dom-HitRegionOptions-control">control</code> member is not one of the following:</p>
-
-      <ul class="brief">
-
-       <li><p>null</p></li>
-
-       <li><p>an <code>a</code> element that <span>represents</span> a
-       <span>hyperlink</span></p></li>
-
-       <li><p>a <code>button</code> element</p></li>
-
-       <li><p>an <code>input</code> element whose <code data-x="attr-input-type">type</code>
-       attribute is in one of the <span data-x="attr-input-type-checkbox">Checkbox</span> or <span
-       data-x="attr-input-type-radio">Radio Button</span> states</p></li>
-
-       <li><p>an <code>input</code> element that is a <span
-       data-x="concept-button">button</span></p></li>
-
-       <li><p>a <code>select</code> element with a <code
-       data-x="attr-select-multiple">multiple</code> attribute or a <span
-       data-x="concept-select-size">display size</span> greater than 1</p></li>
-
-       <li><p>an <code>option</code> element that is in a <span
-       data-x="concept-select-option-list">list of options</span> of a <code>select</code> element
-       with a <code data-x="attr-select-multiple">multiple</code> attribute or a <span
-       data-x="concept-select-size">display size</span> greater than 1</p></li>
-
-       <li><p>a <span>sorting interface <code>th</code> element</span></p></li>
-
-       <li><p>an element that would not be <span>interactive content</span> except for having the
-       <code data-x="attr-tabindex">tabindex</code> attribute specified</p></li>
-
-       <!-- so that people can do grids, like crosswords, yet let AT users select rows, or the
-       entire table, to see the whole context -->
-       <li><p>a non-<span data-x="interactive content">interactive</span> <code>table</code>,
-       <code>caption</code>, <code>thead</code>, <code>tbody</code>, <code>tfoot</code>,
-       <code>tr</code>, <code>td</code>, or <code>th</code> element</p></li>
-
-      </ul>
-
-     </li>
-
      <li><p>The <var data-x="">parent region</var> is not null but has a <span data-x="hit region's
      control">control</span>.</p></li>
 
@@ -65698,6 +65701,7 @@
 
   <hr>
 
+<!--CLEANUP-->
   <p>The <code>MouseEvent</code> interface is extended to support hit
   regions:</p>
 
@@ -65715,6 +65719,7 @@
 
    <dd>
 
+<!--CLEANUP-->
     <p>If the mouse was over a <span>hit region</span>, then this returns the <span>hit region's ID</span>, if it has one.</p>
 
     <p>Otherwise, returns null.</p>
@@ -65731,16 +65736,31 @@
   ID</span> if the mouse was over a hit region when the event was fired.</p>
 
   <p>When a <code>MouseEvent</code> is to be fired at a <code>canvas</code> element by the user
-  agent in response to a pointing device action, if the <code>canvas</code> element has a <span>hit
-  region list</span>, the user agent must instead follow these steps. If these steps say to <i>act
-  as normal</i>, that means that the event must be fired as it would have had these requirements not
-  been applied.</p>
+  agent in response to a pointing device action other than a click (e.g. a <code
+  data-x="event-mousedown">mousedown</code> event or a <code
+  data-x="event-mousemove">mousemove</code> event), the user agent must run the <span>canvas
+  <code>MouseEvent</code> rerouting steps</span> immediately prior to dispatching the event<!--
+  interaction event spec point -->. This does not affect default actions (so for instance, if the
+  event gets rerouted to an element that has a default action for <code
+  data-x="event-mousemove">mousemove</code> events, this default action doesn't trigger<!-- this
+  would be significantly more obvious if there was a real spec defining how mouse events trigger
+  that we could actually properly hook into -->).</p>
 
+  <p class="note">Actual clicks are handled by the <span>run authentic click activation
+  steps</span>, which also invoke these steps.</p>
+
+  <p>The <dfn>canvas <code>MouseEvent</code> rerouting steps</dfn> are as follows. If these steps
+  say to <i>act as normal</i>, that means that the event must be fired as it would have had these
+  requirements not been applied.</p>
+
   <ol>
 
    <li><p>If the pointing device is not indicating a pixel on the <code>canvas</code>, act as normal
    and abort these steps.</p></li>
 
+   <li><p>If the <code>canvas</code> element has no <span>hit region list</span>, then act as normal
+   and abort these steps.</p></li>
+
    <li><p>Let <var data-x="">pixel</var> be the pixel indicated by the pointing device.</p></li>
 
    <li><p>Let <var data-x="">region</var> be the <span>hit region</span> that is <span data-x="the
@@ -85364,25 +85384,39 @@
 
   </ol>
 
-  <p>When a pointing device is clicked, the user agent must run these steps:</p>
+  <p>When a pointing device is clicked, the user agent must <span>run authentic click activation
+  steps</span> instead of firing the click event<!-- interaction event spec point -->. When a user
+  agent is to <dfn>run authentic click activation steps</dfn> for a given event <var
+  data-x="">event</var>, it must follow these steps:</p>
 
   <ol>
 
-   <li><p>If the element's <var data-x="">click in progress</var> flag is set to true, then abort
-   these steps.</p></li>
+   <li><p>Let <var data-x="">target</var> be the element designated by the user (the target of <var
+   data-x="">event</var>).</p></li>
 
-   <li><p>Set the <var data-x="">click in progress</var> flag on the element to true.</p></li>
+   <li><p>If <var data-x="">target</var> is a <code>canvas</code> element, run the <span>canvas
+   <code>MouseEvent</code> rerouting steps</span>. If this changes <var data-x="">event</var>'s
+   target, then let <var data-x="">target</var> be the new target.</p></li>
 
-   <li><p>Let <var data-x="">e</var> be the <span>nearest activatable element</span> of the element
-   designated by the user (defined below), if any.</p></li>
+<!--(this is commented out because you can't possibly get here reentrantly and you can't get here while click() is running.)
+   <li><p>If <var data-x="">target</var>'s <var data-x="">click in progress</var> flag is set to
+   true, then abort these steps.</p></li>
+-->
 
+   <li><p>Set the <var data-x="">click in progress</var> flag on <var data-x="">target</var> to
+   true.</p></li>
+
+   <li><p>Let <var data-x="">e</var> be the <span>nearest activatable element</span> of <var
+   data-x="">target</var> (defined below), if any.</p></li>
+
    <li><p>If there is an element <var data-x="">e</var>, <span>run pre-click activation steps</span>
    on it.</p></li>
 
    <li>
 
-    <p><span data-x="concept-event-dispatch">Dispatch</span> the required <code
-    data-x="event-click">click</code> event.</p> <!-- interaction event spec point -->
+    <p><span data-x="concept-event-dispatch">Dispatch</span> <var data-x="">event</var> (the
+    required <code data-x="event-click">click</code> event) at <var data-x="">target</var>.</p> <!--
+    interaction event spec point -->
 
     <p>If there is an element <var data-x="">e</var> and the <code data-x="event-click">click</code>
     event is not canceled, <span>run post-click activation steps</span> on element <var
@@ -85393,7 +85427,8 @@
 
    </li>
 
-   <li><p>Set the <var data-x="">click in progress</var> flag on the element to false.</p></li>
+   <li><p>Set the <var data-x="">click in progress</var> flag on <var data-x="">target</var> to
+   false.</p></li>
 
   </ol>
 




More information about the Commit-Watchers mailing list