Skip to content

Commit

Permalink
[giow] (2) Change how nested clicks are prevented to also prevent cli…
Browse files Browse the repository at this point in the history
…ck() inside a regular onclick=''.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14427

git-svn-id: http://svn.whatwg.org/webapps@6817 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 4, 2011
1 parent 1a1013b commit 7e5970a
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 94 deletions.
73 changes: 42 additions & 31 deletions complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 3 November 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 November 2011</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>
Expand Down Expand Up @@ -11773,15 +11773,41 @@ <h6 id=interactive-content-0><span class=secno>3.2.5.1.7 </span>Interactive cont
interaction event must be to <a href=#run-synthetic-click-activation-steps>run synthetic click activation
steps</a> on the element.</p> <!-- interaction event spec point -->

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>When a user agent is to <dfn id=run-synthetic-click-activation-steps>run synthetic click activation
steps</dfn> on an element, the user agent must <a href=#run-pre-click-activation-steps>run pre-click
activation steps</a> on the element, then <a href=#fire-a-click-event>fire a <code title=event-click>click</code> event</a> at the element. The
default action of this <code title=event-click><a href=#event-click>click</a></code> event
must be to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on the
element. If the event is canceled, the user agent must <a href=#run-canceled-activation-steps>run
canceled activation steps</a> on the element instead.</p>

<p>When a pointing device is clicked, the user agent must run these
steps</dfn> on an element, the user agent must run the following
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>

<li><p>Set the <var title="">click in progress</var> flag on the
element to true.</li>

<li><p><a href=#run-pre-click-activation-steps>Run pre-click activation steps</a> on the
element.</li>

<li><p><a href=#fire-a-click-event>Fire a <code title=event-click>click</code>
event</a> at the element.</li>

<li>

<p>If this <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 the
element.</p>

<p>If the event <em>is</em> canceled, the user agent must
<a href=#run-canceled-activation-steps>run canceled activation steps</a> on the element
instead.</p>

</li>

<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><li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
Expand Down Expand Up @@ -11840,9 +11866,10 @@ <h6 id=interactive-content-0><span class=secno>3.2.5.1.7 </span>Interactive cont

<p>When a user agent is to <dfn id=run-post-click-activation-steps>run post-click activation
steps</dfn> on an element, it must run the <dfn id=activation-behavior>activation
behavior</dfn> defined for that element. Activation behaviors can
refer to the <code title=event-click><a href=#event-click>click</a></code> event that was
fired by the steps above leading up to this point.</p>
behavior</dfn> defined for that element, if any. Activation
behaviors can refer to the <code title=event-click><a href=#event-click>click</a></code>
event that was fired by the steps above leading up to this
point.</p>

</div>

Expand Down Expand Up @@ -71056,27 +71083,11 @@ <h3 id=activation><span class=secno>8.2 </span>Activation</h3>

</dl><div class=impl>

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>The <dfn id=dom-click title=dom-click><code>click()</code></dfn> method must
run 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>

<li><p>Set the <var title="">click in progress</var> flag on the
element to true.</li>

<li><p>If the element has a defined <a href=#activation-behavior>activation behavior</a>,
<a href=#run-synthetic-click-activation-steps>run synthetic click activation steps</a> on the
element. Otherwise, <a href=#fire-a-click-event>fire a <code>click</code> event</a> at
the element.</li>

<li><p>Set the <var title="">click in progress</var> flag on the
element to false.</li>
<a href=#run-synthetic-click-activation-steps>run synthetic click activation steps</a> on the
element.</p>

</ol></div>
</div>


<h3 id=focus><span class=secno>8.3 </span>Focus</h3>
Expand Down
73 changes: 42 additions & 31 deletions index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 3 November 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 November 2011</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>
Expand Down Expand Up @@ -11773,15 +11773,41 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
interaction event must be to <a href=#run-synthetic-click-activation-steps>run synthetic click activation
steps</a> on the element.</p> <!-- interaction event spec point -->

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>When a user agent is to <dfn id=run-synthetic-click-activation-steps>run synthetic click activation
steps</dfn> on an element, the user agent must <a href=#run-pre-click-activation-steps>run pre-click
activation steps</a> on the element, then <a href=#fire-a-click-event>fire a <code title=event-click>click</code> event</a> at the element. The
default action of this <code title=event-click><a href=#event-click>click</a></code> event
must be to <a href=#run-post-click-activation-steps>run post-click activation steps</a> on the
element. If the event is canceled, the user agent must <a href=#run-canceled-activation-steps>run
canceled activation steps</a> on the element instead.</p>

<p>When a pointing device is clicked, the user agent must run these
steps</dfn> on an element, the user agent must run the following
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>

<li><p>Set the <var title="">click in progress</var> flag on the
element to true.</li>

<li><p><a href=#run-pre-click-activation-steps>Run pre-click activation steps</a> on the
element.</li>

<li><p><a href=#fire-a-click-event>Fire a <code title=event-click>click</code>
event</a> at the element.</li>

<li>

<p>If this <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 the
element.</p>

<p>If the event <em>is</em> canceled, the user agent must
<a href=#run-canceled-activation-steps>run canceled activation steps</a> on the element
instead.</p>

</li>

<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><li><p>Let <var title="">e</var> be the <a href=#nearest-activatable-element>nearest activatable
Expand Down Expand Up @@ -11840,9 +11866,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0

<p>When a user agent is to <dfn id=run-post-click-activation-steps>run post-click activation
steps</dfn> on an element, it must run the <dfn id=activation-behavior>activation
behavior</dfn> defined for that element. Activation behaviors can
refer to the <code title=event-click><a href=#event-click>click</a></code> event that was
fired by the steps above leading up to this point.</p>
behavior</dfn> defined for that element, if any. Activation
behaviors can refer to the <code title=event-click><a href=#event-click>click</a></code>
event that was fired by the steps above leading up to this
point.</p>

</div>

Expand Down Expand Up @@ -71056,27 +71083,11 @@ interface <dfn id=navigatorstorageutils>NavigatorStorageUtils</dfn> {

</dl><div class=impl>

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>The <dfn id=dom-click title=dom-click><code>click()</code></dfn> method must
run 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>

<li><p>Set the <var title="">click in progress</var> flag on the
element to true.</li>

<li><p>If the element has a defined <a href=#activation-behavior>activation behavior</a>,
<a href=#run-synthetic-click-activation-steps>run synthetic click activation steps</a> on the
element. Otherwise, <a href=#fire-a-click-event>fire a <code>click</code> event</a> at
the element.</li>

<li><p>Set the <var title="">click in progress</var> flag on the
element to false.</li>
<a href=#run-synthetic-click-activation-steps>run synthetic click activation steps</a> on the
element.</p>

</ol></div>
</div>


<h3 id=focus><span class=secno>8.3 </span>Focus</h3>
Expand Down
74 changes: 42 additions & 32 deletions source
Expand Up @@ -12161,14 +12161,43 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
interaction event must be to <span>run synthetic click activation
steps</span> on the element.</p> <!-- interaction event spec point -->

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>When a user agent is to <dfn>run synthetic click activation
steps</dfn> on an element, the user agent must <span>run pre-click
activation steps</span> on the element, then <span>fire a <code
title="event-click">click</code> event</span> at the element. The
default action of this <code title="event-click">click</code> event
must be to <span>run post-click activation steps</span> on the
element. If the event is canceled, the user agent must <span>run
canceled activation steps</span> on the element instead.</p>
steps</dfn> on an element, the user agent must run the following
steps:</p>

<ol>

<li><p>If the element'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 the
element to true.</p></li>

<li><p><span>Run pre-click activation steps</span> on the
element.</p></li>

<li><p><span>Fire a <code title="event-click">click</code>
event</span> at the element.</p></li>

<li>

<p>If this <code title="event-click">click</code> event is not
canceled, <span>run post-click activation steps</span> on the
element.</p>

<p>If the event <em>is</em> canceled, the user agent must
<span>run canceled activation steps</span> on the element
instead.</p>

</li>

<li><p>Set the <var title="">click in progress</var> flag on the
element to false.</p></li>

</ol>

<p>When a pointing device is clicked, the user agent must run these
steps:</p>
Expand Down Expand Up @@ -12239,9 +12268,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0

<p>When a user agent is to <dfn>run post-click activation
steps</dfn> on an element, it must run the <dfn>activation
behavior</dfn> defined for that element. Activation behaviors can
refer to the <code title="event-click">click</code> event that was
fired by the steps above leading up to this point.</p>
behavior</dfn> defined for that element, if any. Activation
behaviors can refer to the <code title="event-click">click</code>
event that was fired by the steps above leading up to this
point.</p>

</div>

Expand Down Expand Up @@ -80803,29 +80833,9 @@ interface <dfn>NavigatorStorageUtils</dfn> {

<div class="impl">

<p>Each element has a <var title="">click in progress</var> flag,
initially set to false.</p>

<p>The <dfn title="dom-click"><code>click()</code></dfn> method must
run 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.</p></li>

<li><p>Set the <var title="">click in progress</var> flag on the
element to true.</p></li>

<li><p>If the element has a defined <span>activation behavior</span>,
<span>run synthetic click activation steps</span> on the
element. Otherwise, <span>fire a <code>click</code> event</span> at
the element.</p></li>

<li><p>Set the <var title="">click in progress</var> flag on the
element to false.</p></li>

</ol>
<span>run synthetic click activation steps</span> on the
element.</p>

</div>

Expand Down

0 comments on commit 7e5970a

Please sign in to comment.