diff --git a/React/Base/RCTConstants.h b/React/Base/RCTConstants.h index 06fbc7597ca..c92fc1041c9 100644 --- a/React/Base/RCTConstants.h +++ b/React/Base/RCTConstants.h @@ -16,12 +16,6 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec RCT_EXTERN BOOL RCTExperimentGetPreemptiveViewAllocationDisabled(void); RCT_EXTERN void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value); -/* - * Initial maximum surface size - */ -RCT_EXTERN BOOL RCTGetInitialMaxSizeEnabled(void); -RCT_EXTERN void RCTSetInitialMaxSizeEnabled(BOOL value); - /* * Remove clipped subviews */ diff --git a/React/Base/RCTConstants.m b/React/Base/RCTConstants.m index f734a3384a6..38947bb170f 100644 --- a/React/Base/RCTConstants.m +++ b/React/Base/RCTConstants.m @@ -25,21 +25,6 @@ void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value) RCTExperimentPreemptiveViewAllocationDisabled = value; } -/* - * Initial maximum surface size - */ -static BOOL RCTInitialMaxSizeEnabled = NO; - -BOOL RCTGetInitialMaxSizeEnabled() -{ - return RCTInitialMaxSizeEnabled; -} - -void RCTSetInitialMaxSizeEnabled(BOOL value) -{ - RCTInitialMaxSizeEnabled = value; -} - /* * Remove clipped subviews */ diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 0c3d987ba1b..57b6889bc20 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -259,10 +259,6 @@ static BackgroundExecutor RCTGetBackgroundExecutor() RCTSetRemoveClippedSubviewsEnabled(YES); } - if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:enable_initial_max_size_ios")) { - RCTSetInitialMaxSizeEnabled(YES); - } - auto componentRegistryFactory = [factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)]( EventDispatcher::Weak const &eventDispatcher, ContextContainer::Shared const &contextContainer) { diff --git a/React/Fabric/Surface/RCTFabricSurface.mm b/React/Fabric/Surface/RCTFabricSurface.mm index e18ee5a5f2b..686e7794c47 100644 --- a/React/Fabric/Surface/RCTFabricSurface.mm +++ b/React/Fabric/Surface/RCTFabricSurface.mm @@ -61,9 +61,7 @@ using namespace facebook::react; [_surfacePresenter registerSurface:self]; - if (RCTGetInitialMaxSizeEnabled()) { - [self setMinimumSize:CGSizeZero maximumSize:RCTViewportSize()]; - } + [self setMinimumSize:CGSizeZero maximumSize:RCTViewportSize()]; [self _updateLayoutContext];