Skip to content

Commit

Permalink
[giow] (1) Remove the logic that prevents multiple regions from mappi…
Browse files Browse the repository at this point in the history
…ng to the same control, since there are use cases for that.

Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@8586 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 29, 2014
1 parent 9e37ef4 commit 05672d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 57 deletions.
20 changes: 2 additions & 18 deletions complete.html
Expand Up @@ -58928,7 +58928,8 @@ <h6 id=hit-regions><span class=secno>4.12.4.2.15 </span>Hit regions</h6>

<p>Optionally, either a <a href="#hit-region's-control" title="hit region's control">control</a>, or an <a href="#hit-region's-unbacked-region-description" title="hit region's unbacked region description">unbacked region description</a>.</p>

<p>A <dfn id="hit-region's-control" title="hit region's control">control</dfn> is just a reference to an
<!--CLEANUP-->
<p>A <dfn id="hit-region's-control" title="hit region's control">control</dfn> is a reference to an
<code><a href=#element>Element</a></code> node, to which, in certain conditions, the user agent will route events,
and from which the user agent will determine the state of the hit region for the purposes of
accessibility tools. (The control is ignored when it is not a descendant of the
Expand Down Expand Up @@ -59340,23 +59341,6 @@ <h6 id=hit-regions><span class=secno>4.12.4.2.15 </span>Hit regions</h6>

</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is not null, then let <var title="">previous region for the control</var> be <a href=#the-region-representing-the-control>the region representing the
control</a> given by the <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member's
value for this <a href=#scratch-bitmap>scratch bitmap</a>, if any. If the <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is null or no such region currently
exists, let <var title="">previous region for the control</var> be null.</li>

<!-- the parent region can't have a control, because no region with a control can be a parent -
we check for that above. Thus, it is safe to remove the previous region for the control without
worrying that our parent is going to be affected.

It's also safe to remove the previous region with this ID and all its descendants, as we know
that our parent isn't part of that subtree. -->

<li><p>If there is a <var title="">previous region with this control</var>, remove it from the
<a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit
region's parent">parent</a> region, decrement that <a href="#hit-region's-child-count">hit region's child count</a> by
one.</li> <!-- we garbage collect the regions below -->

<li><p>If there is a <var title="">previous region with this ID</var>, remove it, and all <a href=#hit-region title="hit region">hit regions</a> for which it is an <a href=#ancestor-region>ancestor region</a>, from the
<a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit
region's parent">parent</a> region, decrement that <a href="#hit-region's-child-count">hit region's child count</a> by
Expand Down
20 changes: 2 additions & 18 deletions index
Expand Up @@ -58928,7 +58928,8 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex

<p>Optionally, either a <a href="#hit-region's-control" title="hit region's control">control</a>, or an <a href="#hit-region's-unbacked-region-description" title="hit region's unbacked region description">unbacked region description</a>.</p>

<p>A <dfn id="hit-region's-control" title="hit region's control">control</dfn> is just a reference to an
<!--CLEANUP-->
<p>A <dfn id="hit-region's-control" title="hit region's control">control</dfn> is a reference to an
<code><a href=#element>Element</a></code> node, to which, in certain conditions, the user agent will route events,
and from which the user agent will determine the state of the hit region for the purposes of
accessibility tools. (The control is ignored when it is not a descendant of the
Expand Down Expand Up @@ -59340,23 +59341,6 @@ v6DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex

</li>

<li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is not null, then let <var title="">previous region for the control</var> be <a href=#the-region-representing-the-control>the region representing the
control</a> given by the <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member's
value for this <a href=#scratch-bitmap>scratch bitmap</a>, if any. If the <code title=dom-HitRegionOptions-control><a href=#dom-hitregionoptions-control>control</a></code> member is null or no such region currently
exists, let <var title="">previous region for the control</var> be null.</li>

<!-- the parent region can't have a control, because no region with a control can be a parent -
we check for that above. Thus, it is safe to remove the previous region for the control without
worrying that our parent is going to be affected.

It's also safe to remove the previous region with this ID and all its descendants, as we know
that our parent isn't part of that subtree. -->

<li><p>If there is a <var title="">previous region with this control</var>, remove it from the
<a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit
region's parent">parent</a> region, decrement that <a href="#hit-region's-child-count">hit region's child count</a> by
one.</li> <!-- we garbage collect the regions below -->

<li><p>If there is a <var title="">previous region with this ID</var>, remove it, and all <a href=#hit-region title="hit region">hit regions</a> for which it is an <a href=#ancestor-region>ancestor region</a>, from the
<a href=#scratch-bitmap>scratch bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit
region's parent">parent</a> region, decrement that <a href="#hit-region's-child-count">hit region's child count</a> by
Expand Down
23 changes: 2 additions & 21 deletions source
Expand Up @@ -65586,7 +65586,8 @@ v6DVT (also check for '- -' bits in the part above) -->
<p>Optionally, either a <span data-x="hit region's control">control</span>, or an <span
data-x="hit region's unbacked region description">unbacked region description</span>.</p>

<p>A <dfn data-x="hit region's control">control</dfn> is just a reference to an
<!--CLEANUP-->
<p>A <dfn data-x="hit region's control">control</dfn> is a reference to an
<code>Element</code> node, to which, in certain conditions, the user agent will route events,
and from which the user agent will determine the state of the hit region for the purposes of
accessibility tools. (The control is ignored when it is not a descendant of the
Expand Down Expand Up @@ -66123,26 +66124,6 @@ v6DVT (also check for '- -' bits in the part above) -->

</li>

<li><p>If the <var data-x="">arguments</var> object's <code
data-x="dom-HitRegionOptions-control">control</code> member is not null, then let <var
data-x="">previous region for the control</var> be <span>the region representing the
control</span> given by the <code data-x="dom-HitRegionOptions-control">control</code> member's
value for this <span>scratch bitmap</span>, if any. If the <code
data-x="dom-HitRegionOptions-control">control</code> member is null or no such region currently
exists, let <var data-x="">previous region for the control</var> be null.</p></li>

<!-- the parent region can't have a control, because no region with a control can be a parent -
we check for that above. Thus, it is safe to remove the previous region for the control without
worrying that our parent is going to be affected.

It's also safe to remove the previous region with this ID and all its descendants, as we know
that our parent isn't part of that subtree. -->

<li><p>If there is a <var data-x="">previous region with this control</var>, remove it from the
<span>scratch bitmap</span>'s <span>hit region list</span>; then, if it had a <span data-x="hit
region's parent">parent</span> region, decrement that <span>hit region's child count</span> by
one.</p></li> <!-- we garbage collect the regions below -->

<li><p>If there is a <var data-x="">previous region with this ID</var>, remove it, and all <span
data-x="hit region">hit regions</span> for which it is an <span>ancestor region</span>, from the
<span>scratch bitmap</span>'s <span>hit region list</span>; then, if it had a <span data-x="hit
Expand Down

0 comments on commit 05672d5

Please sign in to comment.