From df80ed40c7cde6cf81a0974d78ef0a7cfcf19e5c Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Thu, 9 Jun 2022 12:30:14 -0700 Subject: [PATCH] Remove useOverflowInset flag as we rolled out 100% to public for over three months Summary: Remove overflow inset optimization flags as they've been rolled out 100% to public. Changelog: [Android][Internal] - Clean up feature flags for overflowInset Reviewed By: nlutsenko Differential Revision: D36990986 fbshipit-source-id: 77da78a2927034893f25937c2ccbd0b53e08031d --- .../com/facebook/react/config/ReactFeatureFlags.java | 3 --- .../react/fabric/jni/FabricMountingManager.cpp | 11 ++++------- .../facebook/react/fabric/jni/FabricMountingManager.h | 1 - .../facebook/react/uimanager/TouchTargetHelper.java | 2 -- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index b0d953a7868..b60785e5490 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -83,9 +83,6 @@ public class ReactFeatureFlags { /** Enables or disables MapBuffer Serialization */ public static boolean mapBufferSerializationEnabled = false; - /** Feature Flag to use overflowInset values provided by Yoga */ - public static boolean useOverflowInset = false; - public static boolean enableLockFreeEventDispatcher = false; public static boolean enableAggressiveEventEmitterCleanup = false; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp index a917a2011ca..245fe431e6d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp @@ -46,7 +46,6 @@ FabricMountingManager::FabricMountingManager( config->getBool("react_fabric:disabled_view_preallocation_android")), disableRevisionCheckForPreallocation_(config->getBool( "react_fabric:disable_revision_check_for_preallocation")), - useOverflowInset_(getFeatureFlagValue("useOverflowInset")), shouldRememberAllocatedViews_( getFeatureFlagValue("shouldRememberAllocatedViews")), useMapBufferForViewProps_(config->getBool( @@ -376,9 +375,8 @@ void FabricMountingManager::executeMount( // children of the current view. The layout of current view may not // change, and we separate this part from layout mount items to not // pack too much data there. - if (useOverflowInset_ && - (oldChildShadowView.layoutMetrics.overflowInset != - newChildShadowView.layoutMetrics.overflowInset)) { + if (oldChildShadowView.layoutMetrics.overflowInset != + newChildShadowView.layoutMetrics.overflowInset) { cppUpdateOverflowInsetMountItems.push_back( CppMountItem::UpdateOverflowInsetMountItem( newChildShadowView)); @@ -435,9 +433,8 @@ void FabricMountingManager::executeMount( // children of the current view. The layout of current view may not // change, and we separate this part from layout mount items to not // pack too much data there. - if (useOverflowInset_ && - newChildShadowView.layoutMetrics.overflowInset != - EdgeInsets::ZERO) { + if (newChildShadowView.layoutMetrics.overflowInset != + EdgeInsets::ZERO) { cppUpdateOverflowInsetMountItems.push_back( CppMountItem::UpdateOverflowInsetMountItem( newChildShadowView)); diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h index ebd95dd8094..dc39cd4600f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h @@ -72,7 +72,6 @@ class FabricMountingManager final { bool const enableEarlyEventEmitterUpdate_{false}; bool const disablePreallocateViews_{false}; bool const disableRevisionCheckForPreallocation_{false}; - bool const useOverflowInset_{false}; bool const shouldRememberAllocatedViews_{false}; bool const useMapBufferForViewProps_{false}; diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java index f0d7c6fd335..2720e40132d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java @@ -19,7 +19,6 @@ import android.view.ViewGroup; import androidx.annotation.Nullable; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.bridge.UiThreadUtil; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.touch.ReactHitSlopView; import com.facebook.react.uimanager.common.ViewUtil; import java.util.ArrayList; @@ -192,7 +191,6 @@ public class TouchTargetHelper { // If the touch point is outside of the overflowinset for the view, we can safely ignore // it. if (ViewUtil.getUIManagerType(view.getId()) == FABRIC - && ReactFeatureFlags.useOverflowInset && !isTouchPointInViewWithOverflowInset(eventCoords[0], eventCoords[1], view)) { return null; }