@@ -80,50 +80,14 @@ - (CGRect)frame {
8080- (NSArray <id<UIFocusItem>>*)focusItemsInRect : (CGRect)rect {
8181 // It seems the iOS focus system rely heavily on this method (instead of
8282 // preferredFocusEnvironments) for directional navigation.
83- // The order of the items seems to be important, menus and dialogs become
84- // unreachable via FKA if the returned children are organized
85- // in hit-test order.
83+ // Whether the item order in the returned array matters is unknown.
8684 //
8785 // Additionally, this method is only supposed to return items within the given
8886 // rect but returning everything in the subtree seems to work fine.
89- NSMutableArray <SemanticsObject*>* reversedItems =
90- [[NSMutableArray alloc ] initWithCapacity: self .childrenInHitTestOrder.count];
91- for (NSUInteger i = 0 ; i < self.childrenInHitTestOrder .count ; ++i) {
92- [reversedItems
93- addObject: self .childrenInHitTestOrder[self .childrenInHitTestOrder.count - 1 - i]];
94- }
95- return reversedItems;
87+ return self.childrenInHitTestOrder ;
9688}
9789
9890- (id <UICoordinateSpace>)coordinateSpace {
9991 return self.bridge ->view ();
10092}
10193@end
102-
103- @interface FlutterScrollableSemanticsObject ()
104- @property (nonatomic , readonly ) UIScrollView* scrollView;
105- @end
106-
107- @interface FlutterScrollableSemanticsObject (UIFocusItemScrollableContainer) <
108- UIFocusItemScrollableContainer>
109- @end
110-
111- @implementation FlutterScrollableSemanticsObject (UIFocusItemScrollableContainer)
112- - (CGPoint)contentOffset {
113- return self.scrollView .contentOffset ;
114- }
115-
116- - (void )setContentOffset : (CGPoint)contentOffset {
117- // TODO(LongCatIsLooong): implement. This method is called by the focus engine
118- // to make the focused content visible in a scroll view when FKA is on.
119- }
120-
121- - (CGSize)contentSize {
122- return self.scrollView .contentSize ;
123- }
124-
125- - (CGSize)visibleSize {
126- return self.scrollView .frame .size ;
127- }
128-
129- @end
0 commit comments