From d8df9c9024ad4a09309c12fc9016eb4dd4fc4ceb Mon Sep 17 00:00:00 2001 From: Eli White Date: Wed, 19 Feb 2020 15:26:09 -0800 Subject: [PATCH] Partial React Sync from 241c4467...ad84625f8 Summary: Test sync of https://github.com/facebook/react/pull/18068 - **[ad84625f8](https://github.com/facebook/react/commit/ad84625f8 )**: [Native] Migrate focus/blur to call TextInputState with the host component (#18068) //// - **[edab5c074](https://github.com/facebook/react/commit/edab5c074 )**: Re-throw errors thrown by the renderer at the root in the complete phase (#18029) //// - **[a6dfe9aa4](https://github.com/facebook/react/commit/a6dfe9aa4 )**: [Native] Delete NativeComponent and NativeMethodsMixin (#18036) //// Changelog: [Changed][General] Partial React Sync from 241c4467...ad84625f8 Reviewed By: mdvacca Differential Revision: D19459322 fbshipit-source-id: daefcf854e3da1c849f8376671065c53a1319ef9 --- Libraries/Renderer/implementations/ReactFabric-dev.fb.js | 6 ++---- Libraries/Renderer/implementations/ReactFabric-dev.js | 6 ++---- Libraries/Renderer/implementations/ReactFabric-prod.fb.js | 4 ++-- Libraries/Renderer/implementations/ReactFabric-prod.js | 4 ++-- .../Renderer/implementations/ReactFabric-profiling.fb.js | 4 ++-- Libraries/Renderer/implementations/ReactFabric-profiling.js | 4 ++-- .../Renderer/implementations/ReactNativeRenderer-dev.fb.js | 6 ++---- .../Renderer/implementations/ReactNativeRenderer-dev.js | 6 ++---- .../Renderer/implementations/ReactNativeRenderer-prod.fb.js | 4 ++-- .../Renderer/implementations/ReactNativeRenderer-prod.js | 4 ++-- .../implementations/ReactNativeRenderer-profiling.fb.js | 4 ++-- .../implementations/ReactNativeRenderer-profiling.js | 4 ++-- 12 files changed, 24 insertions(+), 32 deletions(-) diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 2d7fe7690ec3ef..23f1d76c068131 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -3963,13 +3963,11 @@ var ReactFabricHostComponent = var _proto = ReactFabricHostComponent.prototype; _proto.blur = function blur() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function focus() { - ReactNativePrivateInterface.TextInputState.focusTextInput( - this._nativeTag - ); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function measure(callback) { diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.js b/Libraries/Renderer/implementations/ReactFabric-dev.js index 86120239aee619..91e18999b9e7b8 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.js @@ -3961,13 +3961,11 @@ var ReactFabricHostComponent = var _proto = ReactFabricHostComponent.prototype; _proto.blur = function blur() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function focus() { - ReactNativePrivateInterface.TextInputState.focusTextInput( - this._nativeTag - ); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function measure(callback) { diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 03c2c9de276a80..40fe137482624c 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -1540,10 +1540,10 @@ var ReactFabricHostComponent = (function() { } var _proto = ReactFabricHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { fabricMeasure( diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.js b/Libraries/Renderer/implementations/ReactFabric-prod.js index 9dc016a3c7cf01..8f51e9aa715fc4 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.js @@ -1531,10 +1531,10 @@ var ReactFabricHostComponent = (function() { } var _proto = ReactFabricHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { fabricMeasure( diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 43c1c91b6e0d48..804b26e06cd2f8 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -1541,10 +1541,10 @@ var ReactFabricHostComponent = (function() { } var _proto = ReactFabricHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { fabricMeasure( diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.js b/Libraries/Renderer/implementations/ReactFabric-profiling.js index 734988e36d07bf..36b2763818cfa9 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.js @@ -1532,10 +1532,10 @@ var ReactFabricHostComponent = (function() { } var _proto = ReactFabricHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { fabricMeasure( diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 82a5d55052d553..4da9897aaf9195 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -4047,13 +4047,11 @@ var ReactNativeFiberHostComponent = var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function blur() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function focus() { - ReactNativePrivateInterface.TextInputState.focusTextInput( - this._nativeTag - ); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function measure(callback) { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js index c04befdee381ea..d2bbb5bc0f7fae 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js @@ -4045,13 +4045,11 @@ var ReactNativeFiberHostComponent = var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function blur() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function focus() { - ReactNativePrivateInterface.TextInputState.focusTextInput( - this._nativeTag - ); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function measure(callback) { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 228bb6bb019453..f95a7ec8ab2842 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -1554,10 +1554,10 @@ var ReactNativeFiberHostComponent = (function() { } var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { ReactNativePrivateInterface.UIManager.measure( diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js index 9f83a047a666f6..92a7ce06c26a57 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js @@ -1544,10 +1544,10 @@ var ReactNativeFiberHostComponent = (function() { } var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { ReactNativePrivateInterface.UIManager.measure( diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index d513d59ed3e2c1..d67da3217e07a1 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -1555,10 +1555,10 @@ var ReactNativeFiberHostComponent = (function() { } var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { ReactNativePrivateInterface.UIManager.measure( diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js index ae803fa22a45a6..9e1a68a944128f 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js @@ -1545,10 +1545,10 @@ var ReactNativeFiberHostComponent = (function() { } var _proto = ReactNativeFiberHostComponent.prototype; _proto.blur = function() { - ReactNativePrivateInterface.TextInputState.blurTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.blurTextInput(this); }; _proto.focus = function() { - ReactNativePrivateInterface.TextInputState.focusTextInput(this._nativeTag); + ReactNativePrivateInterface.TextInputState.focusTextInput(this); }; _proto.measure = function(callback) { ReactNativePrivateInterface.UIManager.measure(