From 862c71908c8bdbbddefed16ad03fa85c26eedfd1 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 2d7fe7690ec..23f1d76c068 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 86120239aee..91e18999b9e 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 03c2c9de276..40fe1374826 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 9dc016a3c7c..8f51e9aa715 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 43c1c91b6e0..804b26e06cd 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 734988e36d0..36b2763818c 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 82a5d55052d..4da9897aaf9 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 c04befdee38..d2bbb5bc0f7 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 228bb6bb019..f95a7ec8ab2 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 9f83a047a66..92a7ce06c26 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 d513d59ed3e..d67da3217e0 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 ae803fa22a4..9e1a68a9441 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(