WebKit Bugzilla
Attachment 341984 Details for
Bug 186314
: [Cocoa] More preparation for ARC, focusing on WebKit and smart pointers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186314-20180605124616.patch (text/plain), 96.09 KB, created by
Darin Adler
on 2018-06-05 12:46:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-05 12:46:17 PDT
Size:
96.09 KB
patch
obsolete
>Subversion Revision: 232519 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 6a541f08eb960b5890227894dcfd6535022794a7..bcfcf588ae70b2c82c151f6cae1ab35b6cdfe102 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-05 Darin Adler <darin@apple.com> >+ >+ [Cocoa] More preparation for ARC, focusing on WebKit and smart pointers >+ https://bugs.webkit.org/show_bug.cgi?id=186314 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/BlockPtr.h: Put Block_copy/release calls into #if since they are >+ not needed under ARC. >+ >+ * wtf/OSObjectPtr.h: Added constructor and assignment operator so we can >+ work with OS objects without adopting them. >+ > 2018-06-05 Darin Adler <darin@apple.com> > > [Cocoa] Improve some soft linking compatibility with ARC >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d636609672fc828f4286bb58600793b2fce0fd07..d23f578edf440b3d0247eaf3f97df0c0733e3210 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,183 @@ >+2018-06-05 Darin Adler <darin@apple.com> >+ >+ [Cocoa] More preparation for ARC, focusing on WebKit and smart pointers >+ https://bugs.webkit.org/show_bug.cgi?id=186314 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm: >+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Use __bridge for cast. >+ * NetworkProcess/mac/NetworkProcessMac.mm: >+ (WebKit::overrideSystemProxies): Ditto. >+ (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost): Ditto. >+ * Platform/IPC/mac/ConnectionMac.mm: >+ (IPC::Connection::sendMessage): Ditto. >+ (IPC::readFromMachPort): Ditto. >+ >+ * Platform/mac/StringUtilities.mm: >+ (WebKit::formattedPhoneNumberString): Use __bridge for cast and >+ CFBridgingRelease instead of an explicit autorelease. >+ >+ * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: >+ (initializeMethods): Use auto instead of an explicit type so that we get >+ the correct type for the result of protocol_copyProtocolList. >+ >+ * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: >+ (-[_WKRemoteObjectRegistry _sendInvocation:interface:]): Added a >+ bridging cast to void* because that's needed to call _Block_signature >+ under ARC and harmless outside ARC. >+ >+ * Shared/API/c/cf/WKStringCF.mm: >+ (WKStringCreateWithCFString): Use __bridge for cast. >+ * Shared/API/c/cf/WKURLCF.mm: >+ (WKURLCreateWithCFURL): Ditto. >+ * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: >+ (WebKit::AuthenticationManager::initializeConnection): Ditto. >+ * Shared/Cocoa/DataDetectionResult.mm: >+ (WebKit::DataDetectionResult::encode const): Ditto. >+ (WebKit::DataDetectionResult::decode): Ditto. >+ * Shared/Cocoa/WKNSError.mm: >+ (-[WKNSError _web_createTarget]): Ditto. >+ * Shared/Cocoa/WKNSURLExtras.mm: >+ (-[NSURL _web_originalDataAsWTFString]): Ditto. >+ >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: >+ (WebKit::XPCServiceInitializer): Removed balanced calls to both >+ adoptOSObject and xpc_retain and instead rely on the assignment >+ operator just added to OSObjectPtr. >+ >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: >+ (WebKit::XPCServiceEventHandler): Use __bridge for cast. >+ * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: >+ (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): Ditto. >+ * Shared/cf/ArgumentCodersCF.cpp: >+ (IPC::decode): Ditto. >+ * Shared/mac/ArgumentCodersMac.mm: >+ (IPC::isSerializableValue): Ditto. >+ (IPC::encode): Ditto. >+ * Shared/mac/WebCoreArgumentCodersMac.mm: >+ (IPC::encodeNSError): Ditto. Also use CFSTR("")" instead of @"" >+ when we need a CFString. >+ (IPC::decodeNSError): Ditto. >+ (IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Ditto. >+ (IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Ditto. >+ (IPC::ArgumentCoder<Credential>::encodePlatformData): Ditto. >+ (IPC::ArgumentCoder<Credential>::decodePlatformData): Ditto. >+ (IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode): Ditto. >+ (IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode): Ditto. >+ (IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto. >+ (IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto. >+ * Shared/mac/WebHitTestResultData.mm: >+ (WebKit::WebHitTestResultData::platformEncode const): Ditto. >+ (WebKit::WebHitTestResultData::platformDecode): Ditto. >+ * UIProcess/API/C/mac/WKContextPrivateMac.mm: >+ (WKContextIsPlugInUpdateAvailable): Ditto. >+ * UIProcess/API/Cocoa/WKBrowsingContextController.mm: >+ (-[WKBrowsingContextController certificateChain]): Ditto. >+ (didStartProvisionalLoadForFrame): Ditto. >+ (didReceiveServerRedirectForProvisionalLoadForFrame): Ditto. >+ (didFailProvisionalLoadWithErrorForFrame): Ditto. >+ (didCommitLoadForFrame): Ditto. >+ (didFinishLoadForFrame): Ditto. >+ (didFailLoadWithErrorForFrame): Ditto. >+ (canAuthenticateAgainstProtectionSpaceInFrame): Ditto. >+ (didReceiveAuthenticationChallengeInFrame): Ditto. >+ (didStartProgress): Ditto. >+ (didChangeProgress): Ditto. >+ (didFinishProgress): Ditto. >+ (didChangeBackForwardList): Ditto. >+ (processDidCrash): Ditto. >+ (setUpPageLoaderClient): Ditto. >+ (setUpPagePolicyClient): Ditto. >+ * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm: >+ (createWKArray): Ditto. >+ (-[WKBrowsingContextGroup addUserStyleSheet:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:mainFrameOnly:]): Ditto. >+ (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]): Ditto. >+ * UIProcess/API/Cocoa/WKConnection.mm: >+ (didReceiveMessage): Ditto. >+ (didClose): Ditto. >+ (setUpClient): Ditto. >+ * UIProcess/API/Cocoa/WKProcessGroup.mm: >+ (didCreateConnection): Ditto. >+ (getInjectedBundleInitializationUserData): Ditto. >+ (setUpInjectedBundleClient): Ditto. >+ (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto. >+ * UIProcess/API/Cocoa/WKProcessPool.mm: >+ (-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]): Ditto. >+ * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: >+ (-[WKWebsiteDataStore _setProxyConfiguration:]): Ditto. >+ (-[WKWebsiteDataStore _proxyConfiguration]): Ditto. >+ * UIProcess/API/Cocoa/_WKThumbnailView.mm: >+ (-[_WKThumbnailView _didTakeSnapshot:]): Ditto. >+ >+ * UIProcess/API/Cocoa/_WKUserContentFilter.mm: Added a missing include. >+ >+ * UIProcess/Authentication/mac/WebCredentialMac.mm: >+ (WebKit::chain): Use __bridge for cast. >+ >+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm: >+ (WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory): >+ Use CFBridgingRelease instead of adoptNS. >+ (WebKit::privateBrowsingSession): Use __bridge for cast. >+ >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::provideDataForPasteboard): Use __bridge for cast. >+ * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: >+ (WebKit::PluginInfoStore::pluginPathsInDirectory): Ditto. >+ * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: >+ (WebKit::recursivelyMapIOSurfaceBackingStore): Ditto. >+ * UIProcess/mac/ViewGestureControllerMac.mm: >+ (WebKit::ViewGestureController::beginSwipeGesture): Ditto. >+ * UIProcess/mac/WKFullScreenWindowController.mm: >+ (-[WKFullScreenWindowController enterFullScreen:]): Ditto. >+ * UIProcess/mac/WebPopupMenuProxyMac.mm: >+ (WebKit::WebPopupMenuProxyMac::showPopupMenu): Ditto. >+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: >+ (didCreatePage): Ditto. >+ (willDestroyPage): Ditto. >+ (setUpBundleClient): Ditto. >+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: >+ (didStartProvisionalLoadForFrame): Ditto. >+ (didReceiveServerRedirectForProvisionalLoadForFrame): Ditto. >+ (didFinishLoadForFrame): Ditto. >+ (globalObjectIsAvailableForFrame): Ditto. >+ (didRemoveFrameFromHierarchy): Ditto. >+ (didCommitLoadForFrame): Ditto. >+ (didFinishDocumentLoadForFrame): Ditto. >+ (didFailProvisionalLoadWithErrorForFrame): Ditto. >+ (didFailLoadWithErrorForFrame): Ditto. >+ (didSameDocumentNavigationForFrame): Ditto. >+ (didLayoutForFrame): Ditto. >+ (didReachLayoutMilestone): Ditto. >+ (didFirstVisuallyNonEmptyLayoutForFrame): Ditto. >+ (didHandleOnloadEventsForFrame): Ditto. >+ (userAgentForURL): Ditto. >+ (setUpPageLoaderClient): Ditto. >+ (willSendRequestForFrame): Ditto. >+ (didInitiateLoadForResource): Ditto. >+ (didFinishLoadForResource): Ditto. >+ (didFailLoadForResource): Ditto. >+ (setUpResourceLoadClient): Ditto. >+ * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: >+ (WebKit::InjectedBundle::initialize): Ditto. >+ * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: >+ (WebKit::NetscapePlugin::popUpContextMenu): Ditto. >+ >+ * WebProcess/Plugins/PDF/PDFPlugin.h: Put functions that return NSData inside >+ an #ifdef __OBJC__ and use __bridge for cast. >+ >+ * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: >+ (WebKit::WebDragClient::declareAndWriteDragImage): Use __bridge for cast. >+ >+ * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm: >+ (WebKit::PlatformCALayerRemoteCustom::contents const): Added a bridging cast. >+ (WebKit::PlatformCALayerRemoteCustom::setContents): Use __bridge for cast. >+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: >+ (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom): Ditto. >+ * WebProcess/WebPage/mac/WebPageMac.mm: >+ (WebKit::WebPage::setTopOverhangImage): Ditto. >+ (WebKit::WebPage::setBottomOverhangImage): Ditto. >+ > 2018-06-05 Youenn Fablet <youenn@apple.com> > > ServiceWorker registration should store any script fetched through importScripts >diff --git a/Source/WTF/wtf/BlockPtr.h b/Source/WTF/wtf/BlockPtr.h >index ae9e7fbcf3b4f2d41750a247980409acc4a318f1..1258fdd639904fc7491810ccaca9fc16dba3202a 100644 >--- a/Source/WTF/wtf/BlockPtr.h >+++ b/Source/WTF/wtf/BlockPtr.h >@@ -97,8 +97,12 @@ public: > > new (&block->f) F { std::move(function) }; > >+#if defined(__OBJC__) && __has_feature(objc_arc) >+ BlockPtr blockPtr { (__bridge_transfer BlockType)block }; >+#else > BlockPtr blockPtr; > blockPtr.m_block = reinterpret_cast<BlockType>(block); >+#endif > > return blockPtr; > } >@@ -109,12 +113,20 @@ public: > } > > BlockPtr(BlockType block) >+#if defined(__OBJC__) && __has_feature(objc_arc) >+ : m_block(block) >+#else > : m_block(Block_copy(block)) >+#endif > { > } > > BlockPtr(const BlockPtr& other) >+#if defined(__OBJC__) && __has_feature(objc_arc) >+ : m_block(other.m_block) >+#else > : m_block(Block_copy(other.m_block)) >+#endif > { > } > >@@ -125,16 +137,22 @@ public: > > ~BlockPtr() > { >+#if !defined(__OBJC__) || !__has_feature(objc_arc) > Block_release(m_block); >+#endif > } > > BlockPtr& operator=(const BlockPtr& other) > { >+#if defined(__OBJC__) && __has_feature(objc_arc) >+ m_block = other.m_block; >+#else > if (this != &other) { > Block_release(m_block); > m_block = Block_copy(other.m_block); > } >- >+#endif >+ > return *this; > } > >@@ -142,7 +160,9 @@ public: > { > ASSERT(this != &other); > >+#if !defined(__OBJC__) || !__has_feature(objc_arc) > Block_release(m_block); >+#endif > m_block = std::exchange(other.m_block, nullptr); > > return *this; >@@ -174,4 +194,3 @@ inline BlockPtr<R (Args...)> makeBlockPtr(R (^block)(Args...)) > > using WTF::BlockPtr; > using WTF::makeBlockPtr; >- >diff --git a/Source/WTF/wtf/OSObjectPtr.h b/Source/WTF/wtf/OSObjectPtr.h >index 721994875ed30011ea3c4b9f0b6b634ce22e6b4c..21a8fe954c401cac8c230c658ceee68a0c2a2291 100644 >--- a/Source/WTF/wtf/OSObjectPtr.h >+++ b/Source/WTF/wtf/OSObjectPtr.h >@@ -85,6 +85,13 @@ public: > other.m_ptr = nullptr; > } > >+ OSObjectPtr(T ptr) >+ : m_ptr(ptr) >+ { >+ if (m_ptr) >+ retainOSObject(m_ptr); >+ } >+ > OSObjectPtr& operator=(const OSObjectPtr& other) > { > OSObjectPtr ptr = other; >@@ -108,6 +115,13 @@ public: > return *this; > } > >+ OSObjectPtr& operator=(T other) >+ { >+ OSObjectPtr ptr = other; >+ swap(ptr); >+ return *this; >+ } >+ > void swap(OSObjectPtr& other) > { > std::swap(m_ptr, other.m_ptr); >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm >index 66b306d76d1f97b371c94a8f8f6334e449705993..d4ea9ac342eca1ed67b24a90b42bc97cccd31a8d 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm >@@ -677,7 +677,7 @@ NetworkSessionCocoa::NetworkSessionCocoa(NetworkSessionCreationParameters&& para > configuration.URLCache = nil; > > if (auto& data = globalSourceApplicationAuditTokenData()) >- configuration._sourceApplicationAuditTokenData = (NSData *)data.get(); >+ configuration._sourceApplicationAuditTokenData = (__bridge NSData *)data.get(); > > auto& sourceApplicationBundleIdentifier = globalSourceApplicationBundleIdentifier(); > if (!sourceApplicationBundleIdentifier.isEmpty()) { >diff --git a/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm b/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >index 5fd40da508753ecaed3e8aaeb993c7f42e52ce54..c2e0868622c8c059e9b8a34cc408fbd4544dfe8b 100644 >--- a/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >+++ b/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >@@ -97,7 +97,7 @@ static void overrideSystemProxies(const String& httpProxy, const String& httpsPr > } > > if ([proxySettings count] > 0) >- _CFNetworkSetOverrideSystemProxySettings((CFDictionaryRef)proxySettings); >+ _CFNetworkSetOverrideSystemProxySettings((__bridge CFDictionaryRef)proxySettings); > } > > void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters& parameters) >@@ -115,7 +115,7 @@ void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreati > > void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host) > { >- [NSURLRequest setAllowsSpecificHTTPSCertificate:(NSArray *)certificateInfo.certificateChain() forHost:(NSString *)host]; >+ [NSURLRequest setAllowsSpecificHTTPSCertificate:(__bridge NSArray *)certificateInfo.certificateChain() forHost:(NSString *)host]; > } > > void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >diff --git a/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm b/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm >index 1f7b7b798652d5edb362b6562d62e6b30be426a1..9c7afcebfefba7a74b0527b29fd6c2ad5161b57e 100644 >--- a/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm >+++ b/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm >@@ -268,7 +268,7 @@ bool Connection::sendMessage(std::unique_ptr<MachMessage> message) > return false; > > default: >- WebKit::setCrashReportApplicationSpecificInformation((CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x, message '%s::%s'", kr, message->messageReceiverName().data(), message->messageName().data()]); >+ WebKit::setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x, message '%s::%s'", kr, message->messageReceiverName().data(), message->messageName().data()]); > CRASH(); > } > } >@@ -501,7 +501,7 @@ static mach_msg_header_t* readFromMachPort(mach_port_t machPort, ReceiveBuffer& > > if (kr != MACH_MSG_SUCCESS) { > #if !ASSERT_DISABLED >- WebKit::setCrashReportApplicationSpecificInformation((CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x from mach_msg, receive port is %x", kr, machPort]); >+ WebKit::setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x from mach_msg, receive port is %x", kr, machPort]); > #endif > ASSERT_NOT_REACHED(); > return nullptr; >diff --git a/Source/WebKit/Platform/mac/StringUtilities.mm b/Source/WebKit/Platform/mac/StringUtilities.mm >index 46de5604250c5da0080bea2b67192994abb1848d..5c967937ce4f9b180d801d9e228b66c9077a6bec 100644 >--- a/Source/WebKit/Platform/mac/StringUtilities.mm >+++ b/Source/WebKit/Platform/mac/StringUtilities.mm >@@ -62,7 +62,7 @@ NSString *formattedPhoneNumberString(NSString *originalPhoneNumber) > { > NSString *countryCode = [[[NSLocale currentLocale] objectForKey:NSLocaleCountryCode] lowercaseString]; > >- RetainPtr<CFPhoneNumberRef> phoneNumber = adoptCF(CFPhoneNumberCreate(kCFAllocatorDefault, (CFStringRef)originalPhoneNumber, (CFStringRef)countryCode)); >+ RetainPtr<CFPhoneNumberRef> phoneNumber = adoptCF(CFPhoneNumberCreate(kCFAllocatorDefault, (__bridge CFStringRef)originalPhoneNumber, (__bridge CFStringRef)countryCode)); > if (!phoneNumber) > return originalPhoneNumber; > >@@ -70,7 +70,7 @@ NSString *formattedPhoneNumberString(NSString *originalPhoneNumber) > if (!phoneNumberString) > phoneNumberString = CFPhoneNumberCopyUnformattedRepresentation(phoneNumber.get()); > >- return [(NSString *)phoneNumberString autorelease]; >+ return CFBridgingRelease(phoneNumberString); > } > > #else >diff --git a/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm b/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm >index bc1c4b90a6be1b1a574152d7b6638b037d8c206e..c13714088ac1279dd298dbb256df9b86dcc45054 100644 >--- a/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm >+++ b/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm >@@ -162,14 +162,12 @@ static void initializeMethods(_WKRemoteObjectInterface *interface, Protocol *pro > static void initializeMethods(_WKRemoteObjectInterface *interface, Protocol *protocol) > { > unsigned conformingProtocolCount; >- Protocol** conformingProtocols = protocol_copyProtocolList(interface->_protocol, &conformingProtocolCount); >+ auto conformingProtocols = protocol_copyProtocolList(interface->_protocol, &conformingProtocolCount); > > for (unsigned i = 0; i < conformingProtocolCount; ++i) { >- Protocol* conformingProtocol = conformingProtocols[i]; >- >+ auto conformingProtocol = conformingProtocols[i]; > if (conformingProtocol == @protocol(NSObject)) > continue; >- > initializeMethods(interface, conformingProtocol); > } > >diff --git a/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm b/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm >index 3fc73184633b986b7e4ef13e8a8fa5da7b1de439..39216b375d26a520b2764d8642215f683a0c6a1b 100644 >--- a/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm >+++ b/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm >@@ -147,7 +147,7 @@ - (void)_sendInvocation:(NSInvocation *)invocation interface:(_WKRemoteObjectInt > if (!replyBlock) > [NSException raise:NSInvalidArgumentException format:@"A NULL reply block was passed into a message. (%s)", sel_getName(invocation.selector)]; > >- const char* replyBlockSignature = _Block_signature(replyBlock); >+ const char* replyBlockSignature = _Block_signature((__bridge void*)replyBlock); > > if (strcmp([NSMethodSignature signatureWithObjCTypes:replyBlockSignature].methodReturnType, "v")) > [NSException raise:NSInvalidArgumentException format:@"Return value of block argument must be 'void'. (%s)", sel_getName(invocation.selector)]; >diff --git a/Source/WebKit/Shared/API/c/cf/WKStringCF.mm b/Source/WebKit/Shared/API/c/cf/WKStringCF.mm >index 24be3873e6724ed30d8bd179546bb17b6891ab1f..61d1d47b7fe30a809429f2aeb1d3a914f0a55d71 100644 >--- a/Source/WebKit/Shared/API/c/cf/WKStringCF.mm >+++ b/Source/WebKit/Shared/API/c/cf/WKStringCF.mm >@@ -50,7 +50,7 @@ WKStringRef WKStringCreateWithCFString(CFStringRef cfString) > { > #if WK_API_ENABLED > // Since WKNSString is an internal class with no subclasses, we can do a simple equality check. >- if (object_getClass((NSString *)cfString) == wkNSStringClass()) >+ if (object_getClass((__bridge NSString *)cfString) == wkNSStringClass()) > return toAPI(static_cast<API::String*>(&[(WKNSString *)[(NSString *)cfString retain] _apiObject])); > #endif > String string(cfString); >diff --git a/Source/WebKit/Shared/API/c/cf/WKURLCF.mm b/Source/WebKit/Shared/API/c/cf/WKURLCF.mm >index 1a9c5fd48faa213007e8bb1d42d3ac29a36d923f..ee627b3ca15a17b8f624e4e8fb2a45953bc37aae 100644 >--- a/Source/WebKit/Shared/API/c/cf/WKURLCF.mm >+++ b/Source/WebKit/Shared/API/c/cf/WKURLCF.mm >@@ -54,7 +54,7 @@ WKURLRef WKURLCreateWithCFURL(CFURLRef cfURL) > > #if WK_API_ENABLED > // Since WKNSURL is an internal class with no subclasses, we can do a simple equality check. >- if (object_getClass((NSURL *)cfURL) == wkNSURLClass()) >+ if (object_getClass((__bridge NSURL *)cfURL) == wkNSURLClass()) > return toAPI(static_cast<API::URL*>(&[(WKNSURL *)[(NSURL *)cfURL retain] _apiObject])); > #endif > >diff --git a/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm b/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm >index 60c0803e57199ae9fa7e24509d9454c51f62e34e..a2cf7ea007063e3a0f625a1271a0b0d72138bb41 100644 >--- a/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm >+++ b/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm >@@ -83,7 +83,7 @@ void AuthenticationManager::initializeConnection(IPC::Connection* connection) > auto certificate = adoptCF(SecCertificateCreateWithData(nullptr, cfData.get())); > if (!certificate) > return; >- [certificates addObject:(id)certificate.get()]; >+ [certificates addObject:(__bridge id)certificate.get()]; > } > } > >diff --git a/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm b/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm >index 457d7a0ea907ffeca19e8ab0ed8b6758018326b8..af4214608c042686df5e3bbb7a0e14fc7a3fa2e1 100644 >--- a/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm >+++ b/Source/WebKit/Shared/Cocoa/DataDetectionResult.mm >@@ -43,7 +43,7 @@ void DataDetectionResult::encode(IPC::Encoder& encoder) const > { > auto archiver = secureArchiver(); > [archiver encodeObject:results.get() forKey:@"dataDetectorResults"]; >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFDataRef)archiver.get().encodedData); > } > > bool DataDetectionResult::decode(IPC::Decoder& decoder, DataDetectionResult& result) >@@ -52,7 +52,7 @@ bool DataDetectionResult::decode(IPC::Decoder& decoder, DataDetectionResult& res > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > @try { > result.results = [unarchiver decodeObjectOfClasses:[NSSet setWithArray:@[ [NSArray class], getDDScannerResultClass()] ] forKey:@"dataDetectorResults"]; > } @catch (NSException *exception) { >diff --git a/Source/WebKit/Shared/Cocoa/WKNSError.mm b/Source/WebKit/Shared/Cocoa/WKNSError.mm >index 820594e94a7209778c19ca7f0d6bf051d800d4c6..94204de8f4231abfeb4659ed43485beb961246a6 100644 >--- a/Source/WebKit/Shared/Cocoa/WKNSError.mm >+++ b/Source/WebKit/Shared/Cocoa/WKNSError.mm >@@ -34,7 +34,7 @@ @implementation WKNSError > > - (NSObject *)_web_createTarget > { >- return [(NSError *)static_cast<API::Error*>(&self._apiObject)->platformError().cfError() copy]; >+ return [(__bridge NSError *)static_cast<API::Error*>(&self._apiObject)->platformError().cfError() copy]; > } > > #pragma mark NSCopying protocol implementation >diff --git a/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm b/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >index 895afe99263683a5d32e7f02b49536d3b6a5a363..1a8363e8f8848bd5df3e3425f1b1db7b237266bf 100644 >--- a/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >+++ b/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >@@ -50,7 +50,7 @@ + (instancetype)_web_URLWithWTFString:(const String&)string relativeToURL:(NSURL > - (String)_web_originalDataAsWTFString > { > CString originalData; >- getURLBytes((CFURLRef)self, originalData); >+ getURLBytes((__bridge CFURLRef)self, originalData); > return String::fromUTF8(originalData); > } > >diff --git a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >index 75828fde6680f1fbe00243f91d834668996acae0..209e20a75493410ee8f967b45bfdd42f57b2fdef 100644 >--- a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >+++ b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >@@ -83,7 +83,7 @@ void XPCServiceInitializer(OSObjectPtr<xpc_connection_t> connection, xpc_object_ > > ChildProcessInitializationParameters parameters; > if (priorityBoostMessage) >- parameters.priorityBoostMessage = adoptOSObject(xpc_retain(priorityBoostMessage)); >+ parameters.priorityBoostMessage = priorityBoostMessage; > > if (!delegate.getConnectionIdentifier(parameters.connectionIdentifier)) > exit(EXIT_FAILURE); >diff --git a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >index 46687f18e33d8b6569a947c6e1c0978091f16306..5919a32836eca916f4db831cb67319e39183dbf3 100644 >--- a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >+++ b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >@@ -59,7 +59,7 @@ static void XPCServiceEventHandler(xpc_connection_t peer) > typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t, xpc_object_t); > InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKitBundle, entryPointFunctionName)); > if (!initializerFunctionPtr) { >- NSLog(@"Unable to find entry point in WebKit.framework with name: %@", (NSString *)entryPointFunctionName); >+ NSLog(@"Unable to find entry point in WebKit.framework with name: %@", (__bridge NSString *)entryPointFunctionName); > exit(EXIT_FAILURE); > } > >diff --git a/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm b/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm >index 3dd5afc73e2d6eb6d434e9059ff17bf08f0e2fe6..b9a6afe3425b9e62938d8123cb25f03abe20848d 100644 >--- a/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm >+++ b/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm >@@ -411,7 +411,7 @@ void RemoteLayerBackingStore::applyBackingStoreToLayer(CALayer *layer, LayerCont > break; > case LayerContentsType::CAMachPort: > ASSERT(m_frontBufferSendRight); >- layer.contents = (id)adoptCF(CAMachPortCreate(m_frontBufferSendRight.leakSendRight())).get(); >+ layer.contents = (__bridge id)adoptCF(CAMachPortCreate(m_frontBufferSendRight.leakSendRight())).get(); > break; > } > return; >@@ -419,7 +419,7 @@ void RemoteLayerBackingStore::applyBackingStoreToLayer(CALayer *layer, LayerCont > #endif > > ASSERT(!acceleratesDrawing()); >- layer.contents = (id)m_frontBuffer.bitmap->makeCGImageCopy().get(); >+ layer.contents = (__bridge id)m_frontBuffer.bitmap->makeCGImageCopy().get(); > } > > RetainPtr<CGContextRef> RemoteLayerBackingStore::takeFrontContextPendingFlush() >diff --git a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >index f50b08261c33b85edfd0d3062e8a207ce3b1c7e9..b430e6cd0b62048f80aa38aa8412c5679d7b7396 100644 >--- a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >+++ b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >@@ -624,7 +624,7 @@ bool decode(Decoder& decoder, RetainPtr<CFURLRef>& result) > if (urlBytes.isEmpty()) { > // CFURL can't hold an empty URL, unlike NSURL. > // FIXME: This discards base URL, which seems incorrect. >- result = reinterpret_cast<CFURLRef>([NSURL URLWithString:@""]); >+ result = (__bridge CFURLRef)[NSURL URLWithString:@""]; > return true; > } > #endif >diff --git a/Source/WebKit/Shared/mac/ArgumentCodersMac.mm b/Source/WebKit/Shared/mac/ArgumentCodersMac.mm >index 3170eee20a487d0b1d4cb6bf6158d5291d104bc2..d15c904f2b0c7109ca074ddd4346ddea5e3df726 100644 >--- a/Source/WebKit/Shared/mac/ArgumentCodersMac.mm >+++ b/Source/WebKit/Shared/mac/ArgumentCodersMac.mm >@@ -243,7 +243,7 @@ static inline bool isSerializableValue(id value) > #else > auto fontClass = [UIFont class]; > #endif >- return ![value isKindOfClass:fontClass] || isSerializableFont(reinterpret_cast<CTFontRef>(value)); >+ return ![value isKindOfClass:fontClass] || isSerializableFont((__bridge CTFontRef)value); > } > > static inline RetainPtr<NSDictionary> filterUnserializableValues(NSDictionary *dictionary) >@@ -425,7 +425,7 @@ bool decode(Decoder& decoder, RetainPtr<NSFont>& result) > > void encode(Encoder& encoder, NSNumber *number) > { >- encode(encoder, (CFNumberRef)number); >+ encode(encoder, (__bridge CFNumberRef)number); > } > > bool decode(Decoder& decoder, RetainPtr<NSNumber>& result) >@@ -440,7 +440,7 @@ bool decode(Decoder& decoder, RetainPtr<NSNumber>& result) > > void encode(Encoder& encoder, NSString *string) > { >- encode(encoder, (CFStringRef)string); >+ encode(encoder, (__bridge CFStringRef)string); > } > > bool decode(Decoder& decoder, RetainPtr<NSString>& result) >@@ -492,7 +492,7 @@ bool decode(Decoder& decoder, RetainPtr<NSArray>& result) > > void encode(Encoder& encoder, NSDate *date) > { >- encode(encoder, (CFDateRef)date); >+ encode(encoder, (__bridge CFDateRef)date); > } > > bool decode(Decoder& decoder, RetainPtr<NSDate>& result) >@@ -507,7 +507,7 @@ bool decode(Decoder& decoder, RetainPtr<NSDate>& result) > > void encode(Encoder& encoder, NSData *data) > { >- encode(encoder, (CFDataRef)data); >+ encode(encoder, (__bridge CFDataRef)data); > } > > bool decode(Decoder& decoder, RetainPtr<NSData>& result) >@@ -522,7 +522,7 @@ bool decode(Decoder& decoder, RetainPtr<NSData>& result) > > void encode(Encoder& encoder, NSURL *URL) > { >- encode(encoder, (CFURLRef)URL); >+ encode(encoder, (__bridge CFURLRef)URL); > } > > bool decode(Decoder& decoder, RetainPtr<NSURL>& result) >diff --git a/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm b/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm >index a0a400f0808dc5daf12ed03e507dd20add3f6d91..3985cdc6ad665ec2acdd30013c60698764cceb8f 100644 >--- a/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm >+++ b/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm >@@ -321,14 +321,14 @@ static void encodeNSError(Encoder& encoder, NSError *nsError) > > [userInfo enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL*) { > if ([value isKindOfClass:[NSString class]] || [value isKindOfClass:[NSURL class]] || [value isKindOfClass:[NSNumber class]]) >- CFDictionarySetValue(filteredUserInfo.get(), key, value); >+ CFDictionarySetValue(filteredUserInfo.get(), (__bridge CFTypeRef)key, (__bridge CFTypeRef)value); > }]; > > if (NSArray *clientIdentityAndCertificates = [userInfo objectForKey:@"NSErrorClientCertificateChainKey"]) { > ASSERT([clientIdentityAndCertificates isKindOfClass:[NSArray class]]); > ASSERT(^{ > for (id object in clientIdentityAndCertificates) { >- if (CFGetTypeID(object) != SecIdentityGetTypeID() && CFGetTypeID(object) != SecCertificateGetTypeID()) >+ if (CFGetTypeID((__bridge CFTypeRef)object) != SecIdentityGetTypeID() && CFGetTypeID((__bridge CFTypeRef)object) != SecCertificateGetTypeID()) > return false; > } > return true; >@@ -337,7 +337,7 @@ static void encodeNSError(Encoder& encoder, NSError *nsError) > // Turn SecIdentity members into SecCertificate to strip out private key information. > id clientCertificates = [NSMutableArray arrayWithCapacity:clientIdentityAndCertificates.count]; > for (id object in clientIdentityAndCertificates) { >- if (CFGetTypeID(object) != SecIdentityGetTypeID()) { >+ if (CFGetTypeID((__bridge CFTypeRef)object) != SecIdentityGetTypeID()) { > [clientCertificates addObject:object]; > continue; > } >@@ -351,27 +351,27 @@ static void encodeNSError(Encoder& encoder, NSError *nsError) > clientCertificates = nil; > break; > } >- [clientCertificates addObject:(id)certificate]; >+ [clientCertificates addObject:(__bridge id)certificate]; > } >- CFDictionarySetValue(filteredUserInfo.get(), @"NSErrorClientCertificateChainKey", clientCertificates); >+ CFDictionarySetValue(filteredUserInfo.get(), CFSTR("NSErrorClientCertificateChainKey"), (__bridge CFTypeRef)clientCertificates); > } > > id peerCertificateChain = [userInfo objectForKey:@"NSErrorPeerCertificateChainKey"]; > if (!peerCertificateChain) { >- if (SecTrustRef peerTrust = (SecTrustRef)[userInfo objectForKey:NSURLErrorFailingURLPeerTrustErrorKey]) { >+ if (SecTrustRef peerTrust = (__bridge SecTrustRef)[userInfo objectForKey:NSURLErrorFailingURLPeerTrustErrorKey]) { > CFIndex count = SecTrustGetCertificateCount(peerTrust); > peerCertificateChain = [NSMutableArray arrayWithCapacity:count]; > for (CFIndex i = 0; i < count; ++i) >- [peerCertificateChain addObject:(id)SecTrustGetCertificateAtIndex(peerTrust, i)]; >+ [peerCertificateChain addObject:(__bridge id)SecTrustGetCertificateAtIndex(peerTrust, i)]; > } > } > ASSERT(!peerCertificateChain || [peerCertificateChain isKindOfClass:[NSArray class]]); > if (peerCertificateChain) >- CFDictionarySetValue(filteredUserInfo.get(), @"NSErrorPeerCertificateChainKey", peerCertificateChain); >+ CFDictionarySetValue(filteredUserInfo.get(), CFSTR("NSErrorPeerCertificateChainKey"), (__bridge CFTypeRef)peerCertificateChain); > > #if HAVE(SEC_TRUST_SERIALIZATION) >- if (SecTrustRef peerTrust = (SecTrustRef)[userInfo objectForKey:NSURLErrorFailingURLPeerTrustErrorKey]) >- CFDictionarySetValue(filteredUserInfo.get(), NSURLErrorFailingURLPeerTrustErrorKey, peerTrust); >+ if (SecTrustRef peerTrust = (__bridge SecTrustRef)[userInfo objectForKey:NSURLErrorFailingURLPeerTrustErrorKey]) >+ CFDictionarySetValue(filteredUserInfo.get(), (__bridge CFStringRef)NSURLErrorFailingURLPeerTrustErrorKey, peerTrust); > #endif > > IPC::encode(encoder, filteredUserInfo.get()); >@@ -413,11 +413,11 @@ static bool decodeNSError(Decoder& decoder, RetainPtr<NSError>& nsError) > return false; > > auto mutableUserInfo = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, CFDictionaryGetCount(userInfo.get()) + 1, userInfo.get())); >- CFDictionarySetValue(mutableUserInfo.get(), NSUnderlyingErrorKey, underlyingNSError.get()); >+ CFDictionarySetValue(mutableUserInfo.get(), (__bridge CFStringRef)NSUnderlyingErrorKey, (__bridge CFTypeRef)underlyingNSError.get()); > userInfo = WTFMove(mutableUserInfo); > } > >- nsError = adoptNS([[NSError alloc] initWithDomain:domain code:code userInfo:(NSDictionary *)userInfo.get()]); >+ nsError = adoptNS([[NSError alloc] initWithDomain:domain code:code userInfo:(__bridge NSDictionary *)userInfo.get()]); > return true; > } > >@@ -435,7 +435,7 @@ void ArgumentCoder<ProtectionSpace>::encodePlatformData(Encoder& encoder, const > { > auto archiver = secureArchiver(); > [archiver encodeObject:space.nsSpace() forKey:@"protectionSpace"]; >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFDataRef)archiver.get().encodedData); > } > > bool ArgumentCoder<ProtectionSpace>::decodePlatformData(Decoder& decoder, ProtectionSpace& space) >@@ -444,7 +444,7 @@ bool ArgumentCoder<ProtectionSpace>::decodePlatformData(Decoder& decoder, Protec > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > @try { > if (RetainPtr<NSURLProtectionSpace> nsSpace = [unarchiver decodeObjectOfClass:[NSURLProtectionSpace class] forKey:@"protectionSpace"]) > space = ProtectionSpace(nsSpace.get()); >@@ -467,7 +467,7 @@ void ArgumentCoder<Credential>::encodePlatformData(Encoder& encoder, const Crede > > if (NSArray *certificates = nsCredential.certificates) { > encoder << true; >- IPC::encode(encoder, reinterpret_cast<CFArrayRef>(certificates)); >+ IPC::encode(encoder, (__bridge CFArrayRef)certificates); > } else > encoder << false; > >@@ -479,7 +479,7 @@ void ArgumentCoder<Credential>::encodePlatformData(Encoder& encoder, const Crede > > auto archiver = secureArchiver(); > [archiver encodeObject:nsCredential forKey:@"credential"]; >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFArrayRef)archiver.get().encodedData); > } > > bool ArgumentCoder<Credential>::decodePlatformData(Decoder& decoder, Credential& credential) >@@ -507,7 +507,7 @@ bool ArgumentCoder<Credential>::decodePlatformData(Decoder& decoder, Credential& > if (!decoder.decode(persistence)) > return false; > >- credential = Credential(adoptNS([[NSURLCredential alloc] initWithIdentity:identity.get() certificates:(NSArray *)certificates.get() persistence:(NSURLCredentialPersistence)persistence]).get()); >+ credential = Credential(adoptNS([[NSURLCredential alloc] initWithIdentity:identity.get() certificates:(__bridge NSArray *)certificates.get() persistence:(NSURLCredentialPersistence)persistence]).get()); > return true; > } > >@@ -515,7 +515,7 @@ bool ArgumentCoder<Credential>::decodePlatformData(Decoder& decoder, Credential& > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > @try { > if (RetainPtr<NSURLCredential> nsCredential = [unarchiver decodeObjectOfClass:[NSURLCredential class] forKey:@"credential"]) > credential = Credential(nsCredential.get()); >@@ -574,11 +574,12 @@ std::optional<KeypressCommand> ArgumentCoder<KeypressCommand>::decode(Decoder& d > } > > #if ENABLE(CONTENT_FILTERING) >+ > void ArgumentCoder<ContentFilterUnblockHandler>::encode(Encoder& encoder, const ContentFilterUnblockHandler& contentFilterUnblockHandler) > { > auto archiver = secureArchiver(); > contentFilterUnblockHandler.encode(archiver.get()); >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFDataRef)archiver.get().encodedData); > } > > bool ArgumentCoder<ContentFilterUnblockHandler>::decode(Decoder& decoder, ContentFilterUnblockHandler& contentFilterUnblockHandler) >@@ -587,13 +588,14 @@ bool ArgumentCoder<ContentFilterUnblockHandler>::decode(Decoder& decoder, Conten > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > if (!ContentFilterUnblockHandler::decode(unarchiver.get(), contentFilterUnblockHandler)) > return false; > > [unarchiver finishDecoding]; > return true; > } >+ > #endif > > #if ENABLE(WIRELESS_PLAYBACK_TARGET) >@@ -611,7 +613,7 @@ void ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData(Encoder& enco > if ([getAVOutputContextClass() conformsToProtocol:@protocol(NSSecureCoding)]) > [archiver encodeObject:target.avOutputContext() forKey:deviceContextKey()]; > >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFDataRef)archiver.get().encodedData); > } > > bool ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData(Decoder& decoder, MediaPlaybackTargetContext& target) >@@ -623,7 +625,7 @@ bool ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData(Decoder& deco > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > > AVOutputContext *context = nil; > @try { >@@ -638,6 +640,7 @@ bool ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData(Decoder& deco > [unarchiver finishDecoding]; > return true; > } >+ > #endif > > } // namespace IPC >diff --git a/Source/WebKit/Shared/mac/WebHitTestResultData.mm b/Source/WebKit/Shared/mac/WebHitTestResultData.mm >index 1dc0049b073073f9f40b5f996cadebbb967c1fd9..588c5e518a2497f358f4b82cbaac9418d9ad10c0 100644 >--- a/Source/WebKit/Shared/mac/WebHitTestResultData.mm >+++ b/Source/WebKit/Shared/mac/WebHitTestResultData.mm >@@ -48,7 +48,7 @@ void WebHitTestResultData::platformEncode(IPC::Encoder& encoder) const > auto archiver = secureArchiver(); > [archiver encodeObject:detectedDataActionContext.get() forKey:@"actionContext"]; > >- IPC::encode(encoder, reinterpret_cast<CFDataRef>(archiver.get().encodedData)); >+ IPC::encode(encoder, (__bridge CFDataRef)archiver.get().encodedData); > > encoder << detectedDataBoundingBox; > encoder << detectedDataOriginatingPageOverlay; >@@ -73,7 +73,7 @@ bool WebHitTestResultData::platformDecode(IPC::Decoder& decoder, WebHitTestResul > if (!IPC::decode(decoder, data)) > return false; > >- auto unarchiver = secureUnarchiverFromData((NSData *)data.get()); >+ auto unarchiver = secureUnarchiverFromData((__bridge NSData *)data.get()); > @try { > hitTestResultData.detectedDataActionContext = [unarchiver decodeObjectOfClass:getDDActionContextClass() forKey:@"actionContext"]; > } @catch (NSException *exception) { >diff --git a/Source/WebKit/UIProcess/API/C/mac/WKContextPrivateMac.mm b/Source/WebKit/UIProcess/API/C/mac/WKContextPrivateMac.mm >index 7f93c1e32aa4143f4db2020abaf3af026a8bb198..1d811accea49d4e8489ddc42c15c72ec4fab3af5 100644 >--- a/Source/WebKit/UIProcess/API/C/mac/WKContextPrivateMac.mm >+++ b/Source/WebKit/UIProcess/API/C/mac/WKContextPrivateMac.mm >@@ -49,7 +49,7 @@ bool WKContextIsPlugInUpdateAvailable(WKContextRef contextRef, WKStringRef plugI > #if PLATFORM(IOS) > return false; > #else >- return WebCore::PluginBlacklist::isPluginUpdateAvailable((NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get()); >+ return WebCore::PluginBlacklist::isPluginUpdateAvailable((__bridge NSString *)adoptCF(WKStringCopyCFString(kCFAllocatorDefault, plugInBundleIdentifierRef)).get()); > #endif > } > >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm b/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm >index bb6be7e973806adfee39fb9dfa7fc820849af7a5..10d011587a57f8169bb15859960009aba390e8f8 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm >@@ -296,7 +296,7 @@ - (NSString *)title > - (NSArray *)certificateChain > { > if (WebFrameProxy* mainFrame = _page->mainFrame()) >- return mainFrame->certificateInfo() ? (NSArray *)mainFrame->certificateInfo()->certificateInfo().certificateChain() : nil; >+ return mainFrame->certificateInfo() ? (__bridge NSArray *)mainFrame->certificateInfo()->certificateInfo().certificateChain() : nil; > > return nil; > } >@@ -328,7 +328,7 @@ static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WK > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidStartProvisionalLoad:)]) >@@ -340,7 +340,7 @@ static void didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, W > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidReceiveServerRedirectForProvisionalLoad:)]) >@@ -352,7 +352,7 @@ static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef f > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextController:didFailProvisionalLoadWithError:)]) >@@ -364,7 +364,7 @@ static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef us > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidCommitLoad:)]) >@@ -376,7 +376,7 @@ static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef us > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidFinishLoad:)]) >@@ -388,7 +388,7 @@ static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErr > if (!WKFrameIsMainFrame(frame)) > return; > >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextController:didFailLoadWithError:)]) >@@ -397,7 +397,7 @@ static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErr > > static bool canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef page, WKFrameRef frame, WKProtectionSpaceRef protectionSpace, const void *clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextController:canAuthenticateAgainstProtectionSpace:)]) >@@ -408,7 +408,7 @@ static bool canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef page, WKFrame > > static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextController:didReceiveAuthenticationChallenge:)]) >@@ -417,7 +417,7 @@ static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef > > static void didStartProgress(WKPageRef page, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidStartProgress:)]) >@@ -426,7 +426,7 @@ static void didStartProgress(WKPageRef page, const void* clientInfo) > > static void didChangeProgress(WKPageRef page, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextController:estimatedProgressChangedTo:)]) >@@ -435,7 +435,7 @@ static void didChangeProgress(WKPageRef page, const void* clientInfo) > > static void didFinishProgress(WKPageRef page, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerDidFinishProgress:)]) >@@ -444,7 +444,7 @@ static void didFinishProgress(WKPageRef page, const void* clientInfo) > > static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void *clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if (![loadDelegate respondsToSelector:@selector(browsingContextControllerDidChangeBackForwardList:addedItem:removedItems:)]) >@@ -457,7 +457,7 @@ static void didChangeBackForwardList(WKPageRef page, WKBackForwardListItemRef ad > > static void processDidCrash(WKPageRef page, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto loadDelegate = browsingContext->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(browsingContextControllerWebProcessDidCrash:)]) >@@ -470,7 +470,7 @@ static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, > memset(&loaderClient, 0, sizeof(loaderClient)); > > loaderClient.base.version = 4; >- loaderClient.base.clientInfo = browsingContext; >+ loaderClient.base.clientInfo = (__bridge void*)browsingContext; > loaderClient.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame; > loaderClient.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame; > loaderClient.didFailProvisionalLoadWithErrorForFrame = didFailProvisionalLoadWithErrorForFrame; >@@ -520,11 +520,11 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext, > memset(&policyClient, 0, sizeof(policyClient)); > > policyClient.base.version = 2; >- policyClient.base.clientInfo = browsingContext; >+ policyClient.base.clientInfo = (__bridge void*)browsingContext; > > policyClient.decidePolicyForNavigationAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef originalRequest, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto policyDelegate = browsingContext->_policyDelegate.get(); > > if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForNavigationAction:decisionHandler:)]) { >@@ -549,7 +549,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext, > > policyClient.decidePolicyForNewWindowAction = [](WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto policyDelegate = browsingContext->_policyDelegate.get(); > > if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForNewWindowAction:decisionHandler:)]) { >@@ -569,7 +569,7 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext, > > policyClient.decidePolicyForResponse = [](WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo) > { >- WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; >+ auto browsingContext = (__bridge WKBrowsingContextController *)clientInfo; > auto policyDelegate = browsingContext->_policyDelegate.get(); > > if ([policyDelegate respondsToSelector:@selector(browsingContextController:decidePolicyForResponseAction:decisionHandler:)]) { >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm b/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm >index a70f1d46b539da9c695ae08ada79837756d71f3e..96df0d6b1dd372ddc21b534265d0a3cc3c0fa759 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextGroup.mm >@@ -124,7 +124,7 @@ static WKRetainPtr<WKArrayRef> createWKArray(NSArray *array) > > for (id entry in array) { > if ([entry isKindOfClass:[NSString class]]) >- strings.uncheckedAppend(adoptRef(toImpl(WKStringCreateWithCFString((CFStringRef)entry)))); >+ strings.uncheckedAppend(adoptRef(toImpl(WKStringCreateWithCFString((__bridge CFStringRef)entry)))); > } > > return toAPI(&API::Array::create(WTFMove(strings)).leakRef()); >@@ -135,8 +135,8 @@ -(void)addUserStyleSheet:(NSString *)source baseURL:(NSURL *)baseURL whitelisted > if (!source) > CRASH(); > >- WKRetainPtr<WKStringRef> wkSource = adoptWK(WKStringCreateWithCFString((CFStringRef)source)); >- WKRetainPtr<WKURLRef> wkBaseURL = adoptWK(WKURLCreateWithCFURL((CFURLRef)baseURL)); >+ WKRetainPtr<WKStringRef> wkSource = adoptWK(WKStringCreateWithCFString((__bridge CFStringRef)source)); >+ WKRetainPtr<WKURLRef> wkBaseURL = adoptWK(WKURLCreateWithCFURL((__bridge CFURLRef)baseURL)); > auto wkWhitelist = createWKArray(whitelist); > auto wkBlacklist = createWKArray(blacklist); > WKUserContentInjectedFrames injectedFrames = mainFrameOnly ? kWKInjectInTopFrameOnly : kWKInjectInAllFrames; >@@ -154,8 +154,8 @@ - (void)addUserScript:(NSString *)source baseURL:(NSURL *)baseURL whitelistedURL > if (!source) > CRASH(); > >- WKRetainPtr<WKStringRef> wkSource = adoptWK(WKStringCreateWithCFString((CFStringRef)source)); >- WKRetainPtr<WKURLRef> wkBaseURL = adoptWK(WKURLCreateWithCFURL((CFURLRef)baseURL)); >+ WKRetainPtr<WKStringRef> wkSource = adoptWK(WKStringCreateWithCFString((__bridge CFStringRef)source)); >+ WKRetainPtr<WKURLRef> wkBaseURL = adoptWK(WKURLCreateWithCFURL((__bridge CFURLRef)baseURL)); > auto wkWhitelist = createWKArray(whitelist); > auto wkBlacklist = createWKArray(blacklist); > WKUserContentInjectedFrames injectedFrames = mainFrameOnly ? kWKInjectInTopFrameOnly : kWKInjectInAllFrames; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm b/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm >index 21d316f71a56204a110fd5add0f3a6b839706e7a..ce23d0ec8a32d671fd30663319a3a2c1b6c5fb0f 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm >@@ -51,7 +51,7 @@ - (void)dealloc > > static void didReceiveMessage(WKConnectionRef, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo) > { >- WKConnection *connection = (WKConnection *)clientInfo; >+ auto connection = (__bridge WKConnection *)clientInfo; > auto delegate = connection->_delegate.get(); > > if ([delegate respondsToSelector:@selector(connection:didReceiveMessageWithName:body:)]) { >@@ -63,7 +63,7 @@ static void didReceiveMessage(WKConnectionRef, WKStringRef messageName, WKTypeRe > > static void didClose(WKConnectionRef, const void* clientInfo) > { >- WKConnection *connection = (WKConnection *)clientInfo; >+ auto connection = (__bridge WKConnection *)clientInfo; > auto delegate = connection->_delegate.get(); > > if ([delegate respondsToSelector:@selector(connectionDidClose:)]) >@@ -76,7 +76,7 @@ static void setUpClient(WKConnection *wrapper, WebConnection& connection) > memset(&client, 0, sizeof(client)); > > client.base.version = 0; >- client.base.clientInfo = wrapper; >+ client.base.clientInfo = (__bridge void*)wrapper; > client.didReceiveMessage = didReceiveMessage; > client.didClose = didClose; > >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm b/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm >index fb5859a77c0a86067ffd81e3663fee0c4dccb671..530ce08ef445417f71d26f732ed0c84facfd63d9 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm >@@ -66,7 +66,7 @@ @implementation WKProcessGroup { > > static void didCreateConnection(WKContextRef, WKConnectionRef connectionRef, const void* clientInfo) > { >- WKProcessGroup *processGroup = (WKProcessGroup *)clientInfo; >+ auto processGroup = (__bridge WKProcessGroup *)clientInfo; > auto delegate = processGroup->_delegate.get(); > > if ([delegate respondsToSelector:@selector(processGroup:didCreateConnectionToWebProcessPlugIn:)]) >@@ -87,7 +87,7 @@ static void setUpConnectionClient(WKProcessGroup *processGroup, WKContextRef con > > static WKTypeRef getInjectedBundleInitializationUserData(WKContextRef, const void* clientInfo) > { >- WKProcessGroup *processGroup = (WKProcessGroup *)clientInfo; >+ auto processGroup = (__bridge WKProcessGroup *)clientInfo; > auto delegate = processGroup->_delegate.get(); > > if ([delegate respondsToSelector:@selector(processGroupWillCreateConnectionToWebProcessPlugIn:)]) { >@@ -105,7 +105,7 @@ static void setUpInjectedBundleClient(WKProcessGroup *processGroup, WKContextRef > memset(&injectedBundleClient, 0, sizeof(injectedBundleClient)); > > injectedBundleClient.base.version = 1; >- injectedBundleClient.base.clientInfo = processGroup; >+ injectedBundleClient.base.clientInfo = (__bridge void*)processGroup; > injectedBundleClient.getInjectedBundleInitializationUserData = getInjectedBundleInitializationUserData; > > WKContextSetInjectedBundleClient(contextRef, &injectedBundleClient.base); >@@ -223,7 +223,7 @@ - (WKContextRef)_contextRef > > - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host > { >- _processPool->allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).ptr(), host); >+ _processPool->allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((__bridge CFArrayRef)certificateChain)).ptr(), host); > } > > #if PLATFORM(IOS) >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >index 807a7c58bbe0a00805dd8bbd4b44025b824336a1..576a585e6cd556adb647bc019f9850abfef32eb9 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >@@ -179,7 +179,7 @@ + (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL bundleIdenti > > - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host > { >- _processPool->allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).ptr(), host); >+ _processPool->allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((__bridge CFArrayRef)certificateChain)).ptr(), host); > } > > - (void)_registerURLSchemeServiceWorkersCanHandle:(NSString *)scheme >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm >index 5c6f13d87cc08a4743a55941926353c4d8420e3e..56b8a61b647961ab80890a3469328324ac2926e5 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm >@@ -302,12 +302,12 @@ - (BOOL)_allowsCellularAccess > > - (void)_setProxyConfiguration:(NSDictionary *)configuration > { >- _websiteDataStore->websiteDataStore().setProxyConfiguration((CFDictionaryRef)configuration); >+ _websiteDataStore->websiteDataStore().setProxyConfiguration((__bridge CFDictionaryRef)configuration); > } > > - (NSDictionary *)_proxyConfiguration > { >- return (NSDictionary *)_websiteDataStore->websiteDataStore().proxyConfiguration(); >+ return (__bridge NSDictionary *)_websiteDataStore->websiteDataStore().proxyConfiguration(); > } > > - (void)_resourceLoadStatisticsSetShouldSubmitTelemetry:(BOOL)value >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >index 3c54f7b70b9f82ea1652ee6f15e1db090a4f1e5b..4ea1c5826a5b1f7f5ff83a70d2ead9e3fcc9ae66 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >@@ -197,7 +197,7 @@ - (void)_didTakeSnapshot:(CGImageRef)image > _waitingForSnapshot = NO; > self.layer.sublayers = @[]; > self.layer.contentsGravity = kCAGravityResizeAspectFill; >- self.layer.contents = (id)image; >+ self.layer.contents = (__bridge id)image; > > // If we got a scale change while snapshotting, we'll take another snapshot once the first one returns. > if (_snapshotWasDeferred) { >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.mm >index 90288a84ce485a9b1dd0f1547a6c60eeb17ba9d2..193b42e8da3afced51991813bb3060a2f3feab79 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.mm >@@ -28,6 +28,7 @@ > > #if WK_API_ENABLED > >+#include "WKContentRuleListInternal.h" > #include "WebCompiledContentRuleList.h" > #include <WebCore/ContentExtensionCompiler.h> > #include <WebCore/ContentExtensionError.h> >diff --git a/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm b/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm >index 68de3ec9db27879c9c5d71d0d610682d8ec64300..ba0f2c9092c9591e874e42d381d10986f6e2134a 100644 >--- a/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm >+++ b/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm >@@ -67,7 +67,7 @@ static NSArray *chain(const CertificateInfo& certificateInfo) > #endif > ASSERT(certificateInfo.type() == CertificateInfo::Type::CertificateChain); > CFIndex chainCount = CFArrayGetCount(certificateInfo.certificateChain()); >- return chainCount > 1 ? [(NSArray *)certificateInfo.certificateChain() subarrayWithRange:NSMakeRange(1, chainCount - 1)] : nil; >+ return chainCount > 1 ? [(__bridge NSArray *)certificateInfo.certificateChain() subarrayWithRange:NSMakeRange(1, chainCount - 1)] : nil; > } > > WebCredential::WebCredential(WebCertificateInfo* certificateInfo) >diff --git a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >index 3d18f62d96ce4a6c964ad0ca861befa46d1b4a26..40abf4fea63b15858be5207b4087775b86023e2f 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >@@ -480,7 +480,7 @@ String WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory() > > String WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory() > { >- RetainPtr<NSString> cachePath = adoptNS((NSString *)_CFURLCacheCopyCacheDirectory([[NSURLCache sharedURLCache] _CFURLCache])); >+ NSString *cachePath = CFBridgingRelease(_CFURLCacheCopyCacheDirectory([[NSURLCache sharedURLCache] _CFURLCache])); > if (!cachePath) > cachePath = @"~/Library/Caches/com.apple.WebKit.WebProcess"; > >@@ -590,8 +590,7 @@ static CFURLStorageSessionRef privateBrowsingSession() > static dispatch_once_t once; > dispatch_once(&once, ^{ > NSString *identifier = [NSString stringWithFormat:@"%@.PrivateBrowsing", [[NSBundle mainBundle] bundleIdentifier]]; >- >- session = createPrivateStorageSession((CFStringRef)identifier); >+ session = createPrivateStorageSession((__bridge CFStringRef)identifier); > }); > > return session; >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 96b889b07d00a885971dc082f9374d4003f1dbd7..d64f476711ff1c25de424099747405bb510d423f 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -3895,7 +3895,7 @@ void WebViewImpl::provideDataForPasteboard(NSPasteboard *pasteboard, NSString *t > // FIXME: need to support NSRTFDPboardType > > if ([type isEqual:WebCore::legacyTIFFPasteboardType()] && m_promisedImage) { >- [pasteboard setData:(NSData *)m_promisedImage->tiffRepresentation() forType:WebCore::legacyTIFFPasteboardType()]; >+ [pasteboard setData:(__bridge NSData *)m_promisedImage->tiffRepresentation() forType:WebCore::legacyTIFFPasteboardType()]; > m_promisedImage = nullptr; > } > } >diff --git a/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm b/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >index 257c94c5784d1ce195b446c37cc5fdb702e30576..723d44423d3f2b7328d8a78343ad442bbc260f2d 100644 >--- a/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >+++ b/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm >@@ -60,9 +60,9 @@ Vector<String> PluginInfoStore::pluginPathsInDirectory(const String& directory) > Vector<String> pluginPaths; > > RetainPtr<CFStringRef> directoryCFString = directory.createCFString(); >- NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:(NSString *)directoryCFString.get() error:nil]; >+ NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:(__bridge NSString *)directoryCFString.get() error:nil]; > for (NSString *filename in filenames) >- pluginPaths.append([(NSString *)directoryCFString.get() stringByAppendingPathComponent:filename]); >+ pluginPaths.append([(__bridge NSString *)directoryCFString.get() stringByAppendingPathComponent:filename]); > > return pluginPaths; > } >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm >index 4cf32c3c1dec081260d61b588e2a4bc53cf46727..3de00600b0d6c87e91c781fa42daee2f66a68f01 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm >@@ -294,7 +294,7 @@ void RemoteLayerTreeHost::detachRootLayer() > static void recursivelyMapIOSurfaceBackingStore(CALayer *layer) > { > if (layer.contents && CFGetTypeID(layer.contents) == CAMachPortGetTypeID()) { >- MachSendRight port = MachSendRight::create(CAMachPortGetPort((CAMachPortRef)layer.contents)); >+ MachSendRight port = MachSendRight::create(CAMachPortGetPort((__bridge CAMachPortRef)layer.contents)); > auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(port), sRGBColorSpaceRef()); > layer.contents = surface ? surface->asLayerContents() : nil; > } >diff --git a/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm b/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >index df9c5a8f72bdf8f20f514868b4a0bad6f60aa896..3cc9343836b8441ce823c19cd09ada1ba77b914e 100644 >--- a/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >+++ b/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >@@ -615,22 +615,22 @@ void ViewGestureController::beginSwipeGesture(WebBackForwardListItem* targetItem > m_swipeShadowLayer = adoptNS([[CAGradientLayer alloc] init]); > [m_swipeShadowLayer setName:@"Gesture Swipe Shadow Layer"]; > [m_swipeShadowLayer setColors:@[ >- (id)adoptCF(CGColorCreateGenericGray(0, 1.)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.99)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.98)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.95)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.92)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.82)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.71)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.46)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.35)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.25)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.17)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.11)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.07)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.04)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.01)).get(), >- (id)adoptCF(CGColorCreateGenericGray(0, 0.)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 1.)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.99)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.98)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.95)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.92)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.82)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.71)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.46)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.35)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.25)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.17)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.11)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.07)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.04)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.01)).get(), >+ (__bridge id)adoptCF(CGColorCreateGenericGray(0, 0.)).get(), > ]]; > [m_swipeShadowLayer setLocations:@[ > @0, >diff --git a/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm b/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >index 06762b553f14582c2e3691537cc3c62f769dc969..ea50e32077f2d7dd86da48aa70434b036e4eb11d 100644 >--- a/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >+++ b/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm >@@ -249,7 +249,7 @@ - (void)enterFullScreen:(NSScreen *)screen > [_webViewPlaceholder setAction:@selector(cancelOperation:)]; > } > [_webViewPlaceholder setTarget:nil]; >- [_webViewPlaceholder setContents:(id)webViewContents.get()]; >+ [_webViewPlaceholder setContents:(__bridge id)webViewContents.get()]; > self.savedConstraints = _webView.superview.constraints; > [self _replaceView:_webView with:_webViewPlaceholder.get()]; > >diff --git a/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >index bda42bc8e4eac1fb1820ce8e769253b230eb989c..fb81436c7374efa45b6873af13663c8d8f1610fc 100644 >--- a/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm >@@ -102,7 +102,7 @@ void WebPopupMenuProxyMac::showPopupMenu(const IntRect& rect, TextDirection text > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > NSFont *font; > if (data.fontInfo.fontAttributeDictionary) { >- NSFontDescriptor *fontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:(NSDictionary *)data.fontInfo.fontAttributeDictionary.get()]; >+ NSFontDescriptor *fontDescriptor = [NSFontDescriptor fontDescriptorWithFontAttributes:(__bridge NSDictionary *)data.fontInfo.fontAttributeDictionary.get()]; > font = [NSFont fontWithDescriptor:fontDescriptor size:((pageScaleFactor != 1) ? [fontDescriptor pointSize] * pageScaleFactor : 0)]; > } else > font = [NSFont menuFontOfSize:0]; >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm b/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm >index ef7c9b51c5f347feb9ffcce88a835a5990367a0e..d2cc616f153d34414c0026e22416ae57765175fc 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm >@@ -54,7 +54,7 @@ - (void)dealloc > > static void didCreatePage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo) > { >- WKWebProcessPlugInController *plugInController = (WKWebProcessPlugInController *)clientInfo; >+ auto plugInController = (__bridge WKWebProcessPlugInController *)clientInfo; > id <WKWebProcessPlugIn> principalClassInstance = plugInController->_principalClassInstance.get(); > > if ([principalClassInstance respondsToSelector:@selector(webProcessPlugIn:didCreateBrowserContextController:)]) >@@ -63,7 +63,7 @@ static void didCreatePage(WKBundleRef bundle, WKBundlePageRef page, const void* > > static void willDestroyPage(WKBundleRef bundle, WKBundlePageRef page, const void* clientInfo) > { >- WKWebProcessPlugInController *plugInController = (WKWebProcessPlugInController *)clientInfo; >+ auto plugInController = (__bridge WKWebProcessPlugInController *)clientInfo; > id <WKWebProcessPlugIn> principalClassInstance = plugInController->_principalClassInstance.get(); > > if ([principalClassInstance respondsToSelector:@selector(webProcessPlugIn:willDestroyBrowserContextController:)]) >@@ -76,7 +76,7 @@ static void setUpBundleClient(WKWebProcessPlugInController *plugInController, In > memset(&bundleClient, 0, sizeof(bundleClient)); > > bundleClient.base.version = 1; >- bundleClient.base.clientInfo = plugInController; >+ bundleClient.base.clientInfo = (__bridge void*)plugInController; > bundleClient.didCreatePage = didCreatePage; > bundleClient.willDestroyPage = willDestroyPage; > >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm b/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm >index 866db450d67caaa61f8e70d0bd2b34ea57598e76..d5e09363b545df9f9c497a6309bbb65e49aea14b 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm >@@ -84,7 +84,7 @@ @implementation WKWebProcessPlugInBrowserContextController { > > static void didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userDataRef, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didStartProvisionalLoadForFrame:)]) >@@ -93,7 +93,7 @@ static void didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameR > > static void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef *userDataRef, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didReceiveServerRedirectForProvisionalLoadForFrame:)]) >@@ -102,7 +102,7 @@ static void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef p > > static void didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didFinishLoadForFrame:)]) >@@ -111,7 +111,7 @@ static void didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, > > static void globalObjectIsAvailableForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleScriptWorldRef scriptWorld, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:globalObjectIsAvailableForFrame:inScriptWorld:)]) >@@ -120,7 +120,7 @@ static void globalObjectIsAvailableForFrame(WKBundlePageRef page, WKBundleFrameR > > static void didRemoveFrameFromHierarchy(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didRemoveFrameFromHierarchy:)]) >@@ -129,7 +129,7 @@ static void didRemoveFrameFromHierarchy(WKBundlePageRef page, WKBundleFrameRef f > > static void didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didCommitLoadForFrame:)]) >@@ -138,7 +138,7 @@ static void didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, > > static void didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:)]) >@@ -147,7 +147,7 @@ static void didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef > > static void didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef wkError, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didFailProvisionalLoadWithErrorForFrame:error:)]) >@@ -156,7 +156,7 @@ static void didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBund > > static void didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef wkError, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didFailLoadWithErrorForFrame:error:)]) >@@ -165,7 +165,7 @@ static void didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef > > static void didSameDocumentNavigationForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:)]) >@@ -179,7 +179,7 @@ static void didSameDocumentNavigationForFrame(WKBundlePageRef page, WKBundleFram > > static void didLayoutForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didLayoutForFrame:)]) >@@ -188,7 +188,7 @@ static void didLayoutForFrame(WKBundlePageRef page, WKBundleFrameRef frame, cons > > static void didReachLayoutMilestone(WKBundlePageRef page, WKLayoutMilestones milestones, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:renderingProgressDidChange:)]) >@@ -197,7 +197,7 @@ static void didReachLayoutMilestone(WKBundlePageRef page, WKLayoutMilestones mil > > static void didFirstVisuallyNonEmptyLayoutForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didFirstVisuallyNonEmptyLayoutForFrame:)]) >@@ -206,7 +206,7 @@ static void didFirstVisuallyNonEmptyLayoutForFrame(WKBundlePageRef page, WKBundl > > static void didHandleOnloadEventsForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:didHandleOnloadEventsForFrame:)]) >@@ -215,7 +215,7 @@ static void didHandleOnloadEventsForFrame(WKBundlePageRef page, WKBundleFrameRef > > static WKStringRef userAgentForURL(WKBundleFrameRef frame, WKURLRef url, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:frame:userAgentForURL:)]) { >@@ -224,8 +224,7 @@ static WKStringRef userAgentForURL(WKBundleFrameRef frame, WKURLRef url, const v > if (!string) > return nullptr; > >- WKStringRef wkString = WKStringCreateWithCFString((CFStringRef)string); >- return wkString; >+ return WKStringCreateWithCFString((__bridge CFStringRef)string); > } > > return nullptr; >@@ -237,7 +236,7 @@ static void setUpPageLoaderClient(WKWebProcessPlugInBrowserContextController *co > memset(&client, 0, sizeof(client)); > > client.base.version = 8; >- client.base.clientInfo = contextController; >+ client.base.clientInfo = (__bridge void*)contextController; > client.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame; > client.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame; > client.didCommitLoadForFrame = didCommitLoadForFrame; >@@ -260,7 +259,7 @@ static void setUpPageLoaderClient(WKWebProcessPlugInBrowserContextController *co > > static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, WKURLResponseRef redirectResponse, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:)]) { >@@ -285,7 +284,7 @@ static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef > > static void didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, bool pageIsProvisionallyLoading, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:frame:didInitiateLoadForResource:request:pageIsProvisionallyLoading:)]) { >@@ -298,7 +297,7 @@ static void didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef frame, > > static void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:frame:didFinishLoadForResource:)]) { >@@ -310,7 +309,7 @@ static void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef frame, ui > > static void didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKErrorRef error, const void* clientInfo) > { >- WKWebProcessPlugInBrowserContextController *pluginContextController = (WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; > auto loadDelegate = pluginContextController->_loadDelegate.get(); > > if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextController:frame:didFailLoadForResource:error:)]) { >@@ -327,7 +326,7 @@ static void setUpResourceLoadClient(WKWebProcessPlugInBrowserContextController * > memset(&client, 0, sizeof(client)); > > client.base.version = 1; >- client.base.clientInfo = contextController; >+ client.base.clientInfo = (__bridge void*) contextController; > client.willSendRequestForFrame = willSendRequestForFrame; > client.didInitiateLoadForResource = didInitiateLoadForResource; > client.didFinishLoadForResource = didFinishLoadForResource; >diff --git a/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm b/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm >index b9d29a7b8e9fde1e84c41c2c9a6550f719996770..6d3e8d9618e78e35a918823c52e1155e2d338105 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm >+++ b/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm >@@ -73,7 +73,7 @@ bool InjectedBundle::initialize(const WebProcessCreationParameters& parameters, > return false; > } > >- m_platformBundle = [[NSBundle alloc] initWithURL:(NSURL *)bundleURL.get()]; >+ m_platformBundle = [[NSBundle alloc] initWithURL:(__bridge NSURL *)bundleURL.get()]; > if (!m_platformBundle) { > WTFLogAlways("InjectedBundle::load failed - Could not create the bundle.\n"); > return false; >diff --git a/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm b/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >index ec3ca5d40aa764a12d937d4cf27d971b4aa9873b..8bbed6bedc9517ea7f7e5ab4f7b9092f577bc1c2 100644 >--- a/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >+++ b/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm >@@ -167,7 +167,7 @@ NPError NetscapePlugin::popUpContextMenu(NPMenu* npMenu) > if (!convertPoint(m_currentMouseEvent->data.mouse.pluginX, m_currentMouseEvent->data.mouse.pluginY, NPCoordinateSpacePlugin, screenX, screenY, NPCoordinateSpaceScreen)) > ASSERT_NOT_REACHED(); > >- _NSPopUpCarbonMenu3(reinterpret_cast<NSMenu *>(npMenu), nil, nil, NSMakePoint(screenX, screenY), -1, nil, 0, nil, NSPopUpMenuTypeContext, nil); >+ _NSPopUpCarbonMenu3((__bridge NSMenu *)npMenu, nil, nil, NSMakePoint(screenX, screenY), -1, nil, 0, nil, NSPopUpMenuTypeContext, nil); > return NPERR_NO_ERROR; > } > >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >index 79a34edc0c7f1076d2333945e97ecd10965d1a8c..e58de2c760ddb14c12c4cbfbf75ce92f5ab8e01a 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >@@ -249,8 +249,10 @@ private: > WebCore::IntSize pdfDocumentSize() const { return m_pdfDocumentSize; } > void setPDFDocumentSize(WebCore::IntSize size) { m_pdfDocumentSize = size; } > >+#ifdef __OBJC__ > NSData *liveData() const; >- NSData *rawData() const { return (NSData *)m_data.get(); } >+ NSData *rawData() const { return (__bridge NSData *)m_data.get(); } >+#endif > > WebFrame* webFrame() const { return m_frame; } > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >index f65cb24c625c12e64ce5da7cdd42e608de8086b3..71f673a8596f4e29d935bd03a20aea5f3e6fcbd3 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >+++ b/Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm >@@ -154,7 +154,7 @@ void WebDragClient::declareAndWriteDragImage(const String& pasteboardName, Eleme > SharedMemory::Handle archiveHandle; > size_t archiveSize = 0; > if (data) { >- RefPtr<SharedBuffer> archiveBuffer = SharedBuffer::create((NSData *)data.get()); >+ auto archiveBuffer = SharedBuffer::create((__bridge NSData *)data.get()); > RefPtr<SharedMemory> archiveSharedMemoryBuffer = SharedMemory::allocate(archiveBuffer->size()); > if (!archiveSharedMemoryBuffer) > return; >diff --git a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >index 7e6d6655b7903eafcf497ffb89fbd479c5e79a0a..4603dd65da2d8668339a33a4c6aabb28a99dc4bd 100644 >--- a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >+++ b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >@@ -137,12 +137,12 @@ Ref<WebCore::PlatformCALayer> PlatformCALayerRemoteCustom::clone(PlatformCALayer > > CFTypeRef PlatformCALayerRemoteCustom::contents() const > { >- return [m_platformLayer contents]; >+ return (__bridge CFTypeRef)[m_platformLayer contents]; > } > > void PlatformCALayerRemoteCustom::setContents(CFTypeRef contents) > { >- [m_platformLayer setContents:(id)contents]; >+ [m_platformLayer setContents:(__bridge id)contents]; > } > > void PlatformCALayerRemoteCustom::setNeedsDisplayInRect(const FloatRect& rect) >diff --git a/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm b/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >index d02ed721a7b0aa2c9f00dd8d1b6995573dbc2d83..0082cba676e5e6a607169ec1d15cc6aa7f7a4a39 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >@@ -845,7 +845,7 @@ void TiledCoreAnimationDrawingArea::commitTransientZoom(double scale, FloatPoint > RetainPtr<CABasicAnimation> shadowPositionAnimation = transientZoomSnapAnimationForKeyPath("position"); > [shadowPositionAnimation setToValue:[NSValue valueWithPoint:shadowLayerPositionForFrame(frameView, constrainedOrigin)]]; > RetainPtr<CABasicAnimation> shadowPathAnimation = transientZoomSnapAnimationForKeyPath("shadowPath"); >- [shadowPathAnimation setToValue:(id)shadowPath.get()]; >+ [shadowPathAnimation setToValue:(__bridge id)shadowPath.get()]; > > [shadowCALayer addAnimation:shadowBoundsAnimation.get() forKey:@"transientZoomCommitShadowBounds"]; > [shadowCALayer addAnimation:shadowPositionAnimation.get() forKey:@"transientZoomCommitShadowPosition"]; >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >index c9a40814db14f64f788256bb2398c81c2962a192..2555c3d0aebd5db49d0932b9a64eeb9240831ddf 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >@@ -734,7 +734,7 @@ void WebPage::setTopOverhangImage(WebImage* image) > > layer->setSize(image->size()); > layer->setPosition(FloatPoint(0, -image->size().height())); >- layer->platformLayer().contents = (id)image->bitmap().makeCGImageCopy().get(); >+ layer->platformLayer().contents = (__bridge id)image->bitmap().makeCGImageCopy().get(); > } > > void WebPage::setBottomOverhangImage(WebImage* image) >@@ -748,7 +748,7 @@ void WebPage::setBottomOverhangImage(WebImage* image) > return; > > layer->setSize(image->size()); >- layer->platformLayer().contents = (id)image->bitmap().makeCGImageCopy().get(); >+ layer->platformLayer().contents = (__bridge id)image->bitmap().makeCGImageCopy().get(); > } > > void WebPage::updateHeaderAndFooterLayersForDeviceScaleChange(float scaleFactor)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
andersca
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186314
: 341984