mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
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: https://github.com/react/react-native/pull/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
This commit is contained in:
1 parent
53428031ee
commit
c4356db573
1 file changed
+2
-1
+2
-1
@@ -461,7 +461,8 @@ static BOOL RCTLayerTransformCollapsesAxis(CALayer *layer)
|
||||
|
||||
// `border`
|
||||
if (oldViewProps.borderStyles != newViewProps.borderStyles || oldViewProps.borderRadii != newViewProps.borderRadii ||
|
||||
oldViewProps.borderColors != newViewProps.borderColors) {
|
||||
oldViewProps.borderColors != newViewProps.borderColors ||
|
||||
oldViewProps.borderCurves != newViewProps.borderCurves) {
|
||||
needsInvalidateLayer = YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user