Skip to content

Commit

Permalink
[Shadow DOM] [Bug 20017] Apply the event path trimming algorithm only…
Browse files Browse the repository at this point in the history
… to trusted events.
  • Loading branch information
hayatoito committed May 12, 2015
1 parent a19c83c commit 58c8aec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion spec/shadow/autolink-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ var autolinkConfig = {
'http://www.w3.org/TR/DOM-Level-3-Events/': {
'MouseEvent': '#interface-MouseEvent',
'mutation event': '#interface-MutationEvent',
'relatedTarget': '#widl-MouseEvent-relatedTarget'
'relatedTarget': '#widl-MouseEvent-relatedTarget',
'trusted events': '#trusted-events'
},

'http://www.w3.org/TR/touch-events/': {
Expand Down
10 changes: 7 additions & 3 deletions spec/shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ <h3>Event Paths</h3>
</div>

<p class="note">
If an event has a <code>relatedTarget</code>, the event path will be further trimmed. See the <a>event path trimming algorithm</a>, which is specified later.
For a <a title="trusted events" >trusted event</a> that has a <code>relatedTarget</code> attribute, the event path would be trimmed. See the <a>event path trimming algorithm</a>, which is specified later.
</p>

</section>
Expand Down Expand Up @@ -829,8 +829,8 @@ <h3>Retargeting <code>relatedTarget</code></h3>
<p>The relatedTarget retargeting process <strong>must</strong> occur prior to dispatch of an event.</p>

<p>
The <dfn>event path trimming algorithm</dfn> <strong>must</strong> be used to trim the event path for an event that has a <code>relatedTarget</code> property and
<strong>must</strong> be <a title="processing equivalence">equivalent</a> to processing the following steps:</p>
The <dfn>event path trimming algorithm</dfn> <strong>must</strong> be used to trim the event path for a <a title="trusted events">trusted event</a> that has a <code>relatedTarget</code> attribute and
<strong>must</strong> be <a title="processing equivalence">equivalent</a> to processing the following steps:
</p>
<div class="algorithm">
<dl>
Expand All @@ -851,6 +851,10 @@ <h3>Retargeting <code>relatedTarget</code></h3>
</ol>
</div>

<p class="note">
For an <a title="trusted events" >untrusted event</a>, the <a>event path trimming algorithm</a> is not used.
</p>

</section>

<section>
Expand Down

0 comments on commit 58c8aec

Please sign in to comment.