Bug 184107 - WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
Summary: WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-28 12:34 PDT by Dean Jackson
Modified: 2018-03-28 13:24 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.05 KB, patch)
2018-03-28 12:38 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (4.18 KB, patch)
2018-03-28 12:43 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (4.84 KB, patch)
2018-03-28 12:53 PDT, Dean Jackson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2018-03-28 12:34:56 PDT
WKWebViewContentProvider shouldn't be a UIScrollViewDelegate
Comment 1 Radar WebKit Bug Importer 2018-03-28 12:35:28 PDT
<rdar://problem/38967492>
Comment 2 Dean Jackson 2018-03-28 12:38:48 PDT
Created attachment 336694 [details]
Patch
Comment 3 Tim Horton 2018-03-28 12:40:28 PDT
Comment on attachment 336694 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h:45
>  @protocol WKWebViewContentProvider <NSObject, UIScrollViewDelegate>

‽‽‽ still a UIScrollViewDelegate
Comment 4 Tim Horton 2018-03-28 12:43:03 PDT
Comment on attachment 336694 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h:47
>  - (instancetype)web_initWithFrame:(CGRect) frame webView:(WKWebView *)webView;

It’s a little weirder now that the forwarding of scrollViewDidScroll is magical. Probably should be web_scrollViewDidScroll and just be a normal part of the WKWebViewContentProvider protocol.
Comment 5 Dean Jackson 2018-03-28 12:43:42 PDT
Created attachment 336695 [details]
Patch
Comment 6 Dean Jackson 2018-03-28 12:53:55 PDT
Created attachment 336700 [details]
Patch
Comment 7 Dean Jackson 2018-03-28 13:12:04 PDT
Committed r230041: <https://trac.webkit.org/changeset/230041>
Comment 8 mitz 2018-03-28 13:24:05 PDT
Comment on attachment 336700 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:2432
> +        [_customContentView web_scrollViewDidScroll:(UIScrollView *)scrollView];

Why was the cast needed? Is it still needed?