From e814953e6b3472478d88356b0cc597d63d2cd21f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 7 Oct 2026 10:08:01 -0700 Subject: [PATCH 1/5] Fix iOS removeClippedSubviews being lost on recycled views (#58915) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: On iOS, `prepareForRecycle` resets `_removeClippedSubviews` to `NO` but keeps `_props`, and `updateProps:oldProps:` only set the flag when `removeClippedSubviews` differed from `_props`. So a recycled view whose previous props also had `removeClippedSubviews` never turned clipping back on, and a remounted `ScrollView`/`FlatList` kept every row attached. This compares against `_removeClippedSubviews` itself, and adds a test. Fixes https://github.com/react/react-native/issues/58914. Repro: https://github.com/mozzius/view-remove-clipped-subviews-recycle-repro ## Changelog: [IOS] [FIXED] - removeClippedSubviews is kept on recycled views Pull Request resolved: https://github.com/react/react-native/pull/58915 Test Plan: In the repro (a `ScrollView` with `removeClippedSubviews` and 100 rows, unmounted and mounted again), the recycled content view keeps all 100/100 rows attached on every remount without this change (7/7, including 3/3 on unmodified 0.87.1), and 7/100 with it (3/3), the same as on first mount. The new `RCTViewComponentViewTests` case, run inside the repro app against 0.87.1 built from source, fails without the change and passes with it. ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Reviewed By: sammy-SC Differential Revision: D123878627 Pulled By: cipolleschi fbshipit-source-id: 21d792698d74805f61a9a93f5b944d8f5abcd7f3 (cherry picked from commit ff78e95e59b9f572f4b5108de88d044437d7be15) --- .../View/RCTViewComponentView.mm | 4 +++- .../Mounting/RCTViewComponentViewTests.mm | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index d44d1e02ca51..0ca6d303322f 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -359,7 +359,9 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & // Disable `removeClippedSubviews` when Fabric View Culling is enabled. if (!ReactNativeFeatureFlags::enableViewCulling()) { - if (oldViewProps.removeClippedSubviews != newViewProps.removeClippedSubviews) { + // Compare against the current state, not `_props`: `prepareForRecycle` resets + // `_removeClippedSubviews` but keeps `_props`. + if (_removeClippedSubviews != newViewProps.removeClippedSubviews) { _removeClippedSubviews = newViewProps.removeClippedSubviews; [self _updateRemoveClippedSubviewsState]; } diff --git a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm index 91e100d28df1..ea3b3045d725 100644 --- a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm +++ b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm @@ -143,6 +143,26 @@ - (void)testUnmountAfterToggleOffCleansUpReactSubviews XCTAssertNil(child2.superview); } +- (void)testRemoveClippedSubviewsIsKeptOnRecycledView +{ + RCTViewComponentView *view = [RCTViewComponentView new]; + [view updateProps:makeViewProps(true) oldProps:ViewShadowNode::defaultSharedProps()]; + [view prepareForRecycle]; + + // Reused for another view with removeClippedSubviews. Like the mounting layer + // does for an Insert, pass no old props: the view diffs against its own. + [view updateProps:makeViewProps(true) oldProps:nullptr]; + + UIView *child = [UIView new]; + child.frame = CGRectMake(0, 400, 50, 50); + [view mountChildComponentView:(id)child index:0]; + + // Clipping is on, so the child is tracked and left for the clipping pass to attach. + XCTAssertNil(child.superview); + NSMutableArray *reactSubviews = [view valueForKey:@"_reactSubviews"]; + XCTAssertEqual(reactSubviews.count, 1u); +} + #pragma mark - hitTest against non-invertible transforms (#50797) - (void)testHitTestReturnsNilForZeroScaleYView From f4f613ba6aa4e0d244ece55fc0e1952edc675ff4 Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Wed, 11 Nov 2026 15:54:09 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix(scatterlab):=20removeClippedSubviews=20?= =?UTF-8?q?=EB=A5=BC=20=EC=BC=A0=20=EB=B7=B0=EA=B0=80=20=EC=97=86=EC=9C=BC?= =?UTF-8?q?=EB=A9=B4=20ScrollView=20=EA=B0=80=20=EC=BD=98=ED=85=90?= =?UTF-8?q?=EC=B8=A0=EB=A5=BC=20=EC=88=9C=ED=9A=8C=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EA=B2=8C=20=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS ์˜ `RCTScrollViewComponentView` ๋Š” mounting transaction ์ด ๋๋‚  ๋•Œ๋งˆ๋‹ค, ๊ทธ๋ฆฌ๊ณ  ์Šคํฌ๋กค์ด 44pt ์›€์ง์ผ ๋•Œ๋งˆ๋‹ค `_remountChildren` ์œผ๋กœ ์ฝ˜ํ…์ธ  ์ „์ฒด๋ฅผ ์žฌ๊ท€ ์ˆœํšŒํ•œ๋‹ค. ์ˆœํšŒ๊ฐ€ ์‹ค์ œ๋กœ ์ผ์„ ํ•˜๋Š” ๊ณณ์€ `removeClippedSubviews` ๊ฐ€ ์ผœ์ง„ `RCTViewComponentView` ๋ฟ์ด๊ณ , ๋‚˜๋จธ์ง€ ๋ทฐ๋Š” rect ๋ฅผ ๋ณ€ํ™˜ํ•ด ์ž์‹์—๊ฒŒ ๋„˜๊ธฐ๊ธฐ๋งŒ ํ•œ๋‹ค. ์˜ต์ €๋ฒ„ ํ†ต์ง€๋Š” surface ์˜ ๋ชจ๋“  ScrollView ๋กœ ๊ฐ€๋ฏ€๋กœ, ๊ทธ prop ์„ ์ผ  ๋ทฐ๊ฐ€ ํ•˜๋‚˜๋„ ์—†๋Š” ์•ฑ์€ ์ปค๋ฐ‹๋งˆ๋‹ค ๋งˆ์šดํŠธ๋œ ScrollView ์ „๋ถ€์˜ ์„œ๋ธŒํŠธ๋ฆฌ๋ฅผ ํ—›๋ˆ๋‹ค. `RCTViewComponentView` ๊ฐ€ `_removeClippedSubviews` ๊ฐ€ ์ผœ์ง„ ์‚ด์•„ ์žˆ๋Š” ๋ทฐ ์ˆ˜๋ฅผ ์„ธ๊ณ , `_remountChildren` ์€ ๊ทธ ์ˆ˜๊ฐ€ 0 ์ด๋ฉด ๋ฐ˜ํ™˜ํ•œ๋‹ค. 0 ์ด ์•„๋‹ˆ๋ฉด ์ง€๊ธˆ๊ณผ ๋˜‘๊ฐ™์ด ์ˆœํšŒํ•œ๋‹ค. - ์นด์šดํ„ฐ๋Š” props ๊ฐ€ ์•„๋‹ˆ๋ผ ํ”Œ๋ž˜๊ทธ ์ž์ฒด์˜ ์ „์ด๋ฅผ ๋”ฐ๋ฅธ๋‹ค. ํ”Œ๋ž˜๊ทธ๋ฅผ ๋ฐ”๊พธ๋Š” ๋‘ ๊ณณ(`updateProps`, `prepareForRecycle`)์ด `RCTSetRemoveClippedSubviews` ํ•˜๋‚˜๋ฅผ ๊ฑฐ์น˜๊ณ , ์ผœ์ง„ ์ฑ„ ํ•ด์ œ๋˜๋Š” ๋ทฐ๋Š” `dealloc` ์ด ๋บ€๋‹ค. `prepareForRecycle` ์€ ํ”Œ๋ž˜๊ทธ๋งŒ ๋‚ด๋ฆฌ๊ณ  `_props` ๋Š” ๋‚จ๊ธฐ๋ฏ€๋กœ, props ๊ธฐ์ค€์œผ๋กœ ์„ธ๋ฉด ์žฌํ™œ์šฉ๋œ ๋ทฐ๋ฅผ ๋‘ ๋ฒˆ ๋นผ๊ฒŒ ๋œ๋‹ค. ์ˆ˜๊ฐ€ ์‹ค์ œ๋ณด๋‹ค ์ž‘์œผ๋ฉด clipping ๋ทฐ์˜ ์ž์‹์ด ํ™”๋ฉด์— ๋ถ™์ง€ ์•Š๋Š”๋‹ค. - ๊ฐ€๋“œ๋Š” `_remountChildren` ์—๋งŒ ๋‘”๋‹ค. `_remountChildrenIfNeeded` ์˜ `_contentOffsetWhenClipped` ๊ฐฑ์‹ ์€ ๊ทธ๋Œ€๋กœ๋ผ, ์ˆ˜๊ฐ€ 0 ์ธ ๋™์•ˆ ๊ฑด๋„ˆ๋›ด ์ˆœํšŒ๊ฐ€ ์•„๋ฌด๊ฒƒ๋„ ๋ฐ”๊พธ์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ๋งŒ์œผ๋กœ ์ด์ „๊ณผ ์ƒํƒœ๊ฐ€ ๊ฐ™๋‹ค. - ์นด์šดํ„ฐ๋Š” `RCTViewComponentView.mm` ํ•œ ๊ณณ์— `std::atomic` ์œผ๋กœ ๋‘๊ณ  ํ•จ์ˆ˜๋กœ ์ฝ๋Š”๋‹ค. ์ƒ๋ฅ˜ #59284(open)๊ฐ€ ๊ฐ™์€ ๋ชฉ์ ์ด๋‹ค. Co-Authored-By: Claude Fable 5.2 --- .../ScrollView/RCTScrollViewComponentView.mm | 7 ++++ .../View/RCTViewComponentView.mm | 33 +++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index 14a08b49cb7c..b113114a5450 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -34,6 +34,9 @@ static const CGFloat kClippingLeeway = 44.0; +// Defined in RCTViewComponentView.mm. +RCT_EXTERN NSInteger RCTViewComponentViewClippingViewCount(void); + static UIScrollViewKeyboardDismissMode RCTUIKeyboardDismissModeFromProps(const ScrollViewProps &props) { switch (props.keyboardDismissMode) { @@ -1002,6 +1005,10 @@ - (void)_remountChildren return; } + if (RCTViewComponentViewClippingViewCount() == 0) { + return; + } + [_scrollView updateClippedSubviewsWithClipRect:CGRectInset(_scrollView.bounds, -kClippingLeeway, -kClippingLeeway) relativeToView:_scrollView]; } diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 0ca6d303322f..fb207e7ed4f6 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -11,6 +11,7 @@ #import #import #import +#import #import #import #import @@ -40,6 +41,29 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f; +// Live views with `removeClippedSubviews` on. A ScrollView walks its whole content after +// every mounting transaction and every few points of scrolling only to reach such views, +// so it skips the walk while there are none (`-[RCTScrollViewComponentView _remountChildren]`). +// A count that is too low would leave the children of a clipping view unattached, so it +// follows the flag itself, not the props: `prepareForRecycle` resets the flag but keeps +// `_props`. Every change to the flag goes through `RCTSetRemoveClippedSubviews`. +static std::atomic gClippingViewCount{0}; + +RCT_EXTERN NSInteger RCTViewComponentViewClippingViewCount(void); +NSInteger RCTViewComponentViewClippingViewCount(void) +{ + return gClippingViewCount.load(); +} + +static void RCTSetRemoveClippedSubviews(BOOL &removeClippedSubviews, BOOL value) +{ + if (removeClippedSubviews == value) { + return; + } + removeClippedSubviews = value; + gClippingViewCount += value ? 1 : -1; +} + #if !TARGET_OS_TV // iOS Full Keyboard Access only focuses a view when it is an accessibility // element that also exposes an interactive trait. Views that surface their @@ -145,6 +169,11 @@ - (instancetype)initWithFrame:(CGRect)frame return self; } +- (void)dealloc +{ + RCTSetRemoveClippedSubviews(_removeClippedSubviews, NO); +} + - (facebook::react::Props::Shared)props { return _props; @@ -362,7 +391,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & // Compare against the current state, not `_props`: `prepareForRecycle` resets // `_removeClippedSubviews` but keeps `_props`. if (_removeClippedSubviews != newViewProps.removeClippedSubviews) { - _removeClippedSubviews = newViewProps.removeClippedSubviews; + RCTSetRemoveClippedSubviews(_removeClippedSubviews, newViewProps.removeClippedSubviews); [self _updateRemoveClippedSubviewsState]; } } @@ -780,7 +809,7 @@ - (void)prepareForRecycle _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil; _eventEmitter.reset(); _isJSResponder = NO; - _removeClippedSubviews = NO; + RCTSetRemoveClippedSubviews(_removeClippedSubviews, NO); _reactSubviews = [NSMutableArray new]; _layoutMetrics = EmptyLayoutMetrics; } From f51b36ada77331eed4e24f734eafea508ca4098a Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Wed, 11 Nov 2026 15:54:09 +0900 Subject: [PATCH 3/5] =?UTF-8?q?test(scatterlab):=20=ED=81=B4=EB=A6=AC?= =?UTF-8?q?=ED=95=91=20=EB=B7=B0=20=EC=B9=B4=EC=9A=B4=ED=84=B0=EC=99=80=20?= =?UTF-8?q?ScrollView=20=EC=88=9C=ED=9A=8C=20=EA=B0=80=EB=93=9C=EB=A5=BC?= =?UTF-8?q?=20=EA=B2=80=EC=A6=9D=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ๋‚ก์€ props ๋ฅผ ๊ฐ€์ง„ ์žฌํ™œ์šฉ ๋ทฐ๊ฐ€ ์นด์šดํ„ฐ๋ฅผ ๋‘ ๋ฒˆ ๋‚ด๋ฆฌ์ง€ ์•Š๋Š”๋‹ค. - ๊ฐ™์€ ๊ฐ’ ๋ฐ˜๋ณตยท์ด์ค‘ `prepareForRecycle`ยท์ผœ์ง„ ์ฑ„ `dealloc` ๋’ค์— ์นด์šดํ„ฐ๊ฐ€ ์ œ์ž๋ฆฌ๋กœ ์˜จ๋‹ค. - ์นด์šดํ„ฐ๊ฐ€ 0 ์ด๋ฉด `_remountChildren` ์ด ์ˆœํšŒํ•˜์ง€ ์•Š๊ณ , ๋‹ค๋ฅธ ScrollView ์— ์†ํ•œ ๋ทฐ๊ฐ€ `removeClippedSubviews` ๋ฅผ ์ผœ๋ฉด ์ˆœํšŒํ•œ๋‹ค. - clipping ๋ทฐ์— ์ƒˆ๋กœ ๋งˆ์šดํŠธ๋œ ์ž์‹ ์ค‘ ๋ณด์ด๋Š” ๊ฒƒ์€ ScrollView ์ˆœํšŒ๊ฐ€ ๋ถ™์ธ๋‹ค. Co-Authored-By: Claude Fable 5.2 --- .../Mounting/RCTViewComponentViewTests.mm | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm index ea3b3045d725..f1460975c1e3 100644 --- a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm +++ b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#import #import #import #import @@ -20,6 +21,34 @@ return props; } +// Defined in RCTViewComponentView.mm. +RCT_EXTERN NSInteger RCTViewComponentViewClippingViewCount(void); + +@interface RCTScrollViewComponentView (ClippingWalkTests) +- (void)_remountChildren; +@end + +// Counts the clipping walks that reach it. +@interface RCTClippingWalkSpyView : UIView +@property (nonatomic, assign) NSUInteger walkCount; +@end + +@implementation RCTClippingWalkSpyView +- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView +{ + self.walkCount++; +} +@end + +// A ScrollView, 400 points tall, with `content` as its content view. +static RCTScrollViewComponentView *makeScrollView(UIView *content) +{ + RCTScrollViewComponentView *scrollView = + [[RCTScrollViewComponentView alloc] initWithFrame:CGRectMake(0, 0, 100, 400)]; + [scrollView mountChildComponentView:(id)content index:0]; + return scrollView; +} + @interface RCTViewComponentViewTests : XCTestCase @end @@ -163,6 +192,100 @@ - (void)testRemoveClippedSubviewsIsKeptOnRecycledView XCTAssertEqual(reactSubviews.count, 1u); } +#pragma mark - clipping view count + +- (void)testClippingViewCountIsNotLoweredTwiceForARecycledView +{ + NSInteger baseline = RCTViewComponentViewClippingViewCount(); + + RCTViewComponentView *recycled = [RCTViewComponentView new]; + [recycled updateProps:makeViewProps(true) oldProps:ViewShadowNode::defaultSharedProps()]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline + 1); + + // Recycling turns clipping off but keeps `_props`, which still have it on. + [recycled prepareForRecycle]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline); + + // Reused for a view without removeClippedSubviews: the props go from on to off, the view does not. + [recycled updateProps:makeViewProps(false) oldProps:nullptr]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline); + + // A count that went below the baseline here would read 0 with this view clipping. + RCTViewComponentView *clipping = [RCTViewComponentView new]; + [clipping updateProps:makeViewProps(true) oldProps:ViewShadowNode::defaultSharedProps()]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline + 1); +} + +- (void)testClippingViewCountFollowsRepeatedUpdatesRecyclingAndDealloc +{ + NSInteger baseline = RCTViewComponentViewClippingViewCount(); + + @autoreleasepool { + RCTViewComponentView *view = [RCTViewComponentView new]; + auto propsOn = makeViewProps(true); + [view updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()]; + [view updateProps:makeViewProps(true) oldProps:propsOn]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline + 1); + + [view prepareForRecycle]; + [view prepareForRecycle]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline); + + // Deallocated below with clipping still on. + [view updateProps:makeViewProps(true) oldProps:nullptr]; + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline + 1); + } + + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), baseline); +} + +- (void)testScrollViewSkipsClippingWalkWhileNoViewClips +{ + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), 0); + + RCTClippingWalkSpyView *spy = [RCTClippingWalkSpyView new]; + RCTViewComponentView *content = [RCTViewComponentView new]; + [content mountChildComponentView:(id)spy index:0]; + RCTScrollViewComponentView *scrollView = makeScrollView(content); + + [scrollView _remountChildren]; + XCTAssertEqual(spy.walkCount, 0u); + + // A clipping view anywhere, here in another ScrollView, turns the walk back on. + RCTViewComponentView *otherContent = [RCTViewComponentView new]; + __unused RCTScrollViewComponentView *otherScrollView = makeScrollView(otherContent); + [otherContent updateProps:makeViewProps(true) oldProps:ViewShadowNode::defaultSharedProps()]; + + [scrollView _remountChildren]; + XCTAssertEqual(spy.walkCount, 1u); + + [otherContent updateProps:makeViewProps(false) oldProps:nullptr]; + [scrollView _remountChildren]; + XCTAssertEqual(spy.walkCount, 1u); +} + +- (void)testScrollViewAttachesVisibleChildrenOfClippingView +{ + RCTViewComponentView *content = [RCTViewComponentView new]; + content.frame = CGRectMake(0, 0, 100, 1000); + RCTScrollViewComponentView *scrollView = makeScrollView(content); + [content updateProps:makeViewProps(true) oldProps:ViewShadowNode::defaultSharedProps()]; + + UIView *visibleRow = [UIView new]; + visibleRow.frame = CGRectMake(0, 0, 100, 50); + UIView *offscreenRow = [UIView new]; + offscreenRow.frame = CGRectMake(0, 900, 100, 50); + [content mountChildComponentView:(id)visibleRow index:0]; + [content mountChildComponentView:(id)offscreenRow index:1]; + + // A clipping view only tracks new children. The ScrollView's walk attaches the visible ones. + XCTAssertNil(visibleRow.superview); + + [scrollView _remountChildren]; + XCTAssertEqual(visibleRow.superview, content); + XCTAssertNil(offscreenRow.superview); +} + #pragma mark - hitTest against non-invertible transforms (#50797) - (void)testHitTestReturnsNilForZeroScaleYView From bd65275cc162dd0e889de495a0052528a375f1a2 Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Wed, 11 Nov 2026 15:54:09 +0900 Subject: [PATCH 4/5] =?UTF-8?q?chore(scatterlab):=20=ED=81=B4=EB=A6=AC?= =?UTF-8?q?=ED=95=91=20=EC=88=9C=ED=9A=8C=20=EA=B0=80=EB=93=9C=EC=99=80=20?= =?UTF-8?q?=EC=83=81=EB=A5=98=20#58915=20=EA=B0=80=20=EA=B1=B4=EB=93=9C?= =?UTF-8?q?=EB=A6=B0=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20=ED=97=88=EC=9A=A9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=20=EC=98=AC=EB=A6=B0=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.2 --- .github/scatterlab/allowed-tarball-diff.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/scatterlab/allowed-tarball-diff.txt b/.github/scatterlab/allowed-tarball-diff.txt index 554d4f75bd44..1494c1245748 100644 --- a/.github/scatterlab/allowed-tarball-diff.txt +++ b/.github/scatterlab/allowed-tarball-diff.txt @@ -60,3 +60,16 @@ scripts/android/scatterlab-prebuilt-maven.gradle # on the iOS side only. C++ reaches Android only through this fork's Android prebuilt. ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp React/Fabric/Surface/RCTFabricSurface.mm + +# An iOS ScrollView walks its whole content after every mounting transaction and every +# few points of scrolling, to reach the views that have `removeClippedSubviews` on. Every +# mounted ScrollView does this on every transaction, and where no view has the prop on +# the walk only converts a rect per view. RCTViewComponentView now counts the live views +# that have it on, and -[RCTScrollViewComponentView _remountChildren] returns early while +# the count is 0. Upstream https://github.com/react/react-native/pull/59284 (open) has +# the same aim. The last two files also carry upstream +# https://github.com/react/react-native/pull/58915 (in 0.89), which keeps the prop on a +# recycled view. Compiled into React.xcframework, like the IME files above. +React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +React/Tests/Mounting/RCTViewComponentViewTests.mm From 7f7b7c7c4a6bba8e861ff971873b1b34ba6f9c5f Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Wed, 11 Nov 2026 16:39:28 +0900 Subject: [PATCH 5/5] =?UTF-8?q?test(scatterlab):=20=EC=88=9C=ED=9A=8C=20?= =?UTF-8?q?=EC=83=9D=EB=9E=B5=20=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=9D=98=20?= =?UTF-8?q?=EC=B9=B4=EC=9A=B4=ED=84=B0=200=20=EC=A0=84=EC=A0=9C=EC=97=90?= =?UTF-8?q?=20=EC=9D=B4=EC=9C=A0=EC=99=80=20=EC=8B=A4=ED=8C=A8=20=EB=A9=94?= =?UTF-8?q?=EC=8B=9C=EC=A7=80=EB=A5=BC=20=EB=B6=99=EC=9D=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ์ˆœํšŒ ์ƒ๋žต์€ ํ”„๋กœ์„ธ์Šค์— clipping ๋ทฐ๊ฐ€ ํ•˜๋‚˜๋„ ์—†์„ ๋•Œ๋งŒ ๊ด€์ฐฐ๋˜๋ฏ€๋กœ baseline ์ด ์•„๋‹ˆ๋ผ 0 ์„ ์š”๊ตฌํ•œ๋‹ค. ์ „์ œ๊ฐ€ ๊นจ์ง€๋ฉด ์›์ธ์ด ๋ฐ”๋กœ ๋ณด์ด๋„๋ก ๋ฉ”์‹œ์ง€๋ฅผ ๋‹จ๋‹ค. Co-Authored-By: Claude Fable 5.2 --- .../React/Tests/Mounting/RCTViewComponentViewTests.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm index f1460975c1e3..b130d4e98dfb 100644 --- a/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm +++ b/packages/react-native/React/Tests/Mounting/RCTViewComponentViewTests.mm @@ -241,7 +241,8 @@ - (void)testClippingViewCountFollowsRepeatedUpdatesRecyclingAndDealloc - (void)testScrollViewSkipsClippingWalkWhileNoViewClips { - XCTAssertEqual(RCTViewComponentViewClippingViewCount(), 0); + // The skip only shows while no view in the process clips, so this needs 0 rather than a baseline. + XCTAssertEqual(RCTViewComponentViewClippingViewCount(), 0, @"A clipping view from outside this test is alive."); RCTClippingWalkSpyView *spy = [RCTClippingWalkSpyView new]; RCTViewComponentView *content = [RCTViewComponentView new];