diff --git a/React/Base/RCTConstants.h b/React/Base/RCTConstants.h index c34cbc52df..c6e287605d 100644 --- a/React/Base/RCTConstants.h +++ b/React/Base/RCTConstants.h @@ -17,12 +17,6 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec RCT_EXTERN BOOL RCTExperimentGetOnDemandViewMounting(void); RCT_EXTERN void RCTExperimentSetOnDemandViewMounting(BOOL value); -/* - * It's an experimental feature that improves performance of hit-testing. - */ -RCT_EXTERN BOOL RCTExperimentGetOptimizedHitTesting(void); -RCT_EXTERN void RCTExperimentSetOptimizedHitTesting(BOOL value); - /* * Preemptive View Allocation */ diff --git a/React/Base/RCTConstants.m b/React/Base/RCTConstants.m index e701ea81e7..ecd001c493 100644 --- a/React/Base/RCTConstants.m +++ b/React/Base/RCTConstants.m @@ -25,21 +25,6 @@ void RCTExperimentSetOnDemandViewMounting(BOOL value) RCTExperimentOnDemandViewMounting = value; } -/* - * Optimized hit-testing - */ -static BOOL RCTExperimentOptimizedHitTesting = NO; - -BOOL RCTExperimentGetOptimizedHitTesting() -{ - return RCTExperimentOptimizedHitTesting; -} - -void RCTExperimentSetOptimizedHitTesting(BOOL value) -{ - RCTExperimentOptimizedHitTesting = value; -} - /* * Preemptive View Allocation */ diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 9a302655b6..4fba3d78fc 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -350,9 +350,7 @@ using namespace facebook::react; BOOL clipsToBounds = self.clipsToBounds; - if (RCTExperimentGetOptimizedHitTesting()) { - clipsToBounds = clipsToBounds || _layoutMetrics.overflowInset == EdgeInsets{}; - } + clipsToBounds = clipsToBounds || _layoutMetrics.overflowInset == EdgeInsets{}; if (clipsToBounds && !isPointInside) { return nil; diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 31e2ce5308..c4516c8838 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -257,10 +257,6 @@ static BackgroundExecutor RCTGetBackgroundExecutor() RCTExperimentSetOnDemandViewMounting(YES); } - if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:optimized_hit_testing_ios")) { - RCTExperimentSetOptimizedHitTesting(YES); - } - if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:preemptive_view_allocation_disabled_ios")) { RCTExperimentSetPreemptiveViewAllocationDisabled(YES); }