Skip to content

Commit c4356db

Browse files
tshmieldevmeta-codesync[bot]
authored andcommitted
Invalidate the layer when borderCurve changes on iOS (#59114)
Summary: On iOS, `RCTViewComponentView updateProps:oldProps:` only invalidates the layer when `borderStyles`, `borderRadii` or `borderColors` change. A change to `borderCurve` alone is parsed into `borderCurves` but never reaches `layer.cornerCurve`, so the old curve stays on screen until some other border prop changes. This adds `borderCurves` to that comparison. ## Changelog: [IOS] [FIXED] - Apply `borderCurve` changes that are not accompanied by another border prop change Pull Request resolved: #59114 Test Plan: On the iOS simulator (0.88.0-rc.4 with React Native built from source), a plain `View` with `borderRadius: 80` and `backgroundColor: 'blue'`, layered over a static `borderCurve: 'circular'` box, toggles `borderCurve` between `circular` and `continuous` with `setState` every 1.5s. Before the change the shape never changes, after it the `continuous` frames show the `circular` box outlining the corners. Reviewed By: cipolleschi Differential Revision: D126055226 Pulled By: javache fbshipit-source-id: b7ba0762f2912a635a3152a130336dd4ea3c26ee
1 parent 5342803 commit c4356db

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
461461

462462
// `border`
463463
if (oldViewProps.borderStyles != newViewProps.borderStyles || oldViewProps.borderRadii != newViewProps.borderRadii ||
464-
oldViewProps.borderColors != newViewProps.borderColors) {
464+
oldViewProps.borderColors != newViewProps.borderColors ||
465+
oldViewProps.borderCurves != newViewProps.borderCurves) {
465466
needsInvalidateLayer = YES;
466467
}
467468

0 commit comments

Comments
 (0)