mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Ship initial max size on iOS
Summary: changelog: [internal] Ship initial max size on iOS Reviewed By: fkgozali Differential Revision: D30990650 fbshipit-source-id: cf8f202ee862145a6fa9f173c2073096f86015e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6025611bd0
commit
3d83ca0331
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user