[html5] r3891 - [] (0) Cleanup in Undo Manager section.

whatwg at whatwg.org whatwg at whatwg.org
Fri Sep 18 00:47:51 PDT 2009


Author: ianh
Date: 2009-09-18 00:47:50 -0700 (Fri, 18 Sep 2009)
New Revision: 3891

Modified:
   index
   source
Log:
[] (0) Cleanup in Undo Manager section.

Modified: index
===================================================================
--- index	2009-09-18 07:10:22 UTC (rev 3890)
+++ index	2009-09-18 07:47:50 UTC (rev 3891)
@@ -834,20 +834,19 @@
      <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>7.9.7 </span>Security risks in the drag-and-drop model</a></ol></li>
    <li><a href=#undo><span class=secno>7.10 </span>Undo history</a>
     <ol>
-     <li><a href=#introduction-5><span class=secno>7.10.1 </span>Introduction</a></li>
-     <li><a href=#definitions-2><span class=secno>7.10.2 </span>Definitions</a></li>
-     <li><a href=#the-undomanager-interface><span class=secno>7.10.3 </span>The <code>UndoManager</code> interface</a></li>
-     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>7.10.4 </span>Undo: moving back in the undo transaction history</a></li>
-     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>7.10.5 </span>Redo: moving forward in the undo transaction history</a></li>
-     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>7.10.6 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
-     <li><a href=#implementation-notes><span class=secno>7.10.7 </span>Implementation notes</a></ol></li>
+     <li><a href=#definitions-2><span class=secno>7.10.1 </span>Definitions</a></li>
+     <li><a href=#the-undomanager-interface><span class=secno>7.10.2 </span>The <code>UndoManager</code> interface</a></li>
+     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>7.10.3 </span>Undo: moving back in the undo transaction history</a></li>
+     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>7.10.4 </span>Redo: moving forward in the undo transaction history</a></li>
+     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>7.10.5 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
+     <li><a href=#implementation-notes><span class=secno>7.10.6 </span>Implementation notes</a></ol></li>
    <li><a href=#editing-apis><span class=secno>7.11 </span>Editing APIs</a></ol></li>
  <li><a href=#comms><span class=secno>8 </span>Communication</a>
   <ol>
    <li><a href=#event-definitions><span class=secno>8.1 </span>Event definitions</a></li>
    <li><a href=#crossDocumentMessages><span class=secno>8.2 </span>Cross-document messaging</a>
     <ol>
-     <li><a href=#introduction-6><span class=secno>8.2.1 </span>Introduction</a></li>
+     <li><a href=#introduction-5><span class=secno>8.2.1 </span>Introduction</a></li>
      <li><a href=#security-4><span class=secno>8.2.2 </span>Security</a>
       <ol>
        <li><a href=#authors><span class=secno>8.2.2.1 </span>Authors</a></li>
@@ -856,7 +855,7 @@
      <li><a href=#posting-messages-with-message-ports><span class=secno>8.2.4 </span>Posting messages with message ports</a></ol></li>
    <li><a href=#channel-messaging><span class=secno>8.3 </span>Channel messaging</a>
     <ol>
-     <li><a href=#introduction-7><span class=secno>8.3.1 </span>Introduction</a></li>
+     <li><a href=#introduction-6><span class=secno>8.3.1 </span>Introduction</a></li>
      <li><a href=#message-channels><span class=secno>8.3.2 </span>Message channels</a></li>
      <li><a href=#message-ports><span class=secno>8.3.3 </span>Message ports</a>
       <ol>
@@ -985,10 +984,10 @@
    <li><a href=#parsing-xhtml-fragments><span class=secno>10.4 </span>Parsing XHTML fragments</a></ol></li>
  <li><a href=#rendering><span class=secno>11 </span>Rendering</a>
   <ol>
-   <li><a href=#introduction-8><span class=secno>11.1 </span>Introduction</a></li>
+   <li><a href=#introduction-7><span class=secno>11.1 </span>Introduction</a></li>
    <li><a href=#the-css-user-agent-style-sheet-and-presentational-hints><span class=secno>11.2 </span>The CSS user agent style sheet and presentational hints</a>
     <ol>
-     <li><a href=#introduction-9><span class=secno>11.2.1 </span>Introduction</a></li>
+     <li><a href=#introduction-8><span class=secno>11.2.1 </span>Introduction</a></li>
      <li><a href=#display-types><span class=secno>11.2.2 </span>Display types</a></li>
      <li><a href=#margins-and-padding><span class=secno>11.2.3 </span>Margins and padding</a></li>
      <li><a href=#alignment><span class=secno>11.2.4 </span>Alignment</a></li>
@@ -1006,7 +1005,7 @@
      <li><a href=#tool-bars-0><span class=secno>11.3.5 </span>Tool bars</a></ol></li>
    <li><a href=#bindings><span class=secno>11.4 </span>Bindings</a>
     <ol>
-     <li><a href=#introduction-10><span class=secno>11.4.1 </span>Introduction</a></li>
+     <li><a href=#introduction-9><span class=secno>11.4.1 </span>Introduction</a></li>
      <li><a href=#the-button-element-0><span class=secno>11.4.2 </span>The <code>button</code> element</a></li>
      <li><a href=#the-details-element-0><span class=secno>11.4.3 </span>The <code>details</code> element</a></li>
      <li><a href=#the-input-element-as-a-text-entry-widget><span class=secno>11.4.4 </span>The <code>input</code> element as a text entry widget</a></li>
@@ -59194,23 +59193,15 @@
 
   <h3 id=undo><span class=secno>7.10 </span><dfn>Undo history</dfn></h3>
 
-  <p class=XXX>There has got to be a better way of doing this, surely.</p>
-
-
-  <h4 id=introduction-5><span class=secno>7.10.1 </span>Introduction</h4>
-
-  <p class=XXX>...</p>
-
-
   <div class=impl>
 
-  <h4 id=definitions-2><span class=secno>7.10.2 </span>Definitions</h4>
+  <h4 id=definitions-2><span class=secno>7.10.1 </span>Definitions</h4>
 
   <p>The user agent must associate an <dfn id=undo-transaction-history>undo transaction
   history</dfn> with each <code><a href=#htmldocument>HTMLDocument</a></code> object.</p>
 
   <p>The <a href=#undo-transaction-history>undo transaction history</a> is a list of
-  entries. The entries are of two type: <a href=#dom-changes>DOM changes</a> and
+  entries. The entries are of two types: <a href=#dom-changes>DOM changes</a> and
   <a href=#undo-object title="undo object">undo objects</a>.</p>
 
   <p>Each <dfn id=dom-changes>DOM changes</dfn> entry in the <a href=#undo-transaction-history>undo transaction
@@ -59220,14 +59211,13 @@
   <ul><li>Changes to the content attributes of an <code>Element</code>
    node.</li>
 
-   <li>Changes to the IDL attributes of a <code>Node</code>.</li> <!--
-   XXX uh, these change on their own, so clearly this isn't going to
-   fly. Which IDL attributes, exactly? -->
-
    <li>Changes to the DOM hierarchy of nodes that are descendants of
    the <code><a href=#htmldocument>HTMLDocument</a></code> object (<code>parentNode</code>,
    <code>childNodes</code>).</li>
 
+   <li>Changes to internal state, such as a form control's <a href=#concept-fe-value title=concept-fe-value>value</a> or <a href=#concept-input-checked-dirty-flag title=concept-input-checked-dirty-flag>dirty checkedness
+   flag</a>.</li>
+
   </ul><p><dfn id=undo-object>Undo object</dfn> entries consist of objects representing
   state that scripts running in the document are managing. For
   example, a Web mail application could use an <a href=#undo-object>undo
@@ -59245,34 +59235,8 @@
   </div>
 
 
-  <h4 id=the-undomanager-interface><span class=secno>7.10.3 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
+  <h4 id=the-undomanager-interface><span class=secno>7.10.2 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
 
-  <div class=impl>
-
-  <div class=XXX>
-
-   <p>This API sucks. Seriously. It's a terrible API. Really bad. I
-   hate it. Here are the requirements:</p>
-
-   <ul><li>Has to cope with cases where the server has undo state already
-    when the page is loaded, that can be stuffed into the undo buffer
-    onload.</li>
-
-    <li>Has to support undo/redo.</li>
-
-    <li>Has to cope with the "undo" action being "contact the server
-    and tell it to undo", rather than it being the opposite of the
-    "redo" action.</li>
-
-    <li>Has to cope with some undo states expiring from the undo
-    history (e.g. server can only remember one undelete action) but
-    other states not expiring (e.g. client can undo arbitrary amounts
-    of local edits).</li>
-
-   </ul></div>
-
-  </div>
-
   <p>To manage <a href=#undo-object>undo object</a> entries in the <a href=#undo-transaction-history>undo
   transaction history</a>, the <code><a href=#undomanager>UndoManager</a></code>
   interface can be used:</p>
@@ -59373,7 +59337,7 @@
   case there are no <span>supported indexed properties</span>.</p>
 
   <p>The <dfn id=dom-undomanager-item title=dom-UndoManager-item><code>item(<var title="">n</var>)</code></dfn> method must return the <var title="">n</var>th <a href=#undo-object>undo object</a> entry in the <a href=#undo-transaction-history>undo
-  transaction history</a>.</p> <!-- XXX out of range handling? -->
+  transaction history</a>, if there is one, or null otherwise.</p>
 
   <p>The <a href=#undo-transaction-history>undo transaction history</a> has a <dfn id=undo-position title="undo
   position">current position</dfn>. This is the position between two
@@ -59415,15 +59379,6 @@
   position</a> must be removed (as if <code title=dom-UndoManager-clearRedo><a href=#dom-undomanager-clearredo>clearRedo()</a></code> had been
   called).</p>
 
-  <p class=XXX>We could fire events when someone adds
-  something to the undo history -- one event per undo object entry
-  before the position (or after, during redo addition), allowing the
-  script to decide if that entry should remain or not. Or
-  something. Would make it potentially easier to expire server-held
-  state when the server limitations come into play.</p>
-
-  <!-- XXX note on expiring undo in case server can only do one level undo -->
-
   <p>The <dfn id=dom-undomanager-remove title=dom-UndoManager-remove><code>remove(<var title="">index</var>)</code></dfn> method must remove the <a href=#undo-object>undo
   object</a> entry with the specified <var title="">index</var>. If
   the index is less than zero or greater than or equal to <code title=dom-UndoManager-length><a href=#dom-undomanager-length>length</a></code> then the method must
@@ -59442,16 +59397,12 @@
   <a href=#dom-changes>DOM changes</a> entries or <a href=#undo-object>undo object</a>
   entries.</p>
 
-  <p class=XXX>Another idea is to have a way for scripts to
-  say "startBatchingDOMChangesForUndo()" and after that the changes to
-  the DOM go in as if the user had done them.</p>
-
   </div>
 
 
   <div class=impl>
 
-  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>7.10.4 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
+  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>7.10.3 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
 
   <p>When the user invokes an undo operation, or when the <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-undo><a href=#command-undo>undo</a></code> command, the
@@ -59488,7 +59439,7 @@
   command to undo his undo.</p>
 
 
-  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>7.10.5 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
+  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>7.10.4 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
 
   <p>When the user invokes a redo operation, or when the <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-redo><a href=#command-redo>redo</a></code> command, the
@@ -59525,7 +59476,7 @@
   </div>
 
 
-  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>7.10.6 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
+  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>7.10.5 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
 
   <pre class=idl>interface <dfn id=undomanagerevent>UndoManagerEvent</dfn> : Event {
   readonly attribute any <a href=#dom-undomanagerevent-data title=dom-UndoManagerEvent-data>data</a>;
@@ -59562,7 +59513,7 @@
 
   <div class=impl>
 
-  <h4 id=implementation-notes><span class=secno>7.10.7 </span>Implementation notes</h4>
+  <h4 id=implementation-notes><span class=secno>7.10.6 </span>Implementation notes</h4>
 
   <p>How user agents present the above conceptual model to the user is
   not defined. The undo interface could be a filtered view of the
@@ -60175,7 +60126,7 @@
   </div>
 
 
-  <h4 id=introduction-6><span class=secno>8.2.1 </span>Introduction</h4>
+  <h4 id=introduction-5><span class=secno>8.2.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -60481,7 +60432,7 @@
 
   <h3 id=channel-messaging><span class=secno>8.3 </span><dfn>Channel messaging</dfn></h3>
 
-  <h4 id=introduction-7><span class=secno>8.3.1 </span>Introduction</h4>
+  <h4 id=introduction-6><span class=secno>8.3.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -71116,7 +71067,7 @@
   lead to this experience.</i></p>
 
 
-  <h3 id=introduction-8><span class=secno>11.1 </span>Introduction</h3>
+  <h3 id=introduction-7><span class=secno>11.1 </span>Introduction</h3>
 
   <p>In general, user agents are expected to support CSS, and many of
   the suggestions in this section are expressed in CSS terms. User
@@ -71154,7 +71105,7 @@
 
   <h3 id=the-css-user-agent-style-sheet-and-presentational-hints><span class=secno>11.2 </span>The CSS user agent style sheet and presentational hints</h3>
 
-  <h4 id=introduction-9><span class=secno>11.2.1 </span>Introduction</h4>
+  <h4 id=introduction-8><span class=secno>11.2.1 </span>Introduction</h4>
 
   <p>The CSS rules given in these subsections are, unless otherwise
   specified, expected to be used as part of the user-agent level style
@@ -72326,7 +72277,7 @@
 
   <h3 id=bindings><span class=secno>11.4 </span>Bindings</h3>
 
-  <h4 id=introduction-10><span class=secno>11.4.1 </span>Introduction</h4>
+  <h4 id=introduction-9><span class=secno>11.4.1 </span>Introduction</h4>
 
   <p>A number of elements have their rendering defined in terms of the
   'binding' property. <a href=#refsBECSS>[BECSS]</a></p>

Modified: source
===================================================================
--- source	2009-09-18 07:10:22 UTC (rev 3890)
+++ source	2009-09-18 07:47:50 UTC (rev 3891)
@@ -69050,14 +69050,6 @@
 
   <h3 id="undo"><dfn>Undo history</dfn></h3>
 
-  <p class="XXX">There has got to be a better way of doing this, surely.</p>
-
-
-  <h4>Introduction</h4>
-
-  <p class="XXX">...</p>
-
-
   <div class="impl">
 
   <h4>Definitions</h4>
@@ -69066,7 +69058,7 @@
   history</dfn> with each <code>HTMLDocument</code> object.</p>
 
   <p>The <span>undo transaction history</span> is a list of
-  entries. The entries are of two type: <span>DOM changes</span> and
+  entries. The entries are of two types: <span>DOM changes</span> and
   <span title="undo object">undo objects</span>.</p>
 
   <p>Each <dfn>DOM changes</dfn> entry in the <span>undo transaction
@@ -69078,14 +69070,15 @@
    <li>Changes to the content attributes of an <code>Element</code>
    node.</li>
 
-   <li>Changes to the IDL attributes of a <code>Node</code>.</li> <!--
-   XXX uh, these change on their own, so clearly this isn't going to
-   fly. Which IDL attributes, exactly? -->
-
    <li>Changes to the DOM hierarchy of nodes that are descendants of
    the <code>HTMLDocument</code> object (<code>parentNode</code>,
    <code>childNodes</code>).</li>
 
+   <li>Changes to internal state, such as a form control's <span
+   title="concept-fe-value">value</span> or <span
+   title="concept-input-checked-dirty-flag">dirty checkedness
+   flag</span>.</li>
+
   </ul>
 
   <p><dfn>Undo object</dfn> entries consist of objects representing
@@ -69107,36 +69100,6 @@
 
   <h4>The <code>UndoManager</code> interface</h4>
 
-  <div class="impl">
-
-  <div class="XXX">
-
-   <p>This API sucks. Seriously. It's a terrible API. Really bad. I
-   hate it. Here are the requirements:</p>
-
-   <ul>
-
-    <li>Has to cope with cases where the server has undo state already
-    when the page is loaded, that can be stuffed into the undo buffer
-    onload.</li>
-
-    <li>Has to support undo/redo.</li>
-
-    <li>Has to cope with the "undo" action being "contact the server
-    and tell it to undo", rather than it being the opposite of the
-    "redo" action.</li>
-
-    <li>Has to cope with some undo states expiring from the undo
-    history (e.g. server can only remember one undelete action) but
-    other states not expiring (e.g. client can undo arbitrary amounts
-    of local edits).</li>
-
-   </ul>
-
-  </div>
-
-  </div>
-
   <p>To manage <span>undo object</span> entries in the <span>undo
   transaction history</span>, the <code>UndoManager</code>
   interface can be used:</p>
@@ -69245,7 +69208,7 @@
   <p>The <dfn title="dom-UndoManager-item"><code>item(<var
   title="">n</var>)</code></dfn> method must return the <var
   title="">n</var>th <span>undo object</span> entry in the <span>undo
-  transaction history</span>.</p> <!-- XXX out of range handling? -->
+  transaction history</span>, if there is one, or null otherwise.</p>
 
   <p>The <span>undo transaction history</span> has a <dfn title="undo
   position">current position</dfn>. This is the position between two
@@ -69295,15 +69258,6 @@
   title="dom-UndoManager-clearRedo">clearRedo()</code> had been
   called).</p>
 
-  <p class="XXX">We could fire events when someone adds
-  something to the undo history -- one event per undo object entry
-  before the position (or after, during redo addition), allowing the
-  script to decide if that entry should remain or not. Or
-  something. Would make it potentially easier to expire server-held
-  state when the server limitations come into play.</p>
-
-  <!-- XXX note on expiring undo in case server can only do one level undo -->
-
   <p>The <dfn title="dom-UndoManager-remove"><code>remove(<var
   title="">index</var>)</code></dfn> method must remove the <span>undo
   object</span> entry with the specified <var title="">index</var>. If
@@ -69326,10 +69280,6 @@
   <span>DOM changes</span> entries or <span>undo object</span>
   entries.</p>
 
-  <p class="XXX">Another idea is to have a way for scripts to
-  say "startBatchingDOMChangesForUndo()" and after that the changes to
-  the DOM go in as if the user had done them.</p>
-
   </div>
 
 




More information about the Commit-Watchers mailing list