[html5] r5516 - [giow] (2) Make contextmenu into a MouseEvent. Fixing http://www.w3.org/Bugs/Pub [...]
whatwg at whatwg.org
whatwg at whatwg.org
Sun Sep 26 11:26:06 PDT 2010
Author: ianh
Date: 2010-09-26 11:26:05 -0700 (Sun, 26 Sep 2010)
New Revision: 5516
Modified:
complete.html
index
source
Log:
[giow] (2) Make contextmenu into a MouseEvent.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10595
Modified: complete.html
===================================================================
--- complete.html 2010-09-26 17:34:10 UTC (rev 5515)
+++ complete.html 2010-09-26 18:26:05 UTC (rev 5516)
@@ -50310,11 +50310,28 @@
<div class=impl>
<p>When an element's context menu is requested (e.g. by the user
- right-clicking the element, or pressing a context menu key), the UA
- must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-contextmenu>contextmenu</code> that bubbles and is
- cancelable at the element for which the menu was requested.</p>
+ right-clicking the element, or pressing a context menu key), the
+ user agent must apply the appropriate rules from the following
+ list:</p>
- <p class=note>Typically, therefore, the firing of the <code title=event-contextmenu>contextmenu</code> event will be the
+ <dl class=switch><dt>If the user requested a context menu using a pointing device</dt>
+
+ <dd><p>The user agent must dispatch an event with the name <code title=event-contextmenu>contextmenu</code>, that bubbles and is
+ cancelable, and that uses the <code>MouseEvent</code> interface, at
+ the element for which the menu was requested. The context
+ information of the event must be set to the same values as the last
+ <code>MouseEvent</code> user interaction event that was dispatched
+ as part of the gesture that that was interpreted as a request for
+ the context menu.</dd>
+
+ <dt>Otherwise</dt>
+
+ <dd><p>The user agent must <a href=#fire-a-synthetic-mouse-event title="fire a synthetic mouse
+ event">fire a synthetic mouse event named <code title=event-contextmenu>contextmenu</code></a> that bubbles
+ and is cancelable at the element for which the menu was
+ requested.</dd>
+
+ </dl><p class=note>Typically, therefore, the firing of the <code title=event-contextmenu>contextmenu</code> event will be the
default action of a <code title=mouseup>mouseup</code> or <code title=event-keyup>keyup</code> event. The exact sequence of events
is UA-dependent, as it will vary based on platform conventions.</p>
@@ -65217,54 +65234,30 @@
firing a <code title=event-click><a href=#event-click>click</a></code> event on the
element. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
- <p><dfn id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means that a <code title=event-click><a href=#event-click>click</a></code> event, which bubbles and is
- cancelable, and which uses the <code>MouseEvent</code> interface,
- must be dispatched at the given target. The event object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code title="">metaKey</code> attributes
- set according to the current state of the key input device, if any
- (false for any keys that are not available), its <code title="">detail</code> attribute set to 1, and its <code title="">relatedTarget</code> attribute set to null. The <code title="">getModifierState()</code> method on the object must return
- values appropriately describing the state of the key input device at
- the time the event is created.</p>
-
<p><dfn id=fire-a-simple-event title="fire a simple event">Firing a simple event named <var title="">e</var></dfn> means that an event with the name <var title="">e</var>, which does not bubble (except where otherwise
stated) and is not cancelable (except where otherwise stated), and
which uses the <code><a href=#event>Event</a></code> interface, must be dispatched at
the given target.</p>
-<!--
- <p><dfn title="fire a progress event">Firing a progress event named
- <var title="">e</var></dfn>, optionally in the context of a
- particular instance of the <span title="fetch">fetching
- algorithm</span>, means that an event with the name <var
- title="">e</var>, which does not bubble (except where otherwise
- stated) and is not cancelable (except where otherwise stated), and
- which uses the <code>ProgressEvent</code> interface, must be
- dispatched at the given target element. If there is a <span
- title="fetch">fetching algorithm</span>, and the <span>URL</span>
- being <span title="fetch">fetched</span> has the <span>same
- origin</span> as the <code>Document</code> of the target element,
- then the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to true if the <span title="fetch">fetching
- algorithm</span>'s subject has a known <span
- title="concept-fetch-total">size</span>; the <code
- title="dom-ProgressEvents-total">total</code> attribute must be set
- to the subject's <span title="concept-fetch-total">size</span> if it
- is known and zero otherwise; and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attribute must be
- set to the <span title="concept-fetch-loaded">number of bytes
- downloaded</span>, excluding HTTP headers <span
- title="concept-http-equivalent-headers">or
- equivalent</span>. Otherwise, the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to false, and the <code
- title="dom-ProgressEvents-total">total</code> and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attributes must be
- set to zero. <a href="#r-e-f-sPROGRESS">[PROGRESS]</a></p>
-(also fix reference in line above)-->
+ <p><dfn id=fire-a-synthetic-mouse-event title="fire a synthetic mouse event">Firing a synthetic
+ mouse event named <var title="">e</var></dfn> means that an event
+ with the name <var title="">e</var>, which does not bubble (except
+ where otherwise stated) and is not cancelable (except where
+ otherwise stated), and which uses the <code>MouseEvent</code>
+ interface, must be dispatched at the given target. The event object
+ must have its <code title="">screenX</code>, <code title="">screenY</code>, <code title="">clientX</code>, <code title="">clientY</code>, and <code title="">button</code> attributes
+ set to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code title="">metaKey</code> attributes set according to the current
+ state of the key input device, if any (false for any keys that are
+ not available), its <code title="">detail</code> attribute set to 1,
+ and its <code title="">relatedTarget</code> attribute set to null.
+ The <code title="">getModifierState()</code> method on the object
+ must return values appropriately describing the state of the key
+ input device at the time the event is created.</p>
+ <p><dfn id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means <a href=#fire-a-synthetic-mouse-event title="fire
+ a synthetic mouse event">firing a synthetic mouse event named <code title=event-click>click</code></a>, which bubbles and is
+ cancelable.</p>
+
<p>The default action of these events is to do nothing except where
otherwise stated.</p>
Modified: index
===================================================================
--- index 2010-09-26 17:34:10 UTC (rev 5515)
+++ index 2010-09-26 18:26:05 UTC (rev 5516)
@@ -50290,11 +50290,28 @@
<div class=impl>
<p>When an element's context menu is requested (e.g. by the user
- right-clicking the element, or pressing a context menu key), the UA
- must <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-contextmenu>contextmenu</code> that bubbles and is
- cancelable at the element for which the menu was requested.</p>
+ right-clicking the element, or pressing a context menu key), the
+ user agent must apply the appropriate rules from the following
+ list:</p>
- <p class=note>Typically, therefore, the firing of the <code title=event-contextmenu>contextmenu</code> event will be the
+ <dl class=switch><dt>If the user requested a context menu using a pointing device</dt>
+
+ <dd><p>The user agent must dispatch an event with the name <code title=event-contextmenu>contextmenu</code>, that bubbles and is
+ cancelable, and that uses the <code>MouseEvent</code> interface, at
+ the element for which the menu was requested. The context
+ information of the event must be set to the same values as the last
+ <code>MouseEvent</code> user interaction event that was dispatched
+ as part of the gesture that that was interpreted as a request for
+ the context menu.</dd>
+
+ <dt>Otherwise</dt>
+
+ <dd><p>The user agent must <a href=#fire-a-synthetic-mouse-event title="fire a synthetic mouse
+ event">fire a synthetic mouse event named <code title=event-contextmenu>contextmenu</code></a> that bubbles
+ and is cancelable at the element for which the menu was
+ requested.</dd>
+
+ </dl><p class=note>Typically, therefore, the firing of the <code title=event-contextmenu>contextmenu</code> event will be the
default action of a <code title=mouseup>mouseup</code> or <code title=event-keyup>keyup</code> event. The exact sequence of events
is UA-dependent, as it will vary based on platform conventions.</p>
@@ -65217,54 +65234,30 @@
firing a <code title=event-click><a href=#event-click>click</a></code> event on the
element. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
- <p><dfn id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means that a <code title=event-click><a href=#event-click>click</a></code> event, which bubbles and is
- cancelable, and which uses the <code>MouseEvent</code> interface,
- must be dispatched at the given target. The event object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code title="">metaKey</code> attributes
- set according to the current state of the key input device, if any
- (false for any keys that are not available), its <code title="">detail</code> attribute set to 1, and its <code title="">relatedTarget</code> attribute set to null. The <code title="">getModifierState()</code> method on the object must return
- values appropriately describing the state of the key input device at
- the time the event is created.</p>
-
<p><dfn id=fire-a-simple-event title="fire a simple event">Firing a simple event named <var title="">e</var></dfn> means that an event with the name <var title="">e</var>, which does not bubble (except where otherwise
stated) and is not cancelable (except where otherwise stated), and
which uses the <code><a href=#event>Event</a></code> interface, must be dispatched at
the given target.</p>
-<!--
- <p><dfn title="fire a progress event">Firing a progress event named
- <var title="">e</var></dfn>, optionally in the context of a
- particular instance of the <span title="fetch">fetching
- algorithm</span>, means that an event with the name <var
- title="">e</var>, which does not bubble (except where otherwise
- stated) and is not cancelable (except where otherwise stated), and
- which uses the <code>ProgressEvent</code> interface, must be
- dispatched at the given target element. If there is a <span
- title="fetch">fetching algorithm</span>, and the <span>URL</span>
- being <span title="fetch">fetched</span> has the <span>same
- origin</span> as the <code>Document</code> of the target element,
- then the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to true if the <span title="fetch">fetching
- algorithm</span>'s subject has a known <span
- title="concept-fetch-total">size</span>; the <code
- title="dom-ProgressEvents-total">total</code> attribute must be set
- to the subject's <span title="concept-fetch-total">size</span> if it
- is known and zero otherwise; and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attribute must be
- set to the <span title="concept-fetch-loaded">number of bytes
- downloaded</span>, excluding HTTP headers <span
- title="concept-http-equivalent-headers">or
- equivalent</span>. Otherwise, the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to false, and the <code
- title="dom-ProgressEvents-total">total</code> and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attributes must be
- set to zero. <a href="#r-e-f-sPROGRESS">[PROGRESS]</a></p>
-(also fix reference in line above)-->
+ <p><dfn id=fire-a-synthetic-mouse-event title="fire a synthetic mouse event">Firing a synthetic
+ mouse event named <var title="">e</var></dfn> means that an event
+ with the name <var title="">e</var>, which does not bubble (except
+ where otherwise stated) and is not cancelable (except where
+ otherwise stated), and which uses the <code>MouseEvent</code>
+ interface, must be dispatched at the given target. The event object
+ must have its <code title="">screenX</code>, <code title="">screenY</code>, <code title="">clientX</code>, <code title="">clientY</code>, and <code title="">button</code> attributes
+ set to 0, its <code title="">ctrlKey</code>, <code title="">shiftKey</code>, <code title="">altKey</code>, and <code title="">metaKey</code> attributes set according to the current
+ state of the key input device, if any (false for any keys that are
+ not available), its <code title="">detail</code> attribute set to 1,
+ and its <code title="">relatedTarget</code> attribute set to null.
+ The <code title="">getModifierState()</code> method on the object
+ must return values appropriately describing the state of the key
+ input device at the time the event is created.</p>
+ <p><dfn id=fire-a-click-event title="fire a click event">Firing a <code title=event-click>click</code> event</dfn> means <a href=#fire-a-synthetic-mouse-event title="fire
+ a synthetic mouse event">firing a synthetic mouse event named <code title=event-click>click</code></a>, which bubbles and is
+ cancelable.</p>
+
<p>The default action of these events is to do nothing except where
otherwise stated.</p>
Modified: source
===================================================================
--- source 2010-09-26 17:34:10 UTC (rev 5515)
+++ source 2010-09-26 18:26:05 UTC (rev 5516)
@@ -56261,11 +56261,33 @@
<div class="impl">
<p>When an element's context menu is requested (e.g. by the user
- right-clicking the element, or pressing a context menu key), the UA
- must <span>fire a simple event</span> named <code
- title="event-contextmenu">contextmenu</code> that bubbles and is
- cancelable at the element for which the menu was requested.</p>
+ right-clicking the element, or pressing a context menu key), the
+ user agent must apply the appropriate rules from the following
+ list:</p>
+ <dl class="switch">
+
+ <dt>If the user requested a context menu using a pointing device</dt>
+
+ <dd><p>The user agent must dispatch an event with the name <code
+ title="event-contextmenu">contextmenu</code>, that bubbles and is
+ cancelable, and that uses the <code>MouseEvent</code> interface, at
+ the element for which the menu was requested. The context
+ information of the event must be set to the same values as the last
+ <code>MouseEvent</code> user interaction event that was dispatched
+ as part of the gesture that that was interpreted as a request for
+ the context menu.</p></dd>
+
+ <dt>Otherwise</dt>
+
+ <dd><p>The user agent must <span title="fire a synthetic mouse
+ event">fire a synthetic mouse event named <code
+ title="event-contextmenu">contextmenu</code></span> that bubbles
+ and is cancelable at the element for which the menu was
+ requested.</p></dd>
+
+ </dl>
+
<p class="note">Typically, therefore, the firing of the <code
title="event-contextmenu">contextmenu</code> event will be the
default action of a <code title="mouseup">mouseup</code> or <code
@@ -73880,24 +73902,6 @@
firing a <code title="event-click">click</code> event on the
element. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
- <p><dfn title="fire a click event">Firing a <code
- title="event-click">click</code> event</dfn> means that a <code
- title="event-click">click</code> event, which bubbles and is
- cancelable, and which uses the <code>MouseEvent</code> interface,
- must be dispatched at the given target. The event object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0, its <code
- title="">ctrlKey</code>, <code title="">shiftKey</code>, <code
- title="">altKey</code>, and <code title="">metaKey</code> attributes
- set according to the current state of the key input device, if any
- (false for any keys that are not available), its <code
- title="">detail</code> attribute set to 1, and its <code
- title="">relatedTarget</code> attribute set to null. The <code
- title="">getModifierState()</code> method on the object must return
- values appropriately describing the state of the key input device at
- the time the event is created.</p>
-
<p><dfn title="fire a simple event">Firing a simple event named <var
title="">e</var></dfn> means that an event with the name <var
title="">e</var>, which does not bubble (except where otherwise
@@ -73905,38 +73909,31 @@
which uses the <code>Event</code> interface, must be dispatched at
the given target.</p>
-<!--
- <p><dfn title="fire a progress event">Firing a progress event named
- <var title="">e</var></dfn>, optionally in the context of a
- particular instance of the <span title="fetch">fetching
- algorithm</span>, means that an event with the name <var
- title="">e</var>, which does not bubble (except where otherwise
- stated) and is not cancelable (except where otherwise stated), and
- which uses the <code>ProgressEvent</code> interface, must be
- dispatched at the given target element. If there is a <span
- title="fetch">fetching algorithm</span>, and the <span>URL</span>
- being <span title="fetch">fetched</span> has the <span>same
- origin</span> as the <code>Document</code> of the target element,
- then the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to true if the <span title="fetch">fetching
- algorithm</span>'s subject has a known <span
- title="concept-fetch-total">size</span>; the <code
- title="dom-ProgressEvents-total">total</code> attribute must be set
- to the subject's <span title="concept-fetch-total">size</span> if it
- is known and zero otherwise; and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attribute must be
- set to the <span title="concept-fetch-loaded">number of bytes
- downloaded</span>, excluding HTTP headers <span
- title="concept-http-equivalent-headers">or
- equivalent</span>. Otherwise, the <code
- title="dom-ProgressEvents-lengthComputable">lengthComputable</code>
- attribute must be set to false, and the <code
- title="dom-ProgressEvents-total">total</code> and the <code
- title="dom-ProgressEvents-loaded">loaded</code> attributes must be
- set to zero. <a href="#r-e-f-sPROGRESS">[PROGRESS]</a></p>
-(also fix reference in line above)-->
+ <p><dfn title="fire a synthetic mouse event">Firing a synthetic
+ mouse event named <var title="">e</var></dfn> means that an event
+ with the name <var title="">e</var>, which does not bubble (except
+ where otherwise stated) and is not cancelable (except where
+ otherwise stated), and which uses the <code>MouseEvent</code>
+ interface, must be dispatched at the given target. The event object
+ must have its <code title="">screenX</code>, <code
+ title="">screenY</code>, <code title="">clientX</code>, <code
+ title="">clientY</code>, and <code title="">button</code> attributes
+ set to 0, its <code title="">ctrlKey</code>, <code
+ title="">shiftKey</code>, <code title="">altKey</code>, and <code
+ title="">metaKey</code> attributes set according to the current
+ state of the key input device, if any (false for any keys that are
+ not available), its <code title="">detail</code> attribute set to 1,
+ and its <code title="">relatedTarget</code> attribute set to null.
+ The <code title="">getModifierState()</code> method on the object
+ must return values appropriately describing the state of the key
+ input device at the time the event is created.</p>
+ <p><dfn title="fire a click event">Firing a <code
+ title="event-click">click</code> event</dfn> means <span title="fire
+ a synthetic mouse event">firing a synthetic mouse event named <code
+ title="event-click">click</code></span>, which bubbles and is
+ cancelable.</p>
+
<p>The default action of these events is to do nothing except where
otherwise stated.</p>
More information about the Commit-Watchers
mailing list