[html5] r3123 - [giow] (2) Make the formatBlock execCommand more discerning. (bug 6440)

whatwg at whatwg.org whatwg at whatwg.org
Sun May 24 18:27:04 PDT 2009


Author: ianh
Date: 2009-05-24 18:27:02 -0700 (Sun, 24 May 2009)
New Revision: 3123

Modified:
   index
   source
Log:
[giow] (2) Make the formatBlock execCommand more discerning. (bug 6440)

Modified: index
===================================================================
--- index	2009-05-24 05:42:46 UTC (rev 3122)
+++ index	2009-05-25 01:27:02 UTC (rev 3123)
@@ -39,7 +39,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 24 May 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 25 May 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -12425,6 +12425,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12501,6 +12502,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12559,6 +12561,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12629,6 +12632,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#sectioning-content-0>Sectioning content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12694,6 +12698,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#heading-content-0>Heading content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12719,6 +12724,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#heading-content-0>Heading content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12776,6 +12782,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12871,6 +12878,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -12929,6 +12937,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -13461,6 +13470,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -13614,6 +13624,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -13765,6 +13776,7 @@
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
    <dd><a href=#sectioning-root>Sectioning root</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -40319,6 +40331,7 @@
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content-0>Flow content</a>.</dd>
+   <dd><a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <a href=#flow-content-0>flow content</a> is expected.</dd>
    <dt>Content model:</dt>
@@ -56973,8 +56986,8 @@
    <dt><dfn id=command-formatblock title=command-formatBlock><code>formatBlock</code></dfn></dt>
    <dd><strong>Summary:</strong> Wraps the selection in the element
    given by the second argument. If the second argument doesn't
-   specify an element that is <a href=#flow-content-0>flow content</a> but not
-   <a href=#phrasing-content-0>phrasing content</a>, does nothing.</dd>
+   specify an element that is a <dfn id=formatblock-candidate><code title="">formatBlock</code>
+   candidate</dfn>, does nothing.</dd>
    <dd class=impl>
     <p><strong>Action:</strong> The user agent must run the following
     steps:</p>
@@ -56987,18 +57000,17 @@
      <li>
       <p>If <var title="">value</var> is (now) an <a href=#ascii-case-insensitive>ASCII
       case-insensitive</a> match for the tag name of an element
-      defined by this specification that is defined to be <a href=#flow-content-0>flow
-      content</a> but not <a href=#phrasing-content-0>phrasing content</a>, then, for
-      every position in the selection, take the furthest <a href=#flow-content-0>flow
-      content</a> ancestor element of that position that contains
-      only <a href=#phrasing-content-0>phrasing content</a>, and, if that element is
-      <a href=#editable>editable</a>, and has a content model that allows it to
-      contain <a href=#flow-content-0>flow content</a> other than <a href=#phrasing-content-0>phrasing
-      content</a>, and has a parent element whose content model
-      allows that parent to contain any <a href=#flow-content-0>flow content</a>,
-      replace the element with one in the HTML namespace whose name is
-      <var title="">value</var>, and move all the children that were
-      in the element to the new element.</p>
+      defined by this specification that is defined to be a
+      <a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>, then,
+      for every position in the selection, take the furthest
+      <a href=#formatblock-candidate><code title="">formatBlock</code> candidate</a>
+      ancestor element of that position that contains only
+      <a href=#phrasing-content-0>phrasing content</a>, and, if that element is
+      <a href=#editable>editable</a> and has a parent element whose content
+      model allows that parent to contain any <a href=#flow-content-0>flow
+      content</a>, replace it with an element in the HTML namespace
+      whose name is <var title="">value</var>, and move all the
+      children that were in it to the new element.</p>
       <p>If there is no selection, then, where in the description
       above refers to the selection, the user agent must act as if the
       selection was an empty range (with just one position) at the

Modified: source
===================================================================
--- source	2009-05-24 05:42:46 UTC (rev 3122)
+++ source	2009-05-25 01:27:02 UTC (rev 3123)
@@ -13247,6 +13247,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Sectioning content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13327,6 +13328,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Sectioning content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13388,6 +13390,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Sectioning content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13466,6 +13469,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Sectioning content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13534,6 +13538,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Heading content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13562,6 +13567,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Heading content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13622,6 +13628,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13720,6 +13727,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -13781,6 +13789,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -14373,6 +14382,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -14535,6 +14545,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -14696,6 +14707,7 @@
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
    <dd><span>Sectioning root</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -45408,6 +45420,7 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span><code title="">formatBlock</code> candidate</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -66807,8 +66820,8 @@
    <dt><dfn title="command-formatBlock"><code>formatBlock</code></dfn></dt>
    <dd><strong>Summary:</strong> Wraps the selection in the element
    given by the second argument. If the second argument doesn't
-   specify an element that is <span>flow content</span> but not
-   <span>phrasing content</span>, does nothing.</dd>
+   specify an element that is a <dfn><code title="">formatBlock</code>
+   candidate</dfn>, does nothing.</dd>
    <dd class="impl">
     <p><strong>Action:</strong> The user agent must run the following
     steps:</p>
@@ -66822,18 +66835,17 @@
      <li>
       <p>If <var title="">value</var> is (now) an <span>ASCII
       case-insensitive</span> match for the tag name of an element
-      defined by this specification that is defined to be <span>flow
-      content</span> but not <span>phrasing content</span>, then, for
-      every position in the selection, take the furthest <span>flow
-      content</span> ancestor element of that position that contains
-      only <span>phrasing content</span>, and, if that element is
-      <span>editable</span>, and has a content model that allows it to
-      contain <span>flow content</span> other than <span>phrasing
-      content</span>, and has a parent element whose content model
-      allows that parent to contain any <span>flow content</span>,
-      replace the element with one in the HTML namespace whose name is
-      <var title="">value</var>, and move all the children that were
-      in the element to the new element.</p>
+      defined by this specification that is defined to be a
+      <span><code title="">formatBlock</code> candidate</span>, then,
+      for every position in the selection, take the furthest
+      <span><code title="">formatBlock</code> candidate</span>
+      ancestor element of that position that contains only
+      <span>phrasing content</span>, and, if that element is
+      <span>editable</span> and has a parent element whose content
+      model allows that parent to contain any <span>flow
+      content</span>, replace it with an element in the HTML namespace
+      whose name is <var title="">value</var>, and move all the
+      children that were in it to the new element.</p>
       <p>If there is no selection, then, where in the description
       above refers to the selection, the user agent must act as if the
       selection was an empty range (with just one position) at the




More information about the Commit-Watchers mailing list