Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Mar 2014 05:12:19 +0000 (05:12 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Mar 2014 05:12:19 +0000 (05:12 +0000)
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
* UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
* UIProcess/API/Cocoa/WKWebView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165678 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.h
Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h [moved from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationTrigger.h with 89% similarity]
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h

index c2c482c16e01ca5795fa14a24ba339d4f3717288..dda62f99edc90e0f5c478eb2d3332699f1a03bce 100644 (file)
@@ -1,3 +1,17 @@
+2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
+
+        * UIProcess/API/Cocoa/WKBackForwardList.h:
+        * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
+        * UIProcess/API/Cocoa/WKNavigation.h:
+        * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+        (NS_ENUM):
+        * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
+        * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
+        * UIProcess/API/Cocoa/WKWebView.h:
+
 2014-03-14  Mark Rowe  <mrowe@apple.com>
 
         Fix the production build.
index 547acd083d661fec3d815bde4a5825169570398e..d15a11b0363bf0726d11cd5b0302b682a28c11fe 100644 (file)
@@ -27,7 +27,7 @@
 
 #if WK_API_ENABLED
 
-@class WKNavigation;
+#import <WebKit2/WKBackForwardListItem.h>
 
 /*! Posted when a back-forward list changes. The notification object is the WKBackForwardList
         that changed. The <code>userInfo</code> dictionary may contain the
@@ -38,25 +38,25 @@ WK_EXTERN NSString * const WKBackForwardListDidChangeNotification;
 
 /*! A key in the <code>userInfo</code> dictionary of a
         @link WKBackForwardListDidChangeNotification @/link, whose value is the
-        @link WKNavigation @/link that was appended to the list.
+        @link WKBackForwardListItem @/link that was appended to the list.
 */
 WK_EXTERN NSString * const WKBackForwardListAddedItemKey;
 
 
 /*! A key in the <code>userInfo</code> dictionary of a
         @link WKBackForwardListDidChangeNotification @/link, whose value is an NSArray of
-        @link WKNavigation@/link instances that were removed from the list.
+        @link WKBackForwardListItem@/link instances that were removed from the list.
 */
 WK_EXTERN NSString * const WKBackForwardListRemovedItemsKey;
 
 WK_API_CLASS
 @interface WKBackForwardList : NSObject
 
-@property (readonly) WKNavigation *currentItem;
-@property (readonly) WKNavigation *backItem;
-@property (readonly) WKNavigation *forwardItem;
+@property (readonly) WKBackForwardListItem *currentItem;
+@property (readonly) WKBackForwardListItem *backItem;
+@property (readonly) WKBackForwardListItem *forwardItem;
 
-- (WKNavigation *)itemAtIndex:(NSInteger)index;
+- (WKBackForwardListItem *)itemAtIndex:(NSInteger)index;
 
 @property (readonly) NSUInteger backListCount;
 @property (readonly) NSUInteger forwardListCount;
diff --git a/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h b/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h
new file mode 100644 (file)
index 0000000..654e8b3
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <Foundation/Foundation.h>
+
+WK_API_CLASS
+@interface WKBackForwardListItem : NSObject
+
+@property (readonly) NSURL *URL;
+@property (readonly) NSString *title;
+@property (readonly) NSURL *originalURL;
+
+@end
+
+#endif // WK_API_ENABLED
index 9d8dada95a13a28ef96ebf0ed86c370fdf2512bf..ad81a7836b0784440789a8501604a567ad041e9a 100644 (file)
 
 #if WK_API_ENABLED
 
-@class WKFrameInfo;
-@class WKNavigationTrigger;
-
 WK_API_CLASS
 @interface WKNavigation : NSObject
 
-// What triggered this action?
-@property (nonatomic, readonly) WKNavigationTrigger *trigger;
-
-// Where is it going?
-@property (nonatomic, readonly) NSURLRequest *originalRequest;
 @property (nonatomic, readonly) NSURLRequest *request;
-@property (nonatomic, readonly) WKFrameInfo *targetFrame;
-
-// What do we know so far? XXX: should this be factored into a separate result object? 
-@property (nonatomic, readonly) NSURLResponse *response;
-@property (nonatomic, readonly) BOOL canShowMIMEType;
-@property (readonly) NSString *title;
 
 @end
 
similarity index 89%
rename from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationTrigger.h
rename to Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h
index 475fa765025a4bcc471196a4b1247595f7f9b4e6..52f51f3e002c894091898e50fbe2dad71a261765 100644 (file)
@@ -40,12 +40,13 @@ typedef NS_ENUM(NSInteger, WKNavigationType) {
 };
 
 WK_API_CLASS
-@interface WKNavigationTrigger : NSObject
+@interface WKNavigationAction : NSObject
+
+@property (nonatomic, readonly) WKFrameInfo *sourceFrame;
+@property (nonatomic, readonly) WKFrameInfo *destinationFrame;
 
-@property (nonatomic, readonly) WKFrameInfo *originatingFrame;
 @property (nonatomic, readonly) WKNavigationType navigationType;
-@property (nonatomic, readonly) NSUInteger modifierFlags;
-@property (nonatomic, readonly) NSUInteger mouseButton;
+@property (nonatomic, readonly) NSURLRequest *request;
 
 @end
 
index 4f6704e5582a2b4bcbc0e3b11b1ca0e0e7948189..76f2f8f6302ac7db22b84997add77d487014c6ae 100644 (file)
@@ -29,6 +29,8 @@
 #if WK_API_ENABLED
 
 @class WKNavigation;
+@class WKNavigationAction;
+@class WKNavigationResponse;
 @class WKWebView;
 
 typedef NS_ENUM(NSInteger, WKNavigationPolicyDecision) {
@@ -37,12 +39,18 @@ typedef NS_ENUM(NSInteger, WKNavigationPolicyDecision) {
     WKNavigationPolicyDecisionDownload
 };
 
+typedef NS_ENUM(NSInteger, WKNavigationResponsePolicyDecision) {
+    WKNavigationResponsePolicyDecisionCancel,
+    WKNavigationResponsePolicyDecisionAllow,
+    WKNavigationResponsePolicyDecisionBecomeDownload
+};
+
 @protocol WKNavigationDelegate <NSObject>
 
 @optional
 
-- (void)webView:(WKWebView *)webView decideActionPolicyForNavigation:(WKNavigation *)navigation decisionHandler:(void (^)(WKNavigationPolicyDecision))decisionHandler;
-- (void)webView:(WKWebView *)webView decideResponsePolicyForNavigation:(WKNavigation *)navigationResponse decisionHandler:(void (^)(WKNavigationPolicyDecision))decisionHandler;
+- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationPolicyDecision))decisionHandler;
+- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicyDecision))decisionHandler;
 
 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation;
 - (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation;
diff --git a/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h b/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h
new file mode 100644 (file)
index 0000000..7dfc755
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+@class WKFrameInfo;
+
+WK_API_CLASS
+@interface WKNavigationResponse : NSObject
+
+@property (nonatomic, readonly) WKFrameInfo *frame;
+@property (nonatomic, readonly) NSURLResponse *response;
+@property (nonatomic, readonly) BOOL canShowMIMEType;
+
+@end
+
+#endif
index d6bd63d682d8ae15c6e89c659051bcf5c2fe4d7e..c5a361f8bb389524c4f1ac979d8513f1b31095b2 100644 (file)
@@ -35,6 +35,7 @@
 #endif
 
 @class WKBackForwardList;
+@class WKBackForwardListItem;
 @class WKNavigation;
 @class WKWebViewConfiguration;
 
@@ -58,7 +59,6 @@ WK_API_CLASS
 @property (nonatomic, readonly) WKWebViewConfiguration *configuration;
 
 @property (nonatomic, weak) id <WKNavigationDelegate> navigationDelegate;
-@property (nonatomic, weak) id <WKNavigationDelegate> subframeNavigationDelegate;
 
 @property (nonatomic, weak) id <WKUIDelegate> UIDelegate;
 
@@ -84,10 +84,10 @@ WK_API_CLASS
 /*! @abstract Navigates to an item from the back-forward list and sets it as the current item.
  @param item The item to navigate to. Must be one of the items in the receiver's back-forward
  list.
- @result A new navigation to requested item, or nil if it is the current item. 
+ @result A new navigation to requested item, or nil if it is the current item.
  @seealso backForwardList
  */
-- (WKNavigation *)goToBackForwardListItem:(WKNavigation *)item;
+- (WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item;
 
 - (IBAction)stopLoading:(id)sender;