Stop subview clipping recursion at RCTScrollViewComponentView component

Summary:
changelog: [internal]

Prevent `RCTScrollViewComponentView`'s children from being clipped by stopping clipping recursion.

Reviewed By: fkgozali

Differential Revision: D31196948

fbshipit-source-id: 09548ade9cf993730784f544b565b9fde77a6ee4
This commit is contained in:
Samuel Susla 2021-09-26 12:14:10 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 18697adec4
Коммит 8d0a2e7921
1 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -133,15 +133,6 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
[self.scrollViewDelegateSplitter removeAllDelegates];
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (_subviewClippingEnabled) {
[self _remountChildren];
}
}
- (RCTGenericDelegateSplitter<id<UIScrollViewDelegate>> *)scrollViewDelegateSplitter
{
return ((RCTEnhancedScrollView *)_scrollView).delegateSplitter;
@ -611,6 +602,11 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
#pragma mark - Child views mounting
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView
{
// Do nothing. ScrollView manages its subview clipping individually in `_remountChildren`.
}
- (void)_remountChildrenIfNeeded
{
CGPoint contentOffset = _scrollView.contentOffset;