Remove unused API enums
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Apr 2014 01:42:03 +0000 (01:42 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Apr 2014 01:42:03 +0000 (01:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131836

Reviewed by Tim Horton.

Source/WebKit2:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

Tools:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:decidePolicyForNavigationResponse:decisionHandler:]):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegate.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Tools/ChangeLog
Tools/MiniBrowser/mac/WK2BrowserWindowController.m

index 3ac5a83..882826b 100644 (file)
@@ -1,3 +1,16 @@
+2014-04-17  Anders Carlsson  <andersca@apple.com>
+
+        Remove unused API enums
+        https://bugs.webkit.org/show_bug.cgi?id=131836
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegate.h:
+        (NS_ENUM):
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
+        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
+
 2014-04-17  Brent Fulgham  <bfulgham@apple.com>
 
         Make RenderLayerBacking get the timingFunction of the correct animation.
index 1d79393..bc9c59b 100644 (file)
 typedef NS_ENUM(NSInteger, WKNavigationActionPolicy) {
     WKNavigationActionPolicyCancel,
     WKNavigationActionPolicyAllow,
-
-    // FIXME: Remove this.
-    WKNavigationPolicyDecisionCancel = WKNavigationActionPolicyCancel,
-    WKNavigationPolicyDecisionAllow = WKNavigationActionPolicyAllow,
 };
 
-// FIXME: Remove this.
-typedef WKNavigationActionPolicy WKNavigationPolicyDecision;
-
 /*! @enum WKNavigationResponsePolicy
  @abstract the policy to pass back to the decision handler in webView:decidePolicyForNavigationResponse:decisionHandler:.
  @constant WKNavigationResponsePolicyCancel   Cancel the navigation.
@@ -58,15 +51,8 @@ typedef WKNavigationActionPolicy WKNavigationPolicyDecision;
 typedef NS_ENUM(NSInteger, WKNavigationResponsePolicy) {
     WKNavigationResponsePolicyCancel,
     WKNavigationResponsePolicyAllow,
-
-    // FIXME: Remove this.
-    WKNavigationResponsePolicyDecisionCancel = WKNavigationResponsePolicyCancel,
-    WKNavigationResponsePolicyDecisionAllow = WKNavigationResponsePolicyAllow,
 };
 
-// FIXME: Remove this.
-typedef WKNavigationResponsePolicy WKNavigationResponsePolicyDecision;
-
 /*! A class that conforms to WKNavigationDelegate can provide methods for deciding load policy for main frame and subframe loads
  and track load progress for main frame loads.
  */
index a2c1d07..940117a 100644 (file)
@@ -239,8 +239,8 @@ void NavigationState::PolicyClient::decidePolicyForNavigationAction(WebPageProxy
     [navigationAction _setOriginalURL:originalRequest.url()];
     [navigationAction _setUserInitiated:navigationActionData.isProcessingUserGesture];
 
-    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationAction:navigationAction.get() decisionHandler:[listener](WKNavigationPolicyDecision policyDecision) {
-        switch (policyDecision) {
+    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationAction:navigationAction.get() decisionHandler:[listener](WKNavigationActionPolicy actionPolicy) {
+        switch (actionPolicy) {
         case WKNavigationActionPolicyAllow:
             listener->use();
             break;
@@ -284,8 +284,8 @@ void NavigationState::PolicyClient::decidePolicyForResponse(WebPageProxy*, WebFr
     [navigationResponse setResponse:resourceResponse.nsURLResponse()];
     [navigationResponse setCanShowMIMEType:canShowMIMEType];
 
-    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:navigationResponse.get() decisionHandler:[listener](WKNavigationResponsePolicyDecision policyDecision) {
-        switch (policyDecision) {
+    [navigationDelegate webView:m_navigationState.m_webView decidePolicyForNavigationResponse:navigationResponse.get() decisionHandler:[listener](WKNavigationResponsePolicy responsePolicy) {
+        switch (responsePolicy) {
         case WKNavigationResponsePolicyAllow:
             listener->use();
             break;
index 369503c..84e5d43 100644 (file)
@@ -1,3 +1,13 @@
+2014-04-17  Anders Carlsson  <andersca@apple.com>
+
+        Remove unused API enums
+        https://bugs.webkit.org/show_bug.cgi?id=131836
+
+        Reviewed by Tim Horton.
+
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController webView:decidePolicyForNavigationResponse:decisionHandler:]):
+
 2014-04-16  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] A few final cleanups to the DataObject classes.
index 4f3e987..0695c2d 100644 (file)
@@ -403,10 +403,10 @@ static NSString * const WebKit2UseRemoteLayerTreeDrawingAreaKey = @"WebKit2UseRe
 
 #pragma mark WKNavigationDelegate
 
-- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicyDecision))decisionHandler
+- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler
 {
     LOG(@"decidePolicyForNavigationResponse");
-    decisionHandler(WKNavigationResponsePolicyDecisionAllow);
+    decisionHandler(WKNavigationResponsePolicyAllow);
 }
 
 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation