Permalink
Browse files

Get rid of isReapply from apply() per http://lists.whatwg.org/piperma…

…il/whatwg-whatwg.org/2011-November/033990.html. Also rename apply, unapply, and reapply to execute, undo, and redo.
  • Loading branch information...
rniwa committed Nov 30, 2011
1 parent ec79412 commit 4994182990d71bd767984e23409ef39084fec7aa
Showing with 41 additions and 49 deletions.
  1. +20 −24 source.html
  2. +21 −25 undomanager.html
View
@@ -367,7 +367,7 @@ <h3>Redo: moving backward in the undo transaction history</h3>
the redo command, the user agent must perform an <dfn>redo</dfn> operation on <a href="#the-active-undo-manager">the active undo manager</a> by calling
the <code><a href="#dom-undomanager-redo">redo</a>()</code> method.</p>
-<h2>Transaction and DOM changes</h2>
+<h2>DOM Transaction and DOM changes</h2>
<p>A <dfn>DOM transaction</dfn> is an ordered set of <a href="#dom-changes">DOM changes</a> associated with
a unique <a href="#undo-scope-host">undo scope host</a> that can be <a href="#dom-transaction-apply">applied</a>, <a href="#dom-transaction-unapply">unapplied</a>,
@@ -478,9 +478,9 @@ <h3>The <code><a href="#dom-domtransaction">DOMTransaction</a></code> interface<
<pre class="idl">[NoInterfaceObject]
interface <dfn id="dom-domtransaction">DOMTransaction</dfn> {
attribute DOMString <a href="#dom-domtransaction-label">label</a>;
- attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-transaction-apply">apply</a>(in boolean isReapply);
- attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-transaction-unapply">unapply</a>;
- attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-transaction-reapply">reapply</a>;
+ attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-domtransaction-execute">execute</a>;
+ attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-domtransaction-undo">undo</a>;
+ attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#function">Function</a>? <a href="#dom-domtransaction-redo">redo</a>;
attribute boolean <a href="#dom-transaction-reapply">isAutomatic</a>;
};</pre>
@@ -490,13 +490,13 @@ <h3>The <code><a href="#dom-domtransaction">DOMTransaction</a></code> interface<
<p><dfn id="dom-domtransaction-label"><code>label</code></dfn> attribute must return <code>null</code> or a string that describes the semantics of the transaction such as
"Inserting text" or "Deleting selection". The user agent may expose this string or a part of this string through its native UI such as menu bar or context menu.</p>
- <p><dfn id="dom-domtransaction-apply"><code>apply</code></dfn>, <dfn id="dom-domtransaction-unapply"><code>unapply</code></dfn>, and
- <dfn id="dom-domtransaction-reapply"><code>reapply</code></dfn> are attributes that must be supported, as IDL attributes, by objects implementing
- the <code><a href="#dom-transaction">Transaction</a></code> interface.</p>
+ <p><dfn id="dom-domtransaction-execute"><code>execute()</code></dfn>, <dfn id="dom-domtransaction-undo"><code>undo()</code></dfn>, and
+ <dfn id="dom-domtransaction-redo"><code>redo()</code></dfn> are attributes that must be supported, as IDL attributes, by objects implementing
+ the <code><a href="#dom-domtransaction">DOMTransaction</a></code> interface.</p>
- <p class="note">Any changes made to the value of <code><a href="#dom-domtransaction-apply">apply</a></code>, <code><a href="#dom-domtransaction-unapply">unapply</a></code>,
- or <code><a href="#dom-domtransaction-reapply">reapply</a></code> attributes will take effect immediately. In the following example, <code><a href="#dom-domtransaction-apply">apply</a></code>
- and <code><a href="#dom-domtransaction-unapply">unapply</a></code> attributes are modified:</p>
+ <p class="note">Any changes made to the value of <code><a href="#dom-domtransaction-execute">execute</a></code>, <code><a href="#dom-domtransaction-undo">undo</a></code>,
+ or <code><a href="#dom-domtransaction-redo">redo</a></code> attributes will take effect immediately. In the following example, <code><a href="#dom-domtransaction-execute">execute</a></code>
+ and <code><a href="#dom-domtransaction-undo">undo</a></code> attributes are modified:</p>
<pre class="example">
document.undoManager.transact({ apply: function () {
this.apply = function () { alert('foo'); }
@@ -519,21 +519,19 @@ <h3>Automatic DOM transactions</h3>
the transaction is implicitly created by the user agent. </p>
<div class="impl">
- <p>When an <a href="#automatic-dom-transaction">automatic DOM transaction</a> is <a href="#dom-transaction-apply">applied</a>, the function returned by the <code><a id="dom-transaction-apply">apply</a></code> attribute
- is called with <code>isReapply</code> set to <code>false</code> if the attribute returns a valid function object.
+ <p>When an <a href="#automatic-dom-transaction">automatic DOM transaction</a> is <a href="#dom-transaction-apply">applied</a>,
+ the user agent must call the function returned by the <code><a id="dom-domtransaction-execute">execute</a></code> attribute if the attribute returns a valid function object.
All <a href="#dom-changes">DOM changes</a> made by the method in the corresponding <a href="#undo-scope">undo scope</a> of the <code><a href="#undomanager">UndoManager<a></code>
must be tracked by the user agent.</p>
<p>When an <a href="#automatic-dom-transaction">automatic DOM transaction</a> is <a href="#dom-transaction-unapply">unapplied</a>,
the user agent must <a href="#revert-dom-changes">revert DOM changes</a> made inside the <a href="#undo-scope">undo scope</a> of the the <code><a href="#undomanager">UndoManager<a></code>
- while <a href="#dom-transaction-apply">applying</a> the transation, and call the function returned by the <code><a id="dom-transaction-unapply">unapply</a></code> attribute if the attribute returns a valid function object.</p>
+ while <a href="#dom-transaction-apply">applying</a> the transation, and call the function returned by the <code><a id="dom-domtransaction-undo">undo</a></code> attribute if the attribute returns a valid function object.</p>
<p>When an <a href="#automatic-dom-transaction">automatic DOM transaction</a> is <a href="#dom-transaction-reapply">reapplied</a>,
the user agent must <a href="#revert-dom-changes">revert DOM changes</a> made inside the <a href="#undo-scope">undo scope</a> of the the <code><a href="#undomanager">UndoManager<a></code>
while <a href="#dom-transaction-unapply">unapplying</a> the transation.
- The user agent must then call the function returned by the <code><a id="dom-transaction-reapply">reapply</a></code> attribute if the attribute returns a valid function object.
- If the <code><a id="dom-transaction-reapply">reapply</a></code> attribute returned null or undefined, then the function returned by <code><a id="dom-transaction-apply">apply</a></code> attribute must be called
- with <code>isReapply</code> set to <code>true</code> instead if the attribute returns a valid function object.</p>
+ The user agent must then call the function returned by the <code><a id="dom-domtransaction-redo">redo</a></code> attribute if the attribute returns a valid function object.</p>
<p>The user agent must implement <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#user-editing-actions">user editing actions</a> and
<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dnd">drag and drop</a>
@@ -550,16 +548,14 @@ <h3>Manual DOM transactions</h3>
It provides a way to communicate with user agent's <a href="#undo-transaction-history">undo transaction history</a>, e.g. to populate user agent's undo menu.</p>
<div class="impl">
- <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-apply">applied</a>, the function returned by the <code><a id="dom-transaction-apply">apply</a></code> attribute is
- invoked with <code>isReapply</code> set to <code>false</code> if the attribute returns a valid function object.</p>
+ <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-apply">applied</a>, the user agnet must call
+ the function returned by the <code><a id="dom-domtransaction-execute">execute</a></code> if the attribute returns a valid function object.</p>
- <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-unapply">unapplied</a>, the function returned by the <code><a id="dom-transaction-unapply">unapply</a></code> attribute
- is invoked if the attribute returns a valid function object.</p>
+ <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-unapply">unapplied</a>, the user agnet must call
+ the function returned by the <code><a id="dom-domtransaction-undo">undo</a></code> attribute if the attribute returns a valid function object.</p>
- <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-reapply">reapplied</a>, the function returned by the <code><a id="dom-transaction-reapply">reapply</a></code> attribute
- is invoked if the attribute returns a valid function object. If the <code><a id="dom-transaction-reapply">reapply</a></code> attribute returned null or undefined,
- then the function returned by <code><a id="dom-transaction-apply">apply</a></code> attribute is invoked with <code>isReapply</code> set to <code>true</code> instead
- if the attribute returns a valid function object.</p>
+ <p>When a <a href="#manual-dom-transaction">manual DOM transaction</a> is <a href="#dom-transaction-reapply">reapplied</a>, the user agnet must call
+ the function returned by the <code><a id="dom-domtransaction-redo">redo</a></code> attribute if the attribute returns a valid function object.</p>
</div>
<p class="note">Manual DOM transactions may be incompatible with automatic DOM transactions, in particular,
Oops, something went wrong.

0 comments on commit 4994182

Please sign in to comment.