[html5] r8617 - [e] (0) Move table sorting to microtasks. Fixing https://www.w3.org/Bugs/Public/ [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed May 7 15:52:23 PDT 2014
Author: ianh
Date: 2014-05-07 15:52:21 -0700 (Wed, 07 May 2014)
New Revision: 8617
Modified:
complete.html
index
source
Log:
[e] (0) Move table sorting to microtasks.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24809
Affected topics: DOM APIs, HTML
Modified: complete.html
===================================================================
--- complete.html 2014-05-07 22:31:48 UTC (rev 8616)
+++ complete.html 2014-05-07 22:52:21 UTC (rev 8617)
@@ -37125,23 +37125,13 @@
</ol><hr><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
in any way (including attributes changing), and when a <code><a href=#the-table-element>table</a></code> element becomes a
<a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a>, the <code><a href=#the-table-element>table</a></code> element is said to
- become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>.</p>
+ become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>. When a <code><a href=#the-table-element>table</a></code> element becomes <a href=#a-table-with-a-pending-sort>a
+ table with a pending sort</a>, the user agent must <a href=#queue-a-microtask>queue a microtask</a> that applies
+ the <a href=#table-sorting-algorithm>table sorting algorithm</a> to that <code><a href=#the-table-element>table</a></code>, and then flags the
+ <code><a href=#the-table-element>table</a></code> as no longer being <a href=#a-table-with-a-pending-sort>a table with a pending sort</a>.</p>
- <p>When the user agent is to <dfn id=sort-the-tables-with-pending-sorts>sort the tables with pending sorts</dfn>, which happens during
- the <a href=#perform-a-microtask-checkpoint>perform a microtask checkpoint</a> algorithm, the user agent must run the following
- algorithm:</p>
+ <hr><p>When the user agent is to <dfn id=set-the-sort-key>set the sort key</dfn> to a <code><a href=#the-th-element>th</a></code> element <var title="">target</var>, it must run the following algorithm:</p>
- <ol><li><p>Let <var title="">tables</var> be a list of each <code><a href=#the-table-element>table</a></code> in the <a href=#unit-of-related-similar-origin-browsing-contexts>unit of
- related similar-origin browsing contexts</a> that is <a href=#a-table-with-a-pending-sort>a table with a pending sort</a>,
- in the order that they became such, with those that become such at the same time being listed in
- <a href=#tree-order>tree order</a>.</p>
-
- <li><p>Let all the <code><a href=#the-table-element>table</a></code> elements in <var title="">tables</var> no longer be <a href=#a-table-with-a-pending-sort title="a table with a pending sort">tables with a pending sort</a>.</li>
-
- <li><p>Apply the <a href=#table-sorting-algorithm>table sorting algorithm</a> to each <code><a href=#the-table-element>table</a></code> in <var title="">tables</var>, in order.</li>
-
- </ol><hr><p>When the user agent is to <dfn id=set-the-sort-key>set the sort key</dfn> to a <code><a href=#the-th-element>th</a></code> element <var title="">target</var>, it must run the following algorithm:</p>
-
<ol><li><p>Let <var title="">table</var> be the <code><a href=#the-table-element>table</a></code> of the <a href=#concept-table title=concept-table>table</a> of which <var title="">target</var> is a header cell.</li>
<li><p>If <code><a href=#the-th-element>th</a></code> is a <a href=#sorting-enabled-th-element>sorting-enabled <code>th</code> element</a> whose
@@ -72609,15 +72599,6 @@
</li>
- <li>
-
- <p><a href=#sort-the-tables-with-pending-sorts>Sort the tables with pending sorts</a>.</p>
-
- <p class=critical>This will be removed once sortable tables have been updated to use the
- <a href=#microtask-queue>microtask queue</a>.</p>
-
- </li>
-
<li><p><i>Microtask queue handling</i>: If the <a href=#event-loop>event loop</a>'s <a href=#microtask-queue>microtask
queue</a> is empty, jump to the <i>done</i> step below.</li>
Modified: index
===================================================================
--- index 2014-05-07 22:31:48 UTC (rev 8616)
+++ index 2014-05-07 22:52:21 UTC (rev 8617)
@@ -37125,23 +37125,13 @@
</ol><hr><p>When any of the descendants of a <a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a> change
in any way (including attributes changing), and when a <code><a href=#the-table-element>table</a></code> element becomes a
<a href=#sorting-enabled-table-element>sorting-enabled <code>table</code> element</a>, the <code><a href=#the-table-element>table</a></code> element is said to
- become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>.</p>
+ become <dfn id=a-table-with-a-pending-sort>a table with a pending sort</dfn>. When a <code><a href=#the-table-element>table</a></code> element becomes <a href=#a-table-with-a-pending-sort>a
+ table with a pending sort</a>, the user agent must <a href=#queue-a-microtask>queue a microtask</a> that applies
+ the <a href=#table-sorting-algorithm>table sorting algorithm</a> to that <code><a href=#the-table-element>table</a></code>, and then flags the
+ <code><a href=#the-table-element>table</a></code> as no longer being <a href=#a-table-with-a-pending-sort>a table with a pending sort</a>.</p>
- <p>When the user agent is to <dfn id=sort-the-tables-with-pending-sorts>sort the tables with pending sorts</dfn>, which happens during
- the <a href=#perform-a-microtask-checkpoint>perform a microtask checkpoint</a> algorithm, the user agent must run the following
- algorithm:</p>
+ <hr><p>When the user agent is to <dfn id=set-the-sort-key>set the sort key</dfn> to a <code><a href=#the-th-element>th</a></code> element <var title="">target</var>, it must run the following algorithm:</p>
- <ol><li><p>Let <var title="">tables</var> be a list of each <code><a href=#the-table-element>table</a></code> in the <a href=#unit-of-related-similar-origin-browsing-contexts>unit of
- related similar-origin browsing contexts</a> that is <a href=#a-table-with-a-pending-sort>a table with a pending sort</a>,
- in the order that they became such, with those that become such at the same time being listed in
- <a href=#tree-order>tree order</a>.</p>
-
- <li><p>Let all the <code><a href=#the-table-element>table</a></code> elements in <var title="">tables</var> no longer be <a href=#a-table-with-a-pending-sort title="a table with a pending sort">tables with a pending sort</a>.</li>
-
- <li><p>Apply the <a href=#table-sorting-algorithm>table sorting algorithm</a> to each <code><a href=#the-table-element>table</a></code> in <var title="">tables</var>, in order.</li>
-
- </ol><hr><p>When the user agent is to <dfn id=set-the-sort-key>set the sort key</dfn> to a <code><a href=#the-th-element>th</a></code> element <var title="">target</var>, it must run the following algorithm:</p>
-
<ol><li><p>Let <var title="">table</var> be the <code><a href=#the-table-element>table</a></code> of the <a href=#concept-table title=concept-table>table</a> of which <var title="">target</var> is a header cell.</li>
<li><p>If <code><a href=#the-th-element>th</a></code> is a <a href=#sorting-enabled-th-element>sorting-enabled <code>th</code> element</a> whose
@@ -72609,15 +72599,6 @@
</li>
- <li>
-
- <p><a href=#sort-the-tables-with-pending-sorts>Sort the tables with pending sorts</a>.</p>
-
- <p class=critical>This will be removed once sortable tables have been updated to use the
- <a href=#microtask-queue>microtask queue</a>.</p>
-
- </li>
-
<li><p><i>Microtask queue handling</i>: If the <a href=#event-loop>event loop</a>'s <a href=#microtask-queue>microtask
queue</a> is empty, jump to the <i>done</i> step below.</li>
Modified: source
===================================================================
--- source 2014-05-07 22:31:48 UTC (rev 8616)
+++ source 2014-05-07 22:52:21 UTC (rev 8617)
@@ -39160,27 +39160,11 @@
<p>When any of the descendants of a <span>sorting-enabled <code>table</code> element</span> change
in any way (including attributes changing), and when a <code>table</code> element becomes a
<span>sorting-enabled <code>table</code> element</span>, the <code>table</code> element is said to
- become <dfn>a table with a pending sort</dfn>.</p>
+ become <dfn>a table with a pending sort</dfn>. When a <code>table</code> element becomes <span>a
+ table with a pending sort</span>, the user agent must <span>queue a microtask</span> that applies
+ the <span>table sorting algorithm</span> to that <code>table</code>, and then flags the
+ <code>table</code> as no longer being <span>a table with a pending sort</span>.</p>
- <p>When the user agent is to <dfn>sort the tables with pending sorts</dfn>, which happens during
- the <span>perform a microtask checkpoint</span> algorithm, the user agent must run the following
- algorithm:</p>
-
- <ol>
-
- <li><p>Let <var data-x="">tables</var> be a list of each <code>table</code> in the <span>unit of
- related similar-origin browsing contexts</span> that is <span>a table with a pending sort</span>,
- in the order that they became such, with those that become such at the same time being listed in
- <span>tree order</span>.</p>
-
- <li><p>Let all the <code>table</code> elements in <var data-x="">tables</var> no longer be <span
- data-x="a table with a pending sort">tables with a pending sort</span>.</p></li>
-
- <li><p>Apply the <span>table sorting algorithm</span> to each <code>table</code> in <var
- data-x="">tables</var>, in order.</p></li>
-
- </ol>
-
<hr>
<p>When the user agent is to <dfn>set the sort key</dfn> to a <code>th</code> element <var
@@ -79896,15 +79880,6 @@
</li>
- <li>
-
- <p><span>Sort the tables with pending sorts</span>.</p>
-
- <p class="critical">This will be removed once sortable tables have been updated to use the
- <span>microtask queue</span>.</p>
-
- </li>
-
<li><p><i>Microtask queue handling</i>: If the <span>event loop</span>'s <span>microtask
queue</span> is empty, jump to the <i>done</i> step below.</p></li>
More information about the Commit-Watchers
mailing list