mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Back out "Remove useOverflowInset flag as we rolled out 100% to public for over three months"
Summary: Original commit changeset: 77da78a29270 Original Phabricator Diff: D36990986 (https://github.com/facebook/react-native/commit/df80ed40c7cde6cf81a0974d78ef0a7cfcf19e5c) Reviewed By: mdvacca Differential Revision: D37074879 fbshipit-source-id: 82668c90d50b4cc6c53986aa9450eea7934402b3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
114d31feee
commit
59476d06f3
@@ -83,6 +83,9 @@ 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;
|
||||
|
||||
@@ -46,6 +46,7 @@ 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(
|
||||
@@ -375,8 +376,9 @@ 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 (oldChildShadowView.layoutMetrics.overflowInset !=
|
||||
newChildShadowView.layoutMetrics.overflowInset) {
|
||||
if (useOverflowInset_ &&
|
||||
(oldChildShadowView.layoutMetrics.overflowInset !=
|
||||
newChildShadowView.layoutMetrics.overflowInset)) {
|
||||
cppUpdateOverflowInsetMountItems.push_back(
|
||||
CppMountItem::UpdateOverflowInsetMountItem(
|
||||
newChildShadowView));
|
||||
@@ -433,8 +435,9 @@ 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 (newChildShadowView.layoutMetrics.overflowInset !=
|
||||
EdgeInsets::ZERO) {
|
||||
if (useOverflowInset_ &&
|
||||
newChildShadowView.layoutMetrics.overflowInset !=
|
||||
EdgeInsets::ZERO) {
|
||||
cppUpdateOverflowInsetMountItems.push_back(
|
||||
CppMountItem::UpdateOverflowInsetMountItem(
|
||||
newChildShadowView));
|
||||
|
||||
@@ -72,6 +72,7 @@ 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};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ 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;
|
||||
@@ -191,6 +192,7 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user