Title: [170214] trunk/Source/WebKit2
- Revision
- 170214
- Author
- [email protected]
- Date
- 2014-06-20 15:10:37 -0700 (Fri, 20 Jun 2014)
Log Message
WebKit delegate methods should document their default behaviors
https://bugs.webkit.org/show_bug.cgi?id=134132
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (170213 => 170214)
--- trunk/Source/WebKit2/ChangeLog 2014-06-20 22:06:11 UTC (rev 170213)
+++ trunk/Source/WebKit2/ChangeLog 2014-06-20 22:10:37 UTC (rev 170214)
@@ -1,3 +1,13 @@
+2014-06-20 Geoffrey Garen <[email protected]>
+
+ WebKit delegate methods should document their default behaviors
+ https://bugs.webkit.org/show_bug.cgi?id=134132
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+ * UIProcess/API/Cocoa/WKUIDelegate.h:
+
2014-06-20 Simon Fraser <[email protected]>
Fix lots of WK2 test crashes.
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h (170213 => 170214)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h 2014-06-20 22:06:11 UTC (rev 170213)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h 2014-06-20 22:10:37 UTC (rev 170214)
@@ -69,6 +69,7 @@
triggering the navigation request.
@param decisionHandler The decision handler to call to allow or cancel the
navigation. The argument is one of the constants of the enumerated type WKNavigationActionPolicy.
+ @discussion If you do not implement this method, the web view will load the request or, if appropriate, forward it to another application.
*/
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;
@@ -79,6 +80,7 @@
response.
@param decisionHandler The decision handler to call to allow or cancel the
navigation. The argument is one of the constants of the enumerated type WKNavigationResponsePolicy.
+ @discussion If you do not implement this method, the web view will allow the response, if the web view can show it.
*/
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler;
@@ -131,6 +133,7 @@
NSURLSessionAuthChallengeDisposition. When disposition is NSURLSessionAuthChallengeUseCredential,
the credential argument is the credential to use, or nil to indicate continuing without a
credential.
+ @discussion If you do not implement this method, the web view will respond to the authentication challenge with the NSURLSessionAuthChallengeRejectProtectionSpace disposition.
*/
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h (170213 => 170214)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h 2014-06-20 22:06:11 UTC (rev 170213)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h 2014-06-20 22:10:37 UTC (rev 170214)
@@ -49,6 +49,8 @@
@param windowFeatures Window features requested by the webpage.
@result A new web view or nil.
@discussion The web view returned must be created with the specified configuration. WebKit will load the request in the returned web view.
+
+ If you do not implement this method, the web view will cancel the navigation.
*/
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures;
@@ -63,6 +65,8 @@
that a specific website controls the content in this panel. A simple forumla
for identifying the controlling website is frame.request.URL.host.
The panel should have a single OK button.
+
+ If you do not implement this method, the web view will behave as if the user selected the OK button.
*/
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)())completionHandler;
@@ -77,6 +81,8 @@
that a specific website controls the content in this panel. A simple forumla
for identifying the controlling website is frame.request.URL.host.
The panel should have two buttons, such as OK and Cancel.
+
+ If you do not implement this method, the web view will behave as if the user selected the Cancel button.
*/
- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler;
@@ -93,6 +99,8 @@
for identifying the controlling website is frame.request.URL.host.
The panel should have two buttons, such as OK and Cancel, and a field in
which to enter text.
+
+ If you do not implement this method, the web view will behave as if the user selected the Cancel button.
*/
- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString *result))completionHandler;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes