Bug 207615 - macCatalyst: Unable to grab scrollbar on editable text field
Summary: macCatalyst: Unable to grab scrollbar on editable text field
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-11 22:07 PST by Wenson Hsieh
Modified: 2020-02-12 07:39 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2020-02-11 22:14 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (3.23 KB, patch)
2020-02-11 22:30 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-02-11 22:07:30 PST
<rdar://problem/59212993>
Comment 1 Wenson Hsieh 2020-02-11 22:14:22 PST
Created attachment 390493 [details]
Patch
Comment 2 Tim Horton 2020-02-11 22:17:17 PST
Comment on attachment 390493 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390493&action=review

> Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:184
> +        if ([NSStringFromClass(view.class) isEqualToString:@"_UIScrollViewScrollIndicator"] && [view.superview isKindOfClass:WKChildScrollView.class]) {

NSStringFromClass every time is probably not a great plan. Maybe look up the class from string once, keep it, and use isKindOfClass?

Or at least flip the conditions?
Comment 3 Wenson Hsieh 2020-02-11 22:22:49 PST
Comment on attachment 390493 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390493&action=review

>> Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:184
>> +        if ([NSStringFromClass(view.class) isEqualToString:@"_UIScrollViewScrollIndicator"] && [view.superview isKindOfClass:WKChildScrollView.class]) {
> 
> NSStringFromClass every time is probably not a great plan. Maybe look up the class from string once, keep it, and use isKindOfClass?
> 
> Or at least flip the conditions?

Good catch! I'll cache the class in a static helper (using dispatch_once) and pass it into -isKindOfClass.
Comment 4 Wenson Hsieh 2020-02-11 22:30:10 PST
Created attachment 390494 [details]
Patch
Comment 5 WebKit Commit Bot 2020-02-12 07:38:42 PST
The commit-queue encountered the following flaky tests while processing attachment 390494 [details]:

editing/spelling/spellcheck-attribute.html bug 206178 (authors: g.czajkowski@samsung.com, mark.lam@apple.com, and rniwa@webkit.org)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2020-02-12 07:39:20 PST
Comment on attachment 390494 [details]
Patch

Clearing flags on attachment: 390494

Committed r256433: <https://trac.webkit.org/changeset/256433>
Comment 7 WebKit Commit Bot 2020-02-12 07:39:22 PST
All reviewed patches have been landed.  Closing bug.