mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
42152a3fa3
Summary: Currently, horizontal `ScrollViews` don't properly support `removeClippedSubviews`. This is because the container view, `ReactHorizontalScrollContainerView` extends from regular `ViewGroup` instead of `ReactViewGroup` so doesn't have all the logic around clipping children. Moreover, the `ReactHorizontalScrollContainerViewManager` doesn't actually support the `removeClippedSubviews` prop This change: - Makes `ReactHorizontalScrollContainerView` extend from `ReactViewGroup` while maintaining the special logic around RTL scrolling - Factors out a common `ReactClippingViewManager` which will be used to bridge all components which extend `ReactViewGroup` and support clipping. It has the logic for adding/removing children and getting child counts while considering clipped subviews - `ReactViewManager` now extends this new `ReactClippingViewManager` - `ReactHorizontalScrollContainerViewManager` also extends `ReactClippingViewManager` Reviewed By: JoshuaGross Differential Revision: D17708630 fbshipit-source-id: d257566ee54ad46f6d62f176a657c596bba96aa4