Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -5582,6 +5582,7 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollView : android
public fun fling (I)V
public fun focusSearch (Landroid/view/View;I)Landroid/view/View;
public fun getChildVisibleRect (Landroid/view/View;Landroid/graphics/Rect;Landroid/graphics/Point;)Z
public fun getClipToPadding ()Z
public fun getClippingRect (Landroid/graphics/Rect;)V
public fun getFadingEdgeLengthEnd ()I
public fun getFadingEdgeLengthStart ()I
Expand Down Expand Up @@ -5727,6 +5728,7 @@ public class com/facebook/react/views/scroll/ReactScrollView : android/widget/Sc
public fun focusSearch (Landroid/view/View;I)Landroid/view/View;
protected fun getBottomFadingEdgeStrength ()F
public fun getChildVisibleRect (Landroid/view/View;Landroid/graphics/Rect;Landroid/graphics/Point;)Z
public fun getClipToPadding ()Z
public fun getClippingRect (Landroid/graphics/Rect;)V
public fun getFadingEdgeLengthEnd ()I
public fun getFadingEdgeLengthStart ()I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<65e8cae8a55213f4b08ec4d896a05c00>>
* @generated SignedSource<<9a521f1f6989bb2735ae87d0a0c2f5fe>>
*/

/**
Expand Down Expand Up @@ -432,6 +432,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun skipActivityIdentityAssertionOnHostPause(): Boolean = accessor.skipActivityIdentityAssertionOnHostPause()

/**
* Sync clipToPadding on Android views with the overflow property
*/
@JvmStatic
public fun syncAndroidClipToPaddingWithOverflow(): Boolean = accessor.syncAndroidClipToPaddingWithOverflow()

/**
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d92407e77cb3be0d57a84b5a9a931f2b>>
* @generated SignedSource<<5a92af0a54f8aae7ba6f36a952c64df4>>
*/

/**
Expand Down Expand Up @@ -87,6 +87,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
private var syncAndroidClipToPaddingWithOverflowCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
Expand Down Expand Up @@ -705,6 +706,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun syncAndroidClipToPaddingWithOverflow(): Boolean {
var cached = syncAndroidClipToPaddingWithOverflowCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.syncAndroidClipToPaddingWithOverflow()
syncAndroidClipToPaddingWithOverflowCache = cached
}
return cached
}

override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b83744bb70330f8c540c448ebc1cad47>>
* @generated SignedSource<<cabb5ba7c0486e777be721f6ff880d05>>
*/

/**
Expand Down Expand Up @@ -162,6 +162,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun skipActivityIdentityAssertionOnHostPause(): Boolean

@DoNotStrip @JvmStatic public external fun syncAndroidClipToPaddingWithOverflow(): Boolean

@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<0139bc7a7b2ae5c9175f44de1ac80105>>
* @generated SignedSource<<c302baa5e3dcdf6655da02cd9850e653>>
*/

/**
Expand Down Expand Up @@ -157,6 +157,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun skipActivityIdentityAssertionOnHostPause(): Boolean = false

override fun syncAndroidClipToPaddingWithOverflow(): Boolean = false

override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false

override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d3d6ecfc14d5a0c317d968b65455955a>>
* @generated SignedSource<<07501a0c5936c8fe26a432d57c541d7e>>
*/

/**
Expand Down Expand Up @@ -91,6 +91,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
private var syncAndroidClipToPaddingWithOverflowCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
Expand Down Expand Up @@ -776,6 +777,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun syncAndroidClipToPaddingWithOverflow(): Boolean {
var cached = syncAndroidClipToPaddingWithOverflowCache
if (cached == null) {
cached = currentProvider.syncAndroidClipToPaddingWithOverflow()
accessedFeatureFlags.add("syncAndroidClipToPaddingWithOverflow")
syncAndroidClipToPaddingWithOverflowCache = cached
}
return cached
}

override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f8cbc05fd0bda7b6efa74279b9cadaa7>>
* @generated SignedSource<<34a625414f22a7c36ff9db90e76b1254>>
*/

/**
Expand Down Expand Up @@ -157,6 +157,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun skipActivityIdentityAssertionOnHostPause(): Boolean

@DoNotStrip public fun syncAndroidClipToPaddingWithOverflow(): Boolean

@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean

@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@ public Rect getOverflowInset() {
return mOverflowInset;
}

@Override
public boolean getClipToPadding() {
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
return mOverflow != Overflow.VISIBLE;
}
return super.getClipToPadding();
}

@Override
public void onDraw(Canvas canvas) {
if (mOverflow != Overflow.VISIBLE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<78fb92f68ec0a93d0041ed381f76728e>>
* @generated SignedSource<<fefaf14f0291216b635ea0c356e9929c>>
*/

/**
Expand Down Expand Up @@ -787,6 +787,14 @@ public void updateClippingRect(@Nullable Set<Integer> excludedViewsSet) {
}
}

@Override
public boolean getClipToPadding() {
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
return mOverflow != Overflow.VISIBLE;
}
return super.getClipToPadding();
}

@Override
public void getClippingRect(Rect outClippingRect) {
outClippingRect.set(Assertions.assertNotNull(mClippingRect));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,14 @@ public void updateClippingRect(@Nullable Set<Integer> excludedViewsSet) {
}
}

@Override
public boolean getClipToPadding() {
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
return mOverflow != Overflow.VISIBLE;
}
return super.getClipToPadding();
}

@Override
public void getClippingRect(Rect outClippingRect) {
outClippingRect.set(Assertions.assertNotNull(mClippingRect));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public open class ReactViewGroup public constructor(context: Context?) :
*/
private fun initView() {
clipChildren = false
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
clipToPadding = false
}

_removeClippedSubviews = false
inSubviewClippingLoop = false
Expand Down Expand Up @@ -819,6 +822,9 @@ public open class ReactViewGroup public constructor(context: Context?) :
} else {
Overflow.fromString(overflow)
}
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
clipToPadding = _overflow != Overflow.VISIBLE
}
invalidate()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4386581c81476b6f7684a8766642db13>>
* @generated SignedSource<<4471e7ab5f05b6b15c4e54e54d7c0fda>>
*/

/**
Expand Down Expand Up @@ -441,6 +441,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool syncAndroidClipToPaddingWithOverflow() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("syncAndroidClipToPaddingWithOverflow");
return method(javaProvider_);
}

bool traceTurboModulePromiseRejectionsOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("traceTurboModulePromiseRejectionsOnAndroid");
Expand Down Expand Up @@ -864,6 +870,11 @@ bool JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPaus
return ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause();
}

bool JReactNativeFeatureFlagsCxxInterop::syncAndroidClipToPaddingWithOverflow(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow();
}

bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
Expand Down Expand Up @@ -1166,6 +1177,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"skipActivityIdentityAssertionOnHostPause",
JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPause),
makeNativeMethod(
"syncAndroidClipToPaddingWithOverflow",
JReactNativeFeatureFlagsCxxInterop::syncAndroidClipToPaddingWithOverflow),
makeNativeMethod(
"traceTurboModulePromiseRejectionsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<49c9151beb66235968403b1091de3f56>>
* @generated SignedSource<<c9bba7df566585c39f8b5974bdd4d9d3>>
*/

/**
Expand Down Expand Up @@ -231,6 +231,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool skipActivityIdentityAssertionOnHostPause(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool syncAndroidClipToPaddingWithOverflow(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool traceTurboModulePromiseRejectionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e9c9a4e487664049d40a1bed5015e8fe>>
* @generated SignedSource<<41433dd76c5e69646fd73ff5942da8e8>>
*/

/**
Expand Down Expand Up @@ -294,6 +294,10 @@ bool ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause() {
return getAccessor().skipActivityIdentityAssertionOnHostPause();
}

bool ReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow() {
return getAccessor().syncAndroidClipToPaddingWithOverflow();
}

bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e9daabfbf719ad178ce1a366a9f82362>>
* @generated SignedSource<<1d664fca5013de934ff2ee86f7ad5f72>>
*/

/**
Expand Down Expand Up @@ -374,6 +374,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool skipActivityIdentityAssertionOnHostPause();

/**
* Sync clipToPadding on Android views with the overflow property
*/
RN_EXPORT static bool syncAndroidClipToPaddingWithOverflow();

/**
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
*/
Expand Down
Loading
Loading