diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp index bdd301f5c3d5..9920a83cca5f 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -463,7 +462,8 @@ CommitStatus ShadowTree::tryCommit( } } - emitLayoutEvents(affectedLayoutableNodes); + delegate_.shadowTreeDidCommit( + *this, newRevision.rootShadowNode, affectedLayoutableNodes); if (isReactBranch) { scheduleReactRevisionPromotion(); @@ -634,25 +634,6 @@ void ShadowTree::commitEmptyTree() const { {/* default commit options */}); } -void ShadowTree::emitLayoutEvents( - std::vector& affectedLayoutableNodes) const { - TraceSection s( - "ShadowTree::emitLayoutEvents", - "affectedLayoutableNodes", - affectedLayoutableNodes.size()); - - for (const auto* layoutableNode : affectedLayoutableNodes) { - if (auto viewProps = - dynamic_cast(layoutableNode->getProps().get())) { - if (viewProps->onLayout) { - static_cast( - *layoutableNode->getEventEmitter()) - .onLayout(layoutableNode->getLayoutMetrics()); - } - } - } -} - void ShadowTree::notifyDelegatesOfUpdates() const { delegate_.shadowTreeDidFinishTransaction(mountingCoordinator_, true); } diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h index b875ccc80e21..f462271b03a6 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.h @@ -161,8 +161,6 @@ class ShadowTree final { void mount(ShadowTreeRevision revision, bool mountSynchronously) const; - void emitLayoutEvents(std::vector &affectedLayoutableNodes) const; - void scheduleReactRevisionPromotion() const; const SurfaceId surfaceId_; diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h index 3dde9c5837c8..9bf7cb246b5f 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h @@ -11,6 +11,7 @@ namespace facebook::react { +class LayoutableShadowNode; class ShadowTree; struct ShadowTreeCommitOptions; @@ -49,6 +50,16 @@ class ShadowTreeDelegate { */ virtual void shadowTreeDidPromoteReactRevision(const ShadowTree &shadowTree) const = 0; + /* + * Called right after a Shadow Tree commits a new tree, reporting the nodes + * whose layout changed in this commit. + */ + virtual void shadowTreeDidCommit( + const ShadowTree& shadowTree, + const RootShadowNode::Shared& rootShadowNode, + const std::vector& affectedLayoutableNodes) + const noexcept {} + virtual ~ShadowTreeDelegate() noexcept = default; }; diff --git a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp index 9aba200a839b..77f7719dcc00 100644 --- a/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp +++ b/packages/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -148,6 +149,11 @@ Scheduler::Scheduler( delegate_ = delegate; commitHooks_ = schedulerToolbox.commitHooks; + + // Layout events (`onLayout`) are emitted as a standalone consumer of the + // `shadowTreeDidCommit` commit hook. + commitHooks_.push_back(std::make_shared()); + uiManager_ = uiManager; for (auto& commitHook : commitHooks_) { diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.cpp b/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.cpp new file mode 100644 index 000000000000..5cda81e26748 --- /dev/null +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "LayoutEventEmitter.h" + +#include +#include +#include + +namespace facebook::react { + +void LayoutEventEmitter::shadowTreeDidCommit( + const ShadowTree& /*shadowTree*/, + const RootShadowNode::Shared& /*rootShadowNode*/, + const std::vector& + affectedLayoutableNodes) noexcept { + TraceSection s( + "LayoutEventEmitter::shadowTreeDidCommit", + "affectedLayoutableNodes", + affectedLayoutableNodes.size()); + + for (const auto* layoutableNode : affectedLayoutableNodes) { + if (auto viewProps = + dynamic_cast(layoutableNode->getProps().get())) { + if (viewProps->onLayout) { + static_cast( + *layoutableNode->getEventEmitter()) + .onLayout(layoutableNode->getLayoutMetrics()); + } + } + } +} + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.h new file mode 100644 index 000000000000..128e68ab59ba --- /dev/null +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/LayoutEventEmitter.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include + +namespace facebook::react { + +/* + * Emits layout events (`onLayout`) for the nodes whose layout changed in + * each commit, using the `shadowTreeDidCommit` commit hook as the source of + * layout changes (this logic used to be implemented directly in + * `ShadowTree`). + */ +class LayoutEventEmitter final : public UIManagerCommitHook { + public: + void commitHookWasRegistered(const UIManager& uiManager) noexcept override {} + void commitHookWasUnregistered(const UIManager& uiManager) noexcept override {} + + void shadowTreeDidCommit( + const ShadowTree& shadowTree, + const RootShadowNode::Shared& rootShadowNode, + const std::vector& + affectedLayoutableNodes) noexcept override; +}; + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp index c89e439b9e3b..0c35031aa5db 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.cpp @@ -670,6 +670,21 @@ void UIManager::shadowTreeDidPromoteReactRevision( } } +void UIManager::shadowTreeDidCommit( + const ShadowTree& shadowTree, + const RootShadowNode::Shared& rootShadowNode, + const std::vector& affectedLayoutableNodes) + const noexcept { + TraceSection s("UIManager::shadowTreeDidCommit"); + + std::shared_lock lock(commitHookMutex_); + + for (auto* commitHook : commitHooks_) { + commitHook->shadowTreeDidCommit( + shadowTree, rootShadowNode, affectedLayoutableNodes); + } +} + void UIManager::reportMount(SurfaceId surfaceId) const { TraceSection s("UIManager::reportMount"); diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h index 657d66e2128f..db5af6e67cdb 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManager.h @@ -146,6 +146,12 @@ class UIManager final : public ShadowTreeDelegate { void shadowTreeDidPromoteReactRevision(const ShadowTree &shadowTree) const override; + void shadowTreeDidCommit( + const ShadowTree& shadowTree, + const RootShadowNode::Shared& rootShadowNode, + const std::vector& affectedLayoutableNodes) + const noexcept override; + std::shared_ptr createNode( Tag tag, const std::string &componentName, diff --git a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerCommitHook.h b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerCommitHook.h index 8c34b59ac03f..60f695c2dc7e 100644 --- a/packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerCommitHook.h +++ b/packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerCommitHook.h @@ -11,6 +11,7 @@ namespace facebook::react { +class LayoutableShadowNode; class ShadowTree; struct ShadowTreeCommitOptions; class UIManager; @@ -54,6 +55,16 @@ class UIManagerCommitHook { return newRootShadowNode; } + /* + * Called right after a `ShadowTree` commits a new tree. + * The semantic of the method corresponds to a method of the same name + * from `ShadowTreeDelegate`. + */ + virtual void shadowTreeDidCommit( + const ShadowTree& /*shadowTree*/, + const RootShadowNode::Shared& /*rootShadowNode*/, + const std::vector& /*affectedLayoutableNodes*/) noexcept {} + virtual ~UIManagerCommitHook() noexcept = default; }; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index 9686cd7e5d1b..74e83358718c 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -3165,6 +3165,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -4751,6 +4757,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -5260,6 +5267,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -5331,6 +5339,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api index 9e4a3fa333a9..49eba75e8e36 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api @@ -3074,6 +3074,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -4562,6 +4568,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -5071,6 +5078,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -5142,6 +5150,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index 46adc5077283..866a4e8a2e5e 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -3162,6 +3162,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -4742,6 +4748,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -5251,6 +5258,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -5322,6 +5330,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 6e4ab04a9d24..7a03a12c76ca 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -5397,6 +5397,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -6966,6 +6972,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -7453,6 +7460,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -7524,6 +7532,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 02957e06c0f6..d74bbebc5e69 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -5321,6 +5321,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -6805,6 +6811,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -7292,6 +7299,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -7363,6 +7371,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 94953681427d..08adb4c2a01e 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -5394,6 +5394,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -6957,6 +6963,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -7444,6 +7451,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -7515,6 +7523,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 199e5d7791f4..1a9805cb9286 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -2086,6 +2086,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -3311,6 +3317,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -3719,6 +3726,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -3790,6 +3798,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api index 1c1f2201f6bc..4f812f704861 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api @@ -2022,6 +2022,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -3162,6 +3168,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -3570,6 +3577,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -3641,6 +3649,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; } diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index 573bb02ca90d..70a147742c4c 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -2083,6 +2083,12 @@ class facebook::react::LayoutAnimationStatusDelegate { class facebook::react::LayoutConformanceShadowNode : public facebook::react::ConcreteShadowNode { } +class facebook::react::LayoutEventEmitter : public facebook::react::UIManagerCommitHook { + public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) noexcept override; +} + class facebook::react::LayoutableShadowNode : public facebook::react::ShadowNode { public LayoutableShadowNode(const facebook::react::ShadowNode& sourceShadowNode, const facebook::react::ShadowNodeFragment& fragment); public LayoutableShadowNode(const facebook::react::ShadowNodeFragment& fragment, const facebook::react::ShadowNodeFamily::Shared& family, facebook::react::ShadowNodeTraits traits); @@ -3302,6 +3308,7 @@ class facebook::react::ShadowTree { class facebook::react::ShadowTreeDelegate { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTreeCommitOptions& commitOptions) const = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const = 0; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const = 0; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const = 0; @@ -3710,6 +3717,7 @@ class facebook::react::UIManager : public facebook::react::ShadowTreeDelegate { public std::shared_ptr cloneNode(const facebook::react::ShadowNode& shadowNode, const std::shared_ptr>>& children, facebook::react::RawProps rawProps) const; public std::shared_ptr createNode(facebook::react::Tag tag, const std::string& componentName, facebook::react::SurfaceId surfaceId, facebook::react::RawProps props, facebook::react::InstanceHandle::Shared instanceHandle) const; public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& oldRootShadowNode, const facebook::react::RootShadowNode::Unshared& newRootShadowNode, const facebook::react::ShadowTree::CommitOptions& commitOptions) const override; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree& shadowTree, const facebook::react::RootShadowNode::Shared& rootShadowNode, const std::vector& affectedLayoutableNodes) const noexcept override; public virtual void shadowTreeDidFinishReactCommit(const facebook::react::ShadowTree& shadowTree) const override; public virtual void shadowTreeDidFinishTransaction(std::shared_ptr mountingCoordinator, bool mountSynchronously) const override; public virtual void shadowTreeDidPromoteReactRevision(const facebook::react::ShadowTree& shadowTree) const override; @@ -3781,6 +3789,7 @@ class facebook::react::UIManagerCommitHook { public virtual facebook::react::RootShadowNode::Unshared shadowTreeWillCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const facebook::react::RootShadowNode::Unshared& newRootShadowNode) noexcept; public virtual void commitHookWasRegistered(const facebook::react::UIManager& uiManager) noexcept = 0; public virtual void commitHookWasUnregistered(const facebook::react::UIManager& uiManager) noexcept = 0; + public virtual void shadowTreeDidCommit(const facebook::react::ShadowTree&, const facebook::react::RootShadowNode::Shared&, const std::vector&) noexcept; public virtual ~UIManagerCommitHook() noexcept = default; }