@@ -2607,3 +2607,35 @@ describe('horizontal ScrollView in RTL script', () => {
26072607 ] ) ;
26082608 } ) ;
26092609} ) ;
2610+
2611+ describe ( 'Views with no layout' , ( ) => {
2612+ it ( 'are not culled' , ( ) => {
2613+ const root = Fantom . createRoot ( { viewportWidth : 100 , viewportHeight : 100 } ) ;
2614+
2615+ Fantom . runTask ( ( ) => {
2616+ root . render (
2617+ < ScrollView style = { { height : 100 , width : 100 } } >
2618+ < View nativeID = { 'viewWithLayout' } style = { { height : 100 , width : 100 } } />
2619+ < View style = { { height : 1000 , width : 100 } } />
2620+ < View
2621+ nativeID = { 'culledViewWithLayout' }
2622+ style = { { height : 100 , width : 100 } }
2623+ />
2624+ < View nativeID = { 'viewWithoutLayout' } style = { { height : 0 , width : 0 } } />
2625+ </ ScrollView > ,
2626+ ) ;
2627+ } ) ;
2628+
2629+ expect ( root . takeMountingManagerLogs ( ) ) . toEqual ( [
2630+ 'Update {type: "RootView", nativeID: (root)}' ,
2631+ 'Create {type: "ScrollView", nativeID: (N/A)}' ,
2632+ 'Create {type: "View", nativeID: (N/A)}' ,
2633+ 'Create {type: "View", nativeID: "viewWithLayout"}' ,
2634+ 'Create {type: "View", nativeID: "viewWithoutLayout"}' ,
2635+ 'Insert {type: "View", parentNativeID: (N/A), index: 0, nativeID: "viewWithLayout"}' ,
2636+ 'Insert {type: "View", parentNativeID: (N/A), index: 1, nativeID: "viewWithoutLayout"}' ,
2637+ 'Insert {type: "View", parentNativeID: (N/A), index: 0, nativeID: (N/A)}' ,
2638+ 'Insert {type: "ScrollView", parentNativeID: (root), index: 0, nativeID: (N/A)}' ,
2639+ ] ) ;
2640+ } ) ;
2641+ } ) ;
0 commit comments