diff --git a/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h b/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h index e8175c098dd..616770cf686 100644 --- a/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h +++ b/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h @@ -84,7 +84,7 @@ class ConcreteViewShadowNode : public ConcreteShadowNode< } }; - void appendChild(const SharedShadowNode &child) { + void appendChild(const ShadowNode::Shared &child) { ensureUnsealed(); ShadowNode::appendChild(child); diff --git a/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h b/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h index 20e23f43ad5..943afb05185 100644 --- a/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h +++ b/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h @@ -90,8 +90,8 @@ class ComponentDescriptor { * Appends (by mutating) a given `childShadowNode` to `parentShadowNode`. */ virtual void appendChild( - const SharedShadowNode &parentShadowNode, - const SharedShadowNode &childShadowNode) const = 0; + const ShadowNode::Shared &parentShadowNode, + const ShadowNode::Shared &childShadowNode) const = 0; /* * Creates a new `Props` of a particular type with all values copied from diff --git a/ReactCommon/fabric/core/componentdescriptor/ConcreteComponentDescriptor.h b/ReactCommon/fabric/core/componentdescriptor/ConcreteComponentDescriptor.h index 2b6003e887b..04a07efe4a4 100644 --- a/ReactCommon/fabric/core/componentdescriptor/ConcreteComponentDescriptor.h +++ b/ReactCommon/fabric/core/componentdescriptor/ConcreteComponentDescriptor.h @@ -88,8 +88,8 @@ class ConcreteComponentDescriptor : public ComponentDescriptor { } void appendChild( - const SharedShadowNode &parentShadowNode, - const SharedShadowNode &childShadowNode) const override { + const ShadowNode::Shared &parentShadowNode, + const ShadowNode::Shared &childShadowNode) const override { assert( dynamic_cast(parentShadowNode.get()) && "Provided `parentShadowNode` has an incompatible type."); diff --git a/ReactCommon/fabric/core/shadownode/ShadowNode.cpp b/ReactCommon/fabric/core/shadownode/ShadowNode.cpp index 5ac8064798b..581c8de8596 100644 --- a/ReactCommon/fabric/core/shadownode/ShadowNode.cpp +++ b/ReactCommon/fabric/core/shadownode/ShadowNode.cpp @@ -156,7 +156,7 @@ void ShadowNode::sealRecursive() const { #pragma mark - Mutating Methods -void ShadowNode::appendChild(const SharedShadowNode &child) { +void ShadowNode::appendChild(const ShadowNode::Shared &child) { ensureUnsealed(); cloneChildrenIfShared(); diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h b/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h index fd668fbc0c4..26ff94ea170 100644 --- a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h +++ b/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h @@ -51,7 +51,7 @@ class ComponentDescriptorRegistry { ComponentDescriptor const &at(std::string const &componentName) const; ComponentDescriptor const &at(ComponentHandle componentHandle) const; - SharedShadowNode createNode( + ShadowNode::Shared createNode( Tag tag, std::string const &viewName, SurfaceId surfaceId, diff --git a/ReactCommon/fabric/uimanager/Scheduler.cpp b/ReactCommon/fabric/uimanager/Scheduler.cpp index da7c197fcf3..2033b176b11 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.cpp +++ b/ReactCommon/fabric/uimanager/Scheduler.cpp @@ -285,7 +285,7 @@ void Scheduler::uiManagerDidFinishTransaction( } void Scheduler::uiManagerDidCreateShadowNode( - const SharedShadowNode &shadowNode) { + const ShadowNode::Shared &shadowNode) { SystraceSection s("Scheduler::uiManagerDidCreateShadowNode"); if (delegate_) { @@ -296,7 +296,7 @@ void Scheduler::uiManagerDidCreateShadowNode( } void Scheduler::uiManagerDidDispatchCommand( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) { SystraceSection s("Scheduler::uiManagerDispatchCommand"); @@ -312,7 +312,7 @@ void Scheduler::uiManagerDidDispatchCommand( */ void Scheduler::uiManagerDidSetJSResponder( SurfaceId surfaceId, - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, bool blockNativeResponder) { if (delegate_) { // TODO: the first shadowView paramenter, should be the first parent that diff --git a/ReactCommon/fabric/uimanager/Scheduler.h b/ReactCommon/fabric/uimanager/Scheduler.h index f637a4973bd..a10bc552b04 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.h +++ b/ReactCommon/fabric/uimanager/Scheduler.h @@ -90,14 +90,14 @@ class Scheduler final : public UIManagerDelegate { void uiManagerDidFinishTransaction( MountingCoordinator::Shared const &mountingCoordinator) override; void uiManagerDidCreateShadowNode( - const SharedShadowNode &shadowNode) override; + const ShadowNode::Shared &shadowNode) override; void uiManagerDidDispatchCommand( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) override; void uiManagerDidSetJSResponder( SurfaceId surfaceId, - const SharedShadowNode &shadowView, + const ShadowNode::Shared &shadowView, bool blockNativeResponder) override; void uiManagerDidClearJSResponder() override; diff --git a/ReactCommon/fabric/uimanager/UIManager.cpp b/ReactCommon/fabric/uimanager/UIManager.cpp index 08fb9ef10e4..0db6dd51894 100644 --- a/ReactCommon/fabric/uimanager/UIManager.cpp +++ b/ReactCommon/fabric/uimanager/UIManager.cpp @@ -75,7 +75,7 @@ SharedShadowNode UIManager::createNode( } SharedShadowNode UIManager::cloneNode( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, const SharedShadowNodeSharedList &children, const RawProps *rawProps) const { SystraceSection s("UIManager::cloneNode"); @@ -95,8 +95,8 @@ SharedShadowNode UIManager::cloneNode( } void UIManager::appendChild( - const SharedShadowNode &parentShadowNode, - const SharedShadowNode &childShadowNode) const { + const ShadowNode::Shared &parentShadowNode, + const ShadowNode::Shared &childShadowNode) const { SystraceSection s("UIManager::appendChild"); auto &componentDescriptor = parentShadowNode->getComponentDescriptor(); @@ -121,7 +121,7 @@ void UIManager::completeSurface( } void UIManager::setJSResponder( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, const bool blockNativeResponder) const { if (delegate_) { delegate_->uiManagerDidSetJSResponder( @@ -217,7 +217,7 @@ void UIManager::updateState( } void UIManager::dispatchCommand( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) const { if (delegate_) { diff --git a/ReactCommon/fabric/uimanager/UIManager.h b/ReactCommon/fabric/uimanager/UIManager.h index fab9152fcb8..1d250b85de0 100644 --- a/ReactCommon/fabric/uimanager/UIManager.h +++ b/ReactCommon/fabric/uimanager/UIManager.h @@ -59,21 +59,21 @@ class UIManager final : public ShadowTreeDelegate { friend class UIManagerBinding; friend class Scheduler; - SharedShadowNode createNode( + ShadowNode::Shared createNode( Tag tag, std::string const &componentName, SurfaceId surfaceId, const RawProps &props, SharedEventTarget eventTarget) const; - SharedShadowNode cloneNode( - const SharedShadowNode &shadowNode, + ShadowNode::Shared cloneNode( + const ShadowNode::Shared &shadowNode, const SharedShadowNodeSharedList &children = nullptr, const RawProps *rawProps = nullptr) const; void appendChild( - const SharedShadowNode &parentShadowNode, - const SharedShadowNode &childShadowNode) const; + const ShadowNode::Shared &parentShadowNode, + const ShadowNode::Shared &childShadowNode) const; void completeSurface( SurfaceId surfaceId, @@ -83,7 +83,7 @@ class UIManager final : public ShadowTreeDelegate { const; void setJSResponder( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, const bool blockNativeResponder) const; void clearJSResponder() const; @@ -111,7 +111,7 @@ class UIManager final : public ShadowTreeDelegate { StateData::Shared const &rawStateData) const; void dispatchCommand( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) const; diff --git a/ReactCommon/fabric/uimanager/UIManagerDelegate.h b/ReactCommon/fabric/uimanager/UIManagerDelegate.h index b0e0233e598..99fc0f41354 100644 --- a/ReactCommon/fabric/uimanager/UIManagerDelegate.h +++ b/ReactCommon/fabric/uimanager/UIManagerDelegate.h @@ -32,13 +32,13 @@ class UIManagerDelegate { * instances. */ virtual void uiManagerDidCreateShadowNode( - const SharedShadowNode &shadowNode) = 0; + const ShadowNode::Shared &shadowNode) = 0; /* * Called when UIManager wants to dispatch a command to the mounting layer. */ virtual void uiManagerDidDispatchCommand( - const SharedShadowNode &shadowNode, + const ShadowNode::Shared &shadowNode, std::string const &commandName, folly::dynamic const args) = 0; @@ -47,7 +47,7 @@ class UIManagerDelegate { */ virtual void uiManagerDidSetJSResponder( SurfaceId surfaceId, - SharedShadowNode const &shadowView, + ShadowNode::Shared const &shadowView, bool blockNativeResponder) = 0; /* diff --git a/ReactCommon/fabric/uimanager/UITemplateProcessor.h b/ReactCommon/fabric/uimanager/UITemplateProcessor.h index 9c49c4d3394..dff902334b7 100644 --- a/ReactCommon/fabric/uimanager/UITemplateProcessor.h +++ b/ReactCommon/fabric/uimanager/UITemplateProcessor.h @@ -44,7 +44,7 @@ class NativeModuleRegistry { class UITemplateProcessor { public: - static SharedShadowNode buildShadowTree( + static ShadowNode::Shared buildShadowTree( const std::string &jsonStr, int rootTag, const folly::dynamic ¶ms, @@ -53,7 +53,7 @@ class UITemplateProcessor { const std::shared_ptr reactNativeConfig); private: - static SharedShadowNode runCommand( + static ShadowNode::Shared runCommand( const folly::dynamic &command, Tag rootTag, std::vector &nodes, diff --git a/ReactCommon/fabric/uimanager/primitives.h b/ReactCommon/fabric/uimanager/primitives.h index 3600e8b8f08..f02e8b7ffd6 100644 --- a/ReactCommon/fabric/uimanager/primitives.h +++ b/ReactCommon/fabric/uimanager/primitives.h @@ -27,7 +27,7 @@ struct ShadowNodeWrapper : public jsi::HostObject { ShadowNodeWrapper(SharedShadowNode shadowNode) : shadowNode(std::move(shadowNode)) {} - SharedShadowNode shadowNode; + ShadowNode::Shared shadowNode; }; struct ShadowNodeListWrapper : public jsi::HostObject { @@ -37,7 +37,7 @@ struct ShadowNodeListWrapper : public jsi::HostObject { SharedShadowNodeUnsharedList shadowNodeList; }; -inline static SharedShadowNode shadowNodeFromValue( +inline static ShadowNode::Shared shadowNodeFromValue( jsi::Runtime &runtime, const jsi::Value &value) { return value.getObject(runtime) @@ -47,7 +47,7 @@ inline static SharedShadowNode shadowNodeFromValue( inline static jsi::Value valueFromShadowNode( jsi::Runtime &runtime, - const SharedShadowNode &shadowNode) { + const ShadowNode::Shared &shadowNode) { return jsi::Object::createFromHostObject( runtime, std::make_shared(shadowNode)); }