Skip to content

Fix iOS borderCurve: 'continuous' for Fabric views when not all corners are rounded - #59566

Open
levibuzolic wants to merge 2 commits into
react:mainfrom
levibuzolic:fix/ios-continuous-border-curve
Open

levibuzolic wants to merge 2 commits into
react:mainfrom
levibuzolic:fix/ios-continuous-border-curve

Conversation

@levibuzolic

Copy link
Copy Markdown
Contributor

Summary:

On iOS Fabric views, borderCurve: 'continuous' is ignored when only some corners are rounded. For example:

<View
  style={{
    overflow: 'hidden',
    borderBottomLeftRadius: 36,
    borderBottomRightRadius: 36,
    borderCurve: 'continuous',
  }}
>
  {/* Content */}
</View>

These views use circular CGPaths for their backgrounds and clipping masks, so they render circular corners. Uniform-radius views already use Core Animation’s continuous curves.

This change uses a native CALayer mask with cornerCurve, cornerRadius, and maskedCorners when the rounded corners share one radius. It updates background, content, image, and padding-box masks.

The existing circular path fallback is still used for unequal radii and radii exceeding half the mask's shorter dimension.

Changelog:

[IOS] [FIXED] - Fix borderCurve: 'continuous' for Fabric view backgrounds and clipping masks when not all corners are rounded.

Test Plan:

Added four visual tests covering circular and continuous for:

  • Uniform, top-only, bottom-only, single, and diagonal rounded corners.
  • Backgrounds, clipped children, and images with borders.
  • Unequal radii, oversized radii, narrow views, and elliptical image insets.

Local validation:

  • RNTester builds from source succeeded on upstream main and the 0.88.1 backport.
  • Passed on iOS 18.0 and iOS 27.0.
  • Before/after pixel comparisons confirmed that both circular screenshots, the uniform-radius control, and all fallback regions remain unchanged.

Screenshots

These screenshots show a borderCurve: 'continuous' (blue) overlayed on top of a borderCurve: 'circular' (red) view to show the difference. The red bleeding through is the desired outcome showing that the continuous setting is being applied to the blue view.

Before After
continuous-corners-before continuous-corners-after
continuous-corners-before-detail continuous-corners-after-detail

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 28, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant