Source/WebKit/ChangeLog

 12020-02-11 Wenson Hsieh <wenson_hsieh@apple.com>
 2
 3 macCatalyst: Unable to grab scrollbar on editable text field
 4 https://bugs.webkit.org/show_bug.cgi?id=207615
 5 <rdar://problem/59212993>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 In macCatalyst, hovering over the scrollbar (an instance of the internal UIKit class
 10 `_UIScrollViewScrollIndicator`) is required in order for a click and drag with the mouse to actually move the
 11 scrollbar. This is because UIKit depends on the cursor interaction added to this view to recognize and call its
 12 delegate methods.
 13
 14 However, we override hit-testing in WebKit to skip over all children of scroll views, and instead force hit-
 15 testing to find the scroll view instead. This means that UIKit can never hit-test to the scroll indicator views
 16 embedded directly beneath each WKChildScrollView, so the cursor interactions described earlier will not
 17 recognize. To work around this, special case these scroll indicator views, such that we will allow
 18 -hitTest:withEvent: to find these views.
 19
 20 * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
 21 (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
 22
1232020-02-11 Wenson Hsieh <wenson_hsieh@apple.com>
224
325 WebPage::getFocusedElementInformation should be robust when the focused element changes during layout

Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm

@@- (UIView *)_web_findDescendantViewAtPoint:(CGPoint)point withEvent:(UIEvent *)e
181181 }
182182 }
183183
 184 if ([NSStringFromClass(view.class) isEqualToString:@"_UIScrollViewScrollIndicator"] && [view.superview isKindOfClass:WKChildScrollView.class]) {
 185 if (WebKit::isScrolledBy((WKChildScrollView *)view.superview, viewsAtPoint.last())) {
 186 LOG_WITH_STREAM(UIHitTesting, stream << " " << (void*)view << " is the scroll indicator of child scroll view, which is scrolled by " << (void*)viewsAtPoint.last());
 187 return view;
 188 }
 189 }
 190
184191 LOG_WITH_STREAM(UIHitTesting, stream << " ignoring " << [view class] << " " << (void*)view);
185192 }
186193