From 59385e8e90a74cd2a40fe180d0e204f627833931 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 26 Apr 2022 05:11:05 -0700 Subject: [PATCH] Expose private node management methods in UIManager (#33688) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33688 These methods used to be public in the legacy implementation, and hiding them significantly reduces amount of customization available to other clients outside Fabric core. Changelog: [Internal] Allow external callers to call UIManager methods Reviewed By: cipolleschi Differential Revision: D35818114 fbshipit-source-id: 4dc4177c82b5db9ae3d136a1a83f5ec3123b971f --- .../react/renderer/uimanager/UIManager.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/ReactCommon/react/renderer/uimanager/UIManager.h b/ReactCommon/react/renderer/uimanager/UIManager.h index 93cd8994c2c0d4..ab950a0c41435f 100644 --- a/ReactCommon/react/renderer/uimanager/UIManager.h +++ b/ReactCommon/react/renderer/uimanager/UIManager.h @@ -111,14 +111,6 @@ class UIManager final : public ShadowTreeDelegate { RootShadowNode::Shared const &oldRootShadowNode, RootShadowNode::Unshared const &newRootShadowNode) const override; - private: - friend class UIManagerBinding; - friend class Scheduler; - friend class SurfaceHandler; - - // `TimelineController` needs to call private `getShadowTreeRegistry()`. - friend class TimelineController; - ShadowNode::Shared createNode( Tag tag, std::string const &componentName, @@ -174,6 +166,13 @@ class UIManager final : public ShadowTreeDelegate { const ShadowNode::Shared &shadowNode, std::string const &eventType); + ShadowTreeRegistry const &getShadowTreeRegistry() const; + + private: + friend class UIManagerBinding; + friend class Scheduler; + friend class SurfaceHandler; + /** * Configure a LayoutAnimation to happen on the next commit. * This API configures a global LayoutAnimation starting from the root node. @@ -184,8 +183,6 @@ class UIManager final : public ShadowTreeDelegate { jsi::Value const &successCallback, jsi::Value const &failureCallback) const; - ShadowTreeRegistry const &getShadowTreeRegistry() const; - SharedComponentDescriptorRegistry componentDescriptorRegistry_; UIManagerDelegate *delegate_; UIManagerAnimationDelegate *animationDelegate_{nullptr};