Skip to content

Commit 5f14963

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Breaking: Set "enableBackgroundStyleApplicator" by default (#45866)
Summary: Pull Request resolved: #45866 This turns on enableBackgroundStyleApplicator() by default, which will get us more screenshot tests over existing apps, and let us add new screenshot tests for box-shadow against stock RNTester. This is a breaking change, for the small number of libraries which use CSSBackgroundDrawable/ReactViewBackgroundDrawable off of a view directly, for setting or accessing styles (this was already unreliably), along with libraries which read `mBorderRadius` from views using reflection. This is more or less confined to Reanimated, react-native-navigation, and one internal library. Users who want to access or mutate background styles should use the public `BackgroundStyleApplicator` instead. Changelog: [Android][Breaking] - Set "enableBackgroundStyleApplicator" by default Reviewed By: joevilches Differential Revision: D60365677 fbshipit-source-id: aab8588b27c1125920adb257406c53dadb356767
1 parent 48669af commit 5f14963

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4c87f6bbb603ad9a66d08600fba93554>>
7+
* @generated SignedSource<<2fe2a37cfa83ae9a6a53d1e2e17382b7>>
88
*/
99

1010
/**
@@ -39,7 +39,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
3939

4040
override fun enableAlignItemsBaselineOnFabricIOS(): Boolean = true
4141

42-
override fun enableBackgroundStyleApplicator(): Boolean = false
42+
override fun enableBackgroundStyleApplicator(): Boolean = true
4343

4444
override fun enableCleanTextInputYogaNode(): Boolean = false
4545

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<0d95cb065819310058a7b088db43ec2d>>
7+
* @generated SignedSource<<06d4d5356769bc25529b987aa7e0abb8>>
88
*/
99

1010
/**
@@ -60,7 +60,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
6060
}
6161

6262
bool enableBackgroundStyleApplicator() override {
63-
return false;
63+
return true;
6464
}
6565

6666
bool enableCleanTextInputYogaNode() override {

packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const definitions: FeatureFlagDefinitions = {
7575
'Kill-switch to turn off support for aling-items:baseline on Fabric iOS.',
7676
},
7777
enableBackgroundStyleApplicator: {
78-
defaultValue: false,
78+
defaultValue: true,
7979
description:
8080
'Use BackgroundStyleApplicator in place of other background/border drawing code',
8181
},

packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<a0516861394548a0d788cb5ebc120e98>>
7+
* @generated SignedSource<<0b57a2e853d1f2872ddf0c0b610805bb>>
88
* @flow strict-local
99
*/
1010

@@ -185,7 +185,7 @@ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNative
185185
/**
186186
* Use BackgroundStyleApplicator in place of other background/border drawing code
187187
*/
188-
export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', false);
188+
export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', true);
189189
/**
190190
* Clean yoga node when <TextInput /> does not change.
191191
*/

0 commit comments

Comments
 (0)