diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
commit | 9df98e65f842cf3acae09cbdd969966f42d64469 (patch) | |
tree | f071d3e09a342c208fb8e1cd3f5241d64fbfbaf3 /node_modules/react-dom/lib/ReactTestReconcileTransaction.js | |
parent | 008926b18470e7f394cd640302957b29728a9803 (diff) |
update dependencies
Diffstat (limited to 'node_modules/react-dom/lib/ReactTestReconcileTransaction.js')
-rw-r--r-- | node_modules/react-dom/lib/ReactTestReconcileTransaction.js | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/node_modules/react-dom/lib/ReactTestReconcileTransaction.js b/node_modules/react-dom/lib/ReactTestReconcileTransaction.js deleted file mode 100644 index ecc1818d1..000000000 --- a/node_modules/react-dom/lib/ReactTestReconcileTransaction.js +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ -'use strict'; - -var _assign = require('object-assign'); - -var CallbackQueue = require('./CallbackQueue'); -var PooledClass = require('./PooledClass'); -var Transaction = require('./Transaction'); -var ReactUpdateQueue = require('./ReactUpdateQueue'); - -/** - * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks during - * the performing of the transaction. - */ -var ON_DOM_READY_QUEUEING = { - /** - * Initializes the internal `onDOMReady` queue. - */ - initialize: function () { - this.reactMountReady.reset(); - }, - - /** - * After DOM is flushed, invoke all registered `onDOMReady` callbacks. - */ - close: function () { - this.reactMountReady.notifyAll(); - } -}; - -/** - * Executed within the scope of the `Transaction` instance. Consider these as - * being member methods, but with an implied ordering while being isolated from - * each other. - */ -var TRANSACTION_WRAPPERS = [ON_DOM_READY_QUEUEING]; - -/** - * Currently: - * - The order that these are listed in the transaction is critical: - * - Suppresses events. - * - Restores selection range. - * - * Future: - * - Restore document/overflow scroll positions that were unintentionally - * modified via DOM insertions above the top viewport boundary. - * - Implement/integrate with customized constraint based layout system and keep - * track of which dimensions must be remeasured. - * - * @class ReactTestReconcileTransaction - */ -function ReactTestReconcileTransaction(testOptions) { - this.reinitializeTransaction(); - this.testOptions = testOptions; - this.reactMountReady = CallbackQueue.getPooled(this); -} - -var Mixin = { - /** - * @see Transaction - * @abstract - * @final - * @return {array<object>} List of operation wrap procedures. - * TODO: convert to array<TransactionWrapper> - */ - getTransactionWrappers: function () { - return TRANSACTION_WRAPPERS; - }, - - /** - * @return {object} The queue to collect `onDOMReady` callbacks with. - * TODO: convert to ReactMountReady - */ - getReactMountReady: function () { - return this.reactMountReady; - }, - - /** - * @return {object} the options passed to ReactTestRenderer - */ - getTestOptions: function () { - return this.testOptions; - }, - - /** - * @return {object} The queue to collect React async events. - */ - getUpdateQueue: function () { - return ReactUpdateQueue; - }, - - /** - * Save current transaction state -- if the return value from this method is - * passed to `rollback`, the transaction will be reset to that state. - */ - checkpoint: function () { - // reactMountReady is the our only stateful wrapper - return this.reactMountReady.checkpoint(); - }, - - rollback: function (checkpoint) { - this.reactMountReady.rollback(checkpoint); - }, - - /** - * `PooledClass` looks for this, and will invoke this before allowing this - * instance to be reused. - */ - destructor: function () { - CallbackQueue.release(this.reactMountReady); - this.reactMountReady = null; - } -}; - -_assign(ReactTestReconcileTransaction.prototype, Transaction, ReactTestReconcileTransaction, Mixin); - -PooledClass.addPoolingTo(ReactTestReconcileTransaction); - -module.exports = ReactTestReconcileTransaction;
\ No newline at end of file |