Bug 176474 - Add WKUIDelegatePrivate equivalent of WKPageUIClient's pinnedStateDidChange
Summary: Add WKUIDelegatePrivate equivalent of WKPageUIClient's pinnedStateDidChange
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: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-06 12:45 PDT by Alex Christensen
Modified: 2018-01-27 10:14 PST (History)
3 users (show)

See Also:


Attachments
Patch (12.28 KB, patch)
2017-09-06 12:50 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (12.46 KB, patch)
2017-09-06 12:57 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (12.50 KB, patch)
2017-09-06 13:04 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (12.60 KB, patch)
2017-09-06 15:23 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-09-06 12:45:06 PDT
Add WKUIDelegatePrivate equivalent of WKPageUIClient's pinnedStateDidChange
Comment 1 Alex Christensen 2017-09-06 12:50:14 PDT
Created attachment 320049 [details]
Patch
Comment 2 Tim Horton 2017-09-06 12:55:48 PDT
Comment on attachment 320049 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5284
> +- (_WKRectEdge) _pinnedState

No space after the )

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5289
> +- (_WKRectEdge) _rubberBandState

etc.

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:5294
> +- (void) _setRubberBandState:(_WKRectEdge)state

This really isn't state, I wonder if we should take this opportunity to rename it to rubberBandingEnabled or rubberBandableEdges (please no) or something :P

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:83
> +typedef NS_OPTIONS(NSInteger, _WKRectEdge) {

It would be pretty nice if this were a NSRectEdge or UIRectEdge typedef, wouldn't it? As it stands people are going to have to do silly things to use this API where they probably have platform edges in their code.
Comment 3 Alex Christensen 2017-09-06 12:57:29 PDT
Created attachment 320051 [details]
Patch
Comment 4 Alex Christensen 2017-09-06 13:04:59 PDT
Created attachment 320054 [details]
Patch
Comment 5 Alex Christensen 2017-09-06 13:16:02 PDT
http://trac.webkit.org/r221694
Comment 6 Alex Christensen 2017-09-06 13:54:38 PDT
Reverted r221694 for reason:

broke build

Committed r221702: <http://trac.webkit.org/changeset/221702>
Comment 7 Alex Christensen 2017-09-06 15:23:35 PDT
Created attachment 320066 [details]
Patch
Comment 8 Alex Christensen 2017-09-06 16:27:59 PDT
http://trac.webkit.org/r221707
Comment 9 Radar WebKit Bug Importer 2017-09-27 12:40:39 PDT
<rdar://problem/34693736>
Comment 10 mitz 2018-01-27 10:14:15 PST
Comment on attachment 320066 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:83
> +typedef NS_OPTIONS(NSInteger, _WKRectEdge) {

Options should be NSUInteger.

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:252
> +@property (nonatomic, readonly) _WKRectEdge _pinnedState;
> +@property (nonatomic, setter=_setRubberBandingEnabled:) _WKRectEdge _rubberBandingEnabled;

Missing availability.