Fixed borderBottomEndRadius on RTL (#51229)

Summary:
Fixes https://github.com/facebook/react-native/issues/51193
[ANDROID][FIXED] Wrong borderBottomEndRadius on RTL

Pull Request resolved: https://github.com/facebook/react-native/pull/51229

Test Plan:
Tested with Arabic (RTL) and English(LTR)

English
<img src="https://github.com/user-attachments/assets/5bd1eca9-194c-4d83-b75f-689bc13d827b" width=200>

Arabic
<img src="https://github.com/user-attachments/assets/459320a0-6bb2-4585-97bb-bd4ded6ec399" width=200>

Reviewed By: cortinico

Differential Revision: D74709219

Pulled By: NickGerleman

fbshipit-source-id: 885bb84d97d73324983d044fd2874a457b40f646
This commit is contained in:
Ritesh Shukla
2025-07-01 15:04:42 +01:00
committed by Nicola Corti
parent b47a1b0f4e
commit 04fffa556d
2 changed files with 4 additions and 4 deletions
@@ -136,10 +136,10 @@ public data class BorderRadiusStyle(
(startStart ?: topStart ?: topLeft ?: uniform)?.resolve(width, height)
?: zeroRadii,
bottomLeft =
(endEnd ?: bottomStart ?: bottomRight ?: uniform)?.resolve(width, height)
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.resolve(width, height)
?: zeroRadii,
bottomRight =
(startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.resolve(width, height)
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.resolve(width, height)
?: zeroRadii,
width = width,
height = height,
@@ -88,13 +88,13 @@ class BorderRadiusStyleTest {
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_RIGHT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_END_END_RADIUS),
ComputedBorderRadiusProp.COMPUTED_BORDER_BOTTOM_RIGHT_RADIUS to
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_LEFT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_START_END_RADIUS),
)