Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fabric] Fix View content clipping to bounds toggling randomly on mount
Summary: React View components take the assumption that content clipping to the view's bounds is disabled by default. This diff fixes the propagation of the clipping setting to the `RCTUIView` instance and the backing core animation layer, by keeping both settings in sync with the component props. Core Animation on macOS also enabled clipping when a corner radius (border radius) is set on the layer. This would result in the random toggling of the clipping (overflow style) on the native view and make it out of sync with the component properties. This is being fixed by restoring the current `clipsToBounds` setting after setting the layer's corner radius property. Test Plan: - Run Cosmo Studio - Open the UI Reference (Developer > Show UI Reference) - Open the 'Inputs' example - Switch between other examples and back to 'Inputs' to verify that the clipping stays unchanged. | Before | After | |--| | https://pxl.cl/4xDWc | https://pxl.cl/4xDWt | Reviewers: shawndempsey, bedeoverend, #rn-desktop, #cosmo Reviewed By: bedeoverend Subscribers: generatedunixname499725568 Differential Revision: https://phabricator.intern.facebook.com/D55213691 Tasks: T182033885 Tags: uikit-diff # Conflicts: # packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
- Loading branch information