[html5] r1366 - /

whatwg at whatwg.org whatwg at whatwg.org
Sat Mar 8 00:37:27 PST 2008


Author: ianh
Date: 2008-03-08 00:37:26 -0800 (Sat, 08 Mar 2008)
New Revision: 1366

Modified:
   index
   source
Log:
[] (0) Define the createLink and unlink commands for execCommand(), and change the infrastructure in the spec to handle these commands.

Modified: index
===================================================================
--- index	2008-03-08 07:41:48 UTC (rev 1365)
+++ index	2008-03-08 08:37:26 UTC (rev 1366)
@@ -35604,19 +35604,14 @@
    title="">value</var> parameters, even if specified, are ignored unless
    otherwise stated.
 
-  <p class=note>In this specification, in fact, the <var
-   title="">doShowUI</var> parameter is always ignored, regardless of its
-   value. It is included for historical reasons only.
-
   <p>When <code title=dom-document-execCommand><a
    href="#execCommand">execCommand()</a></code> is invoked, the user agent
    must follow the following steps:
 
   <ol>
-   <li>If the given <var title="">commandId</var> maps to an entry below that
-    is marked as "<dfn id=editing2>editing hosts only</dfn>", and the
-    document is not <a href="#ready">ready for editing host commands</a>, do
-    nothing; abort these steps.
+   <li>If the given <var title="">commandId</var> maps to an entry in the
+    list below whose "Enabled When" entry has a condition that is currently
+    false, do nothing; abort these steps.
 
    <li>Otherwise, execute the "Action" listed below for the given <var
     title="">commandId</var>.
@@ -35739,8 +35734,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=superscript
     title=command-superscript><code>superscript</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     requested that the selection <a href="#contenteditable-wrapSemantic">be
     wrapped in the semantics</a> of the <code><a href="#sup">sup</a></code>
@@ -35763,8 +35756,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=subscript
     title=command-subscript><code>subscript</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     requested that the selection <a href="#contenteditable-wrapSemantic">be
     wrapped in the semantics</a> of the <em title=""><code><a
@@ -35787,8 +35778,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=bold
     title=command-bold><code>bold</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     requested that the selection <a href="#contenteditable-wrapSemantic">be
     wrapped in the semantics</a> of the <em title=""><code><a
@@ -35811,8 +35800,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=italic
     title=command-italic><code>italic</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     requested that the selection <a href="#contenteditable-wrapSemantic">be
     wrapped in the semantics</a> of the <em title=""><code><a
@@ -35832,11 +35819,52 @@
     expression given for the "State" above is true, the string "<code
     title="">false</code>" otherwise.
 
+   <dt>If the <var title="">commandId</var> is <dfn id=createlink
+    title=command-createLink><code>createLink</code></dfn>
+
+   <dd><strong>Action:</strong> The user agent must act as if the user had
+    requested that the selection <a href="#contenteditable-wrapSemantic">be
+    wrapped in the semantics</a> of the <em title=""><code><a
+    href="#a">a</a></code></em> element (or, again, unwrapped, or have that
+    semantic inserted or removed, as defined by the UA). If the user agent
+    creates an <code><a href="#a">a</a></code> element or modifies an
+    existing <code><a href="#a">a</a></code> element, then if the <var
+    title="">doShowUI</var> argument is present and has the value false, then
+    the value of the <var title="">value</var> argument must be used as the
+    URI of the link. Otherwise, the user should be prompted for the URI of
+    the link.
+
+   <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+    for editing host commands</a>.
+
+   <dd><strong>Indeterminate When:</strong> Never.
+
+   <dd><strong>State:</strong> Always false.
+
+   <dd><strong>Value:</strong> Always the string "<code
+    title="">false</code>".
+
+   <dt>If the <var title="">commandId</var> is <dfn id=unlink
+    title=command-unlink><code>unlink</code></dfn>
+
+   <dd><strong>Action:</strong> The user agent must remove all <code><a
+    href="#a">a</a></code> elements that have <code
+    title=attr-a-href>href</code> attributes and that are partially or
+    completely included in the current selection.
+
+   <dd><strong>Enabled When:</strong> The document has a selection that is
+    entirely within an <a href="#editing1">editing host</a>.
+
+   <dd><strong>Indeterminate When:</strong> Never.
+
+   <dd><strong>State:</strong> Always false.
+
+   <dd><strong>Value:</strong> Always the string "<code
+    title="">false</code>".
+
    <dt>If the <var title="">commandId</var> is <dfn id=formatblock
     title=command-formatBlock><code>formatBlock</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd>
     <p><strong>Action:</strong> This command changes the semantics of the
      blocks containing the selection.</p>
@@ -35898,8 +35926,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=delete
     title=command-delete><code>delete</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     performed <a href="#contenteditable-delete">a backspace operation</a>.
 
@@ -35916,8 +35942,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=forwarddelete
     title=command-forwardDelete><code>forwardDelete</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     performed <a href="#contenteditable-delete">a forward delete
     operation</a>.
@@ -35935,8 +35959,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=insertlinebreak
     title=command-insertLineBreak><code>insertLineBreak</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had <a
     href="#contenteditable-br">requested a line separator</a>.
 
@@ -35953,8 +35975,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=insertparagraph
     title=command-insertParagraph><code>insertParagraph</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had
     performed a <a href="#contenteditable-breakBlock">break block</a> editing
     action.
@@ -35972,8 +35992,6 @@
    <dt>If the <var title="">commandId</var> is <dfn id=inserttext
     title=command-insertText><code>insertText</code></dfn>
 
-   <dd><a href="#editing2">Editing hosts only.</a>
-
    <dd><strong>Action:</strong> The user agent must act as if the user had <a
     href="#contenteditable-insertText">inserted text</a> corresponding to the
     <var title="">value</var> parameter.

Modified: source
===================================================================
--- source	2008-03-08 07:41:48 UTC (rev 1365)
+++ source	2008-03-08 08:37:26 UTC (rev 1366)
@@ -33046,19 +33046,14 @@
   title="">value</var> parameters, even if specified, are ignored
   unless otherwise stated.</p>
 
-  <p class="note">In this specification, in fact, the <var
-  title="">doShowUI</var> parameter is always ignored, regardless of
-  its value. It is included for historical reasons only.</p>
-
   <p>When <code title="dom-document-execCommand">execCommand()</code>
   is invoked, the user agent must follow the following steps:</p>
 
   <ol>
 
-   <li>If the given <var title="">commandId</var> maps to an entry
-   below that is marked as "<dfn>editing hosts only</dfn>", and the
-   document is not <span>ready for editing host commands</span>, do
-   nothing; abort these steps.</li>
+   <li>If the given <var title="">commandId</var> maps to an entry in
+   the list below whose "Enabled When" entry has a condition that is
+   currently false, do nothing; abort these steps.</li>
 
    <li>Otherwise, execute the "Action" listed below for the given <var
    title="">commandId</var>.</li>
@@ -33159,7 +33154,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-superscript"><code>superscript</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had requested that the selection <a
    href="#contenteditable-wrapSemantic">be wrapped in the
@@ -33178,7 +33172,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-subscript"><code>subscript</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had requested that the selection <a
    href="#contenteditable-wrapSemantic">be wrapped in the
@@ -33197,7 +33190,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-bold"><code>bold</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had requested that the selection <a
    href="#contenteditable-wrapSemantic">be wrapped in the
@@ -33216,7 +33208,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-italic"><code>italic</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had requested that the selection <a
    href="#contenteditable-wrapSemantic">be wrapped in the
@@ -33233,9 +33224,39 @@
    if the expression given for the "State" above is true, the string
    "<code title="">false</code>" otherwise.</dd>
 
+   <dt>If the <var title="">commandId</var> is <dfn title="command-createLink"><code>createLink</code></dfn></dt>
+
+   <dd><strong>Action:</strong> The user agent must act as if the user
+   had requested that the selection <a
+   href="#contenteditable-wrapSemantic">be wrapped in the
+   semantics</a> of the <em title=""><code>a</code></em> element (or,
+   again, unwrapped, or have that semantic inserted or removed, as
+   defined by the UA). If the user agent creates an <code>a</code>
+   element or modifies an existing <code>a</code> element, then if the
+   <var title="">doShowUI</var> argument is present and has the value
+   false, then the value of the <var title="">value</var> argument
+   must be used as the URI of the link. Otherwise, the user should be
+   prompted for the URI of the link.</dd>
+   <dd><strong>Enabled When:</strong> The document is <span>ready for
+   editing host commands</span>.</dd>
+   <dd><strong>Indeterminate When:</strong> Never.</dd>
+   <dd><strong>State:</strong> Always false.</dd>
+   <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
+
+   <dt>If the <var title="">commandId</var> is <dfn title="command-unlink"><code>unlink</code></dfn></dt>
+
+   <dd><strong>Action:</strong> The user agent must remove all
+   <code>a</code> elements that have <code
+   title="attr-a-href">href</code> attributes and that are partially
+   or completely included in the current selection.</dd>
+   <dd><strong>Enabled When:</strong> The document has a selection
+   that is entirely within an <span>editing host</span>.</dd>
+   <dd><strong>Indeterminate When:</strong> Never.</dd>
+   <dd><strong>State:</strong> Always false.</dd>
+   <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
+
    <dt>If the <var title="">commandId</var> is <dfn title="command-formatBlock"><code>formatBlock</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd>
 
     <p><strong>Action:</strong> This command changes the semantics of
@@ -33285,7 +33306,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-delete"><code>delete</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had performed <a href="#contenteditable-delete">a backspace
    operation</a>.</dd>
@@ -33297,7 +33317,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-forwardDelete"><code>forwardDelete</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had performed <a href="#contenteditable-delete">a forward delete
    operation</a>.</dd>
@@ -33309,7 +33328,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-insertLineBreak"><code>insertLineBreak</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had <a href="#contenteditable-br">requested a line
    separator</a>.</dd>
@@ -33321,7 +33339,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-insertParagraph"><code>insertParagraph</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had performed a <a href="#contenteditable-breakBlock">break
    block</a> editing action.</dd>
@@ -33333,7 +33350,6 @@
 
    <dt>If the <var title="">commandId</var> is <dfn title="command-insertText"><code>insertText</code></dfn></dt>
 
-   <dd><span>Editing hosts only.</span></dd>
    <dd><strong>Action:</strong> The user agent must act as if the user
    had <a href="#contenteditable-insertText">inserted text</a>
    corresponding to the <var title="">value</var> parameter.</dd>




More information about the Commit-Watchers mailing list