Bug 145957 - [Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
Summary: [Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
: 146638 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-13 12:37 PDT by mitz
Modified: 2015-07-06 16:50 PDT (History)
4 users (show)

See Also:


Attachments
Add -[id <WKUIDelegate> webViewDidClose:] (6.20 KB, patch)
2015-06-13 14:02 PDT, mitz
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2015-06-13 12:37:26 PDT
UIClient::close is currently exposed only view WKUIDelegatePrivate. Expose it via the public WKUIDelegate.
Comment 1 mitz 2015-06-13 14:02:33 PDT
Created attachment 254856 [details]
Add -[id <WKUIDelegate> webViewDidClose:]
Comment 2 Alexey Proskuryakov 2015-06-13 21:59:17 PDT
Comment on attachment 254856 [details]
Add -[id <WKUIDelegate> webViewDidClose:]

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

> Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:65
> +- (void)webViewDidClose:(WKWebView *)webView;

I was told that we always - always! - add availability macros to new APIs.
Comment 3 mitz 2015-06-13 22:02:54 PDT
(In reply to comment #2)
> Comment on attachment 254856 [details]
> Add -[id <WKUIDelegate> webViewDidClose:]
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=254856&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:65
> > +- (void)webViewDidClose:(WKWebView *)webView;
> 
> I was told that we always - always! - add availability macros to new APIs.

You were lied to. There have been a couple of exceptions, but we normally don’t add availability macros in protocols.
Comment 4 Alexey Proskuryakov 2015-06-14 22:38:50 PDT
There isn't so much difference between this case and adding another error value to an enum. It would be nice to make decisions on some principle other than who bluffs more convincingly.
Comment 5 mitz 2015-06-17 09:15:43 PDT
While not part of this patch, we are going to formalize the rules and apply them to all API.
Comment 6 WebKit Commit Bot 2015-06-17 09:18:47 PDT
Comment on attachment 254856 [details]
Add -[id <WKUIDelegate> webViewDidClose:]

Clearing flags on attachment: 254856

Committed r185653: <http://trac.webkit.org/changeset/185653>
Comment 7 WebKit Commit Bot 2015-06-17 09:18:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 mitz 2015-06-20 08:58:13 PDT
(In reply to comment #5)
> While not part of this patch, we are going to formalize the rules and apply
> them to all API.

Added availability for this delegate method in r185794.
Comment 9 Anders Carlsson 2015-07-06 16:50:02 PDT
*** Bug 146638 has been marked as a duplicate of this bug. ***