Title: [171816] trunk/Source/WebKit2
Revision
171816
Author
[email protected]
Date
2014-07-30 14:03:31 -0700 (Wed, 30 Jul 2014)

Log Message

Get rid of the WKNSURLProtectionSpace wrapper
https://bugs.webkit.org/show_bug.cgi?id=135425

Reviewed by Sam Weinig.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.

* Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
* Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
WebCore::ProtectionSpace in the WebProtectionSpace.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.

* WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (171815 => 171816)


--- trunk/Source/WebKit2/ChangeLog	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-30 21:03:31 UTC (rev 171816)
@@ -1,5 +1,27 @@
 2014-07-30  Dan Bernstein  <[email protected]>
 
+        Get rid of the WKNSURLProtectionSpace wrapper
+        https://bugs.webkit.org/show_bug.cgi?id=135425
+
+        Reviewed by Sam Weinig.
+
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
+
+        * Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
+        * Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
+
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
+        WebCore::ProtectionSpace in the WebProtectionSpace.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
+
+        * WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
+
+2014-07-30  Dan Bernstein  <[email protected]>
+
         Updated for changes to the WebCore::Credential API.
         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
 

Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (171815 => 171816)


--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm	2014-07-30 21:03:31 UTC (rev 171816)
@@ -40,7 +40,6 @@
 #import "WKNSString.h"
 #import "WKNSURL.h"
 #import "WKNSURLAuthenticationChallenge.h"
-#import "WKNSURLProtectionSpace.h"
 #import "WKNSURLRequest.h"
 #import "WKNavigationDataInternal.h"
 #import "WKProcessPoolInternal.h"
@@ -136,10 +135,6 @@
         wrapper = [WKBrowsingContextGroup alloc];
         break;
 
-    case Type::ProtectionSpace:
-        wrapper = NSAllocateObject([WKNSURLProtectionSpace class], size, nullptr);
-        break;
-
     case Type::Session:
         wrapper = [_WKWebsiteDataStore alloc];
         break;

Deleted: trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.h (171815 => 171816)


--- trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.h	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.h	2014-07-30 21:03:31 UTC (rev 171816)
@@ -1,46 +0,0 @@
-/*
- * 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 "WKFoundation.h"
-
-#if WK_API_ENABLED
-
-#import "WKObject.h"
-#import "WebProtectionSpace.h"
-
-namespace WebKit {
-
-inline NSURLProtectionSpace *wrapper(WebProtectionSpace& protectionSpace)
-{
-    ASSERT([protectionSpace.wrapper() isKindOfClass:[NSURLProtectionSpace self]]);
-    return (NSURLProtectionSpace *)protectionSpace.wrapper();
-}
-
-}
-
-@interface WKNSURLProtectionSpace : WKObject <NSCopying>
-@end
-
-#endif // WK_API_ENABLED

Deleted: trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm (171815 => 171816)


--- trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm	2014-07-30 21:03:31 UTC (rev 171816)
@@ -1,52 +0,0 @@
-/*
- * 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 "config.h"
-#import "WKNSURLProtectionSpace.h"
-
-#if WK_API_ENABLED
-
-#import <WebCore/AuthenticationMac.h>
-
-using namespace WebCore;
-using namespace WebKit;
-
-@implementation WKNSURLProtectionSpace
-
-- (NSObject *)_web_createTarget
-{
-    return [reinterpret_cast<WebProtectionSpace*>(&self._apiObject)->protectionSpace().nsSpace() copy];
-}
-
-#pragma mark NSCopying protocol implementation
-
-- (id)copyWithZone:(NSZone *)zone
-{
-    return [self retain];
-}
-
-@end
-
-#endif // WK_API_ENABLED

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (171815 => 171816)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm	2014-07-30 21:03:31 UTC (rev 171816)
@@ -45,7 +45,6 @@
 #import "WKNSError.h"
 #import "WKNSURLAuthenticationChallenge.h"
 #import "WKNSURLExtras.h"
-#import "WKNSURLProtectionSpace.h"
 #import "WKPagePolicyClientInternal.h"
 #import "WKProcessGroupPrivate.h"
 #import "WKRenderingProgressEventsInternal.h"
@@ -56,6 +55,7 @@
 #import "WebCertificateInfo.h"
 #import "WebContext.h"
 #import "WebPageProxy.h"
+#import "WebProtectionSpace.h"
 #import "_WKRemoteObjectRegistryInternal.h"
 #import <wtf/NeverDestroyed.h>
 
@@ -497,7 +497,7 @@
     auto loadDelegate = browsingContext->_loadDelegate.get();
 
     if ([loadDelegate respondsToSelector:@selector(browsingContextController:canAuthenticateAgainstProtectionSpace:)])
-        return [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextController:browsingContext canAuthenticateAgainstProtectionSpace:wrapper(*toImpl(protectionSpace))];
+        return [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextController:browsingContext canAuthenticateAgainstProtectionSpace:toImpl(protectionSpace)->protectionSpace().nsSpace()];
 
     return false;
 }

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (171815 => 171816)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-07-30 21:03:31 UTC (rev 171816)
@@ -41,7 +41,6 @@
 #import "WKHistoryDelegatePrivate.h"
 #import "WKNSURLAuthenticationChallenge.h"
 #import "WKNSURLExtras.h"
-#import "WKNSURLProtectionSpace.h"
 #import "WKNSURLRequest.h"
 #import "WKNavigationActionInternal.h"
 #import "WKNavigationDataInternal.h"
@@ -54,6 +53,7 @@
 #import "WebFrameProxy.h"
 #import "WebPageProxy.h"
 #import "WebProcessProxy.h"
+#import "WebProtectionSpace.h"
 #import "_WKErrorRecoveryAttempting.h"
 #import "_WKFrameHandleInternal.h"
 #import <WebCore/Credential.h>
@@ -700,7 +700,7 @@
     if (!navigationDelegate)
         return false;
 
-    return [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView canAuthenticateAgainstProtectionSpace:wrapper(*protectionSpace)];
+    return [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView canAuthenticateAgainstProtectionSpace:protectionSpace->protectionSpace().nsSpace()];
 }
 
 void NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame(WebPageProxy*, WebFrameProxy*, AuthenticationChallengeProxy* authenticationChallenge)

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (171815 => 171816)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-07-30 20:55:29 UTC (rev 171815)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-07-30 21:03:31 UTC (rev 171816)
@@ -708,8 +708,6 @@
 		37183D57182F4E700080C811 /* WKNSURLExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 37183D55182F4E700080C811 /* WKNSURLExtras.h */; };
 		371A19411824D29300F32A5E /* WKNSDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 371A193F1824D29300F32A5E /* WKNSDictionary.mm */; };
 		371A19421824D29300F32A5E /* WKNSDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 371A19401824D29300F32A5E /* WKNSDictionary.h */; };
-		371B32DD184D67490013E2B2 /* WKNSURLProtectionSpace.mm in Sources */ = {isa = PBXBuildFile; fileRef = 371B32DB184D67480013E2B2 /* WKNSURLProtectionSpace.mm */; };
-		371B32DE184D67490013E2B2 /* WKNSURLProtectionSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 371B32DC184D67490013E2B2 /* WKNSURLProtectionSpace.h */; };
 		372CAF0B1833FD910040AC27 /* WKNSError.h in Headers */ = {isa = PBXBuildFile; fileRef = 372CAF091833FD910040AC27 /* WKNSError.h */; };
 		372CAF0C1833FD910040AC27 /* WKNSError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 372CAF0A1833FD910040AC27 /* WKNSError.mm */; };
 		373CEAD5185417AE008C363D /* WKNSData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 373CEAD3185417AE008C363D /* WKNSData.mm */; };
@@ -2727,8 +2725,6 @@
 		37183D55182F4E700080C811 /* WKNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSURLExtras.h; sourceTree = "<group>"; };
 		371A193F1824D29300F32A5E /* WKNSDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSDictionary.mm; sourceTree = "<group>"; };
 		371A19401824D29300F32A5E /* WKNSDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSDictionary.h; sourceTree = "<group>"; };
-		371B32DB184D67480013E2B2 /* WKNSURLProtectionSpace.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSURLProtectionSpace.mm; sourceTree = "<group>"; };
-		371B32DC184D67490013E2B2 /* WKNSURLProtectionSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSURLProtectionSpace.h; sourceTree = "<group>"; };
 		372CAF091833FD910040AC27 /* WKNSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSError.h; sourceTree = "<group>"; };
 		372CAF0A1833FD910040AC27 /* WKNSError.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSError.mm; sourceTree = "<group>"; };
 		373CEAD3185417AE008C363D /* WKNSData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSData.mm; sourceTree = "<group>"; };
@@ -5114,8 +5110,6 @@
 				378E1A4B18208D700031007A /* WKNSURL.mm */,
 				37183D55182F4E700080C811 /* WKNSURLExtras.h */,
 				37183D54182F4E700080C811 /* WKNSURLExtras.mm */,
-				371B32DC184D67490013E2B2 /* WKNSURLProtectionSpace.h */,
-				371B32DB184D67480013E2B2 /* WKNSURLProtectionSpace.mm */,
 				37BF2F041947DEB400723C48 /* WKNSURLRequest.h */,
 				37BF2F051947DEB400723C48 /* WKNSURLRequest.mm */,
 				378E1A3F181EDA010031007A /* WKObject.h */,
@@ -7127,7 +7121,6 @@
 				B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
 				528C37C1195CBB1A00D8B9CC /* WKBackForwardListPrivate.h in Headers */,
 				2989A414167D184B004F96D2 /* CustomProtocolManager.h in Headers */,
-				371B32DE184D67490013E2B2 /* WKNSURLProtectionSpace.h in Headers */,
 				2984F589164BA095004BC0C6 /* CustomProtocolManagerMessages.h in Headers */,
 				C5FA1ED318E1062200B3F402 /* WKAirPlayRoutePicker.h in Headers */,
 				29AD3093164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h in Headers */,
@@ -8970,7 +8963,6 @@
 				2D2ADF1016364D8200197E47 /* PDFPluginChoiceAnnotation.mm in Sources */,
 				2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */,
 				2D2ADF0916362DD500197E47 /* PDFPluginTextAnnotation.mm in Sources */,
-				371B32DD184D67490013E2B2 /* WKNSURLProtectionSpace.mm in Sources */,
 				BCC43ABA127B95DC00317F16 /* PlatformPopupMenuData.cpp in Sources */,
 				1A6FB7D211E651E200DB1371 /* Plugin.cpp in Sources */,
 				31A67E0C165B2A99006CBA66 /* PlugInAutoStartProvider.cpp in Sources */,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to