<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[235365] trunk/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/235365">235365</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2018-08-27 08:51:24 -0700 (Mon, 27 Aug 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Adapt more WebKit code to be ARC-compatible
https://bugs.webkit.org/show_bug.cgi?id=188955

Reviewed by Anders Carlsson.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Use __strong for an in/out argument.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
Use __strong for a in/out argument.
(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy): Call a NSURLSessionTask
method using an explicit category declaration rather than by using performSelector:
since ARC is unable to correctly compile a call when it doesn't know argument and
result types.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::initializeCocoaOverrides): Add some __bridge casts.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm: Use HashSet<CFTypeRef> instead of
HashSet<Class> since Class ia an ARC-managed type and WTF hash tables can't
currently handle those as key types.
(-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]): Changed types and added casts
to adapt to the above.
(decodeObjectFromObjectStream): Ditto.
(checkIfClassIsAllowed): Ditto.
(decodeInvocationArguments): Ditto.
(decodeObject): Ditto.
(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]): Ditto.
(-[WKRemoteObjectDecoder allowedClasses]): Ditto.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(propertyListClasses): Ditto.
(initializeMethod): Ditto.
(-[_WKRemoteObjectInterface debugDescription]): Ditto.
(classesForSelectorArgument): Ditto.
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]): Ditto.
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]): Ditto.
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Ditto.
(-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]): Ditto.
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Ditto.

* Shared/API/c/cf/WKStringCF.mm:
(WKStringCreateWithCFString): Use CFRetain instead of -[NSObject retain]. Also use
a __bridge cast.
* Shared/API/c/cf/WKURLCF.mm:
(WKURLCreateWithCFURL): Ditto.

* Shared/Cocoa/APIObject.mm:
(API::Object::ref): Added a __bridge cast.
(API::Object::deref): Ditto.
(API::allocateWKObject): Use class_createInstance instead of NSAllocateObject.
(API::Object::wrap): Use a __bridge cast.
(API::Object::unwrap): Ditto.

* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h: Use CFTypeRef for layers
or views in the RelatedLayerMap since we don't want the items retained, and can't
use __unsafe_uretained because the header is used in non-Objective-C contexts.
* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Added __bridge casts,
needed because of the above change.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(WebKit::browsingContextControllerMap): Use __unsafe_unretained.

* UIProcess/API/Cocoa/WKConnection.mm:
(didReceiveMessage): Use a __bridge cast.

* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
Use a retain here so we don't have to have a "releasesArgument:" boolean. The cost of a single
retain/release pair should be infinitesmal compared to the entire process of compiling.
(-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
Moved the code for the "releases argument" version here since the private method is now the
actual method that does the work. The public method now simply calls this private one after
doing a retain. The optimization of releasing the argument at the correct moment should be intact.

* UIProcess/API/Cocoa/WKHTTPCookieStore.mm: Use CFTypeRef for the key to the _observers
HashMap since the WTF collections can't yet handle ARC types for keys.
(-[WKHTTPCookieStore addObserver:]): Added __bridge cast for compatibility with the above.
(-[WKHTTPCookieStore removeObserver:]): Ditto.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(setUpConnectionClient): Added a __bridge cast.
(setUpHistoryClient): Ditto.

* UIProcess/API/Cocoa/WKViewPrivate.h: Added a declaration of the
-[WKView _shouldLoadIconWithParameters:completionHandler:] method. This peculiar idiom
should be removed, but I didn't bother doing that since the entire WKView class is already
deprecated and so will eventually be removed.

* UIProcess/API/Cocoa/WKWebView.mm: Use __unsafe_unretained for the keys in the page to
view map.
(accessibilityEventsEnabledChangedCallback): Use a __bridge cast.
(-[WKWebView _certificateChain]): Ditto.
(-[WKWebView certificateChain]): Ditto.

* UIProcess/API/mac/WKView.mm:
(-[WKView maybeInstallIconLoadingClient]): Call the method
_shouldLoadIconWithParameters:completionHandler: in a normal way rather than using
performSelector:withObject:withObject: since ARC is unable to correctly compile a call
when it doesn't know argument and result types.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey): Use the overload
of API::Data::createWithoutCopying that knows how to work with an NSData rather than
re-implementing it here.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto. Also removed unneeded
use of RetainPtr.

* UIProcess/Cocoa/WebViewImpl.h: Use NSObject * as the result type of
immediateActionAnimationControllerForHitTestResult. Our techniques for defining such
functions in headers while remaining compatible with non-Objective-C will still work
fine given how we use this, and converting to and from void* rather than NSObject *
would be difficult to do correctly under ARC.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::acceptsFirstMouse): Use CFRetain/CFAutorelease instead of
retain/autorelease.
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent): Ditto.
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
Updated return type to NSObject *.
(WebKit::WebViewImpl::performKeyEquivalent): Use CFRetain/CFAutorelease.

* UIProcess/PageClient.h: Use NSObject * as the result type, as above.

* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree): Use __bridge casts to be compatible
with the changes to the RelatedLayerMap types.
(WebKit::recursivelyMapIOSurfaceBackingStore): Use __bridge cast.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
Use NSObject * as the result type, as above.
* Source/WebKit/UIProcess/WebPageProxy.h: Ditto.

* UIProcess/mac/PageClientImplMac.h: Use NSObject * as the result type, as above.
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
Ditto.
(WebKit::PageClientImpl::refView): Use __bridge cast.
(WebKit::PageClientImpl::derefView): Ditto.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::refreshExistingServices): Removed unnecessary use
of NeverDestroyed for Objective-C object pointers. Simpler and more efficient
both with and without ARC.

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _updateImmediateActionItem]): Removed unneeded
cast now that immediateActionAnimationControllerForHitTestResult has a more
accurate return type.

* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView dealloc]): Use a more direct approach to making sure we do the
non-thread-safe actions on the main thread with a call to callOnMainThread.
The old solution, WebCoreObjCScheduleDeallocateOnMainThread, may not be possible
in an ARC-compatible way, but this one should work fine.
(linkDestinationName): Changed to return an NSString * to make sure we get the
object lifetimes correct under ARC.
(-[WKPrintingView _drawPDFDocument:page:atPoint:]): Added __bridge casts.

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Use __unsafe_unretained
for the value types in DOM caches.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toWKDOMNode): Updated for the above.
(WebKit::toWKDOMRange): Ditto.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPreInitialize): Rewrote the class_replaceMethod
call to sidestep the rules about not using @selector(release) under ARC.
(WebKit::NetscapePlugin::updatePluginLayer): Use __bridge casts.

* WebProcess/Plugins/PDF/PDFPlugin.mm: Added an include of
WebAccessibilityObjectWrapperMac.h, without which this code doesn't compile
under ARC.

* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::changeWordCase): Use a function rather than a selector, since ARC is unable
to correctly compile a method call when it doesn't know argument and result types.
(WebKit::WebEditorClient::uppercaseWord): Updated to use a function rather than a selector.
(WebKit::WebEditorClient::lowercaseWord): Ditto.
(WebKit::WebEditorClient::capitalizeWord): Ditto.

* WebProcess/cocoa/WebProcessCocoa.mm: Added an include of
WebAccessibilityObjectWrapperIOS/Mac.h, without which this code doesn't compile
under ARC.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoah">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm">trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitPluginProcessmacPluginProcessMacmm">trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm</a></li>
<li><a href="#trunkSourceWebKitSharedAPICocoaWKRemoteObjectCodermm">trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm</a></li>
<li><a href="#trunkSourceWebKitSharedAPICocoa_WKRemoteObjectInterfacemm">trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm</a></li>
<li><a href="#trunkSourceWebKitSharedAPICocoa_WKRemoteObjectInterfaceInternalh">trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h</a></li>
<li><a href="#trunkSourceWebKitSharedAPIccfWKStringCFmm">trunk/Source/WebKit/Shared/API/c/cf/WKStringCF.mm</a></li>
<li><a href="#trunkSourceWebKitSharedAPIccfWKURLCFmm">trunk/Source/WebKit/Shared/API/c/cf/WKURLCF.mm</a></li>
<li><a href="#trunkSourceWebKitSharedCocoaAPIObjectmm">trunk/Source/WebKit/Shared/Cocoa/APIObject.mm</a></li>
<li><a href="#trunkSourceWebKitSharedRemoteLayerTreeRemoteLayerTreePropertyApplierh">trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h</a></li>
<li><a href="#trunkSourceWebKitSharedRemoteLayerTreeRemoteLayerTreePropertyAppliermm">trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKBrowsingContextControllermm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKConnectionmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKContentRuleListStoremm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKHTTPCookieStoremm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKProcessGroupmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKViewPrivateh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPImacWKViewmm">trunk/Source/WebKit/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaNavigationStatemm">trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebProcessPoolCocoamm">trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebViewImplh">trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebViewImplmm">trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessPageClienth">trunk/Source/WebKit/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessRemoteLayerTreeRemoteLayerTreeHostmm">trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacPageClientImplMach">trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacPageClientImplMacmm">trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacServicesControllermm">trunk/Source/WebKit/UIProcess/mac/ServicesController.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWKImmediateActionControllermm">trunk/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWKPrintingViewmm">trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPImacWKDOMInternalsh">trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPImacWKDOMInternalsmm">trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessPluginsNetscapemacNetscapePluginMacmm">trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessPluginsPDFPDFPluginmm">trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebCoreSupportmacWebEditorClientMacmm">trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcesscocoaWebProcessCocoamm">trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/ChangeLog       2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -1,3 +1,191 @@
</span><ins>+2018-08-26  Darin Adler  <darin@apple.com>
+
+        [Cocoa] Adapt more WebKit code to be ARC-compatible
+        https://bugs.webkit.org/show_bug.cgi?id=188955
+
+        Reviewed by Anders Carlsson.
+
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Use __strong for an in/out argument.
+        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+        (WebKit::NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded):
+        Use __strong for a in/out argument.
+        (WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy): Call a NSURLSessionTask
+        method using an explicit category declaration rather than by using performSelector:
+        since ARC is unable to correctly compile a call when it doesn't know argument and
+        result types.
+
+        * PluginProcess/mac/PluginProcessMac.mm:
+        (WebKit::initializeCocoaOverrides): Add some __bridge casts.
+
+        * Shared/API/Cocoa/WKRemoteObjectCoder.mm: Use HashSet<CFTypeRef> instead of
+        HashSet<Class> since Class ia an ARC-managed type and WTF hash tables can't
+        currently handle those as key types.
+        (-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]): Changed types and added casts
+        to adapt to the above.
+        (decodeObjectFromObjectStream): Ditto.
+        (checkIfClassIsAllowed): Ditto.
+        (decodeInvocationArguments): Ditto.
+        (decodeObject): Ditto.
+        (-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]): Ditto.
+        (-[WKRemoteObjectDecoder allowedClasses]): Ditto.
+        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
+        (propertyListClasses): Ditto.
+        (initializeMethod): Ditto.
+        (-[_WKRemoteObjectInterface debugDescription]): Ditto.
+        (classesForSelectorArgument): Ditto.
+        (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:ofReply:]): Ditto.
+        (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:ofReply:]): Ditto.
+        (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Ditto.
+        (-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]): Ditto.
+        * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Ditto.
+
+        * Shared/API/c/cf/WKStringCF.mm:
+        (WKStringCreateWithCFString): Use CFRetain instead of -[NSObject retain]. Also use
+        a __bridge cast.
+        * Shared/API/c/cf/WKURLCF.mm:
+        (WKURLCreateWithCFURL): Ditto.
+
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::ref): Added a __bridge cast.
+        (API::Object::deref): Ditto.
+        (API::allocateWKObject): Use class_createInstance instead of NSAllocateObject.
+        (API::Object::wrap): Use a __bridge cast.
+        (API::Object::unwrap): Ditto.
+
+        * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h: Use CFTypeRef for layers
+        or views in the RelatedLayerMap since we don't want the items retained, and can't
+        use __unsafe_uretained because the header is used in non-Objective-C contexts.
+        * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
+        (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Added __bridge casts,
+        needed because of the above change.
+
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (WebKit::browsingContextControllerMap): Use __unsafe_unretained.
+
+        * UIProcess/API/Cocoa/WKConnection.mm:
+        (didReceiveMessage): Use a __bridge cast.
+
+        * UIProcess/API/Cocoa/WKContentRuleListStore.mm:
+        (-[WKContentRuleListStore compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
+        Use a retain here so we don't have to have a "releasesArgument:" boolean. The cost of a single
+        retain/release pair should be infinitesmal compared to the entire process of compiling.
+        (-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:]):
+        Moved the code for the "releases argument" version here since the private method is now the
+        actual method that does the work. The public method now simply calls this private one after
+        doing a retain. The optimization of releasing the argument at the correct moment should be intact.
+
+        * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: Use CFTypeRef for the key to the _observers
+        HashMap since the WTF collections can't yet handle ARC types for keys.
+        (-[WKHTTPCookieStore addObserver:]): Added __bridge cast for compatibility with the above.
+        (-[WKHTTPCookieStore removeObserver:]): Ditto.
+
+        * UIProcess/API/Cocoa/WKProcessGroup.mm:
+        (setUpConnectionClient): Added a __bridge cast.
+        (setUpHistoryClient): Ditto.
+
+        * UIProcess/API/Cocoa/WKViewPrivate.h: Added a declaration of the
+        -[WKView _shouldLoadIconWithParameters:completionHandler:] method. This peculiar idiom
+        should be removed, but I didn't bother doing that since the entire WKView class is already
+        deprecated and so will eventually be removed.
+
+        * UIProcess/API/Cocoa/WKWebView.mm: Use __unsafe_unretained for the keys in the page to
+        view map.
+        (accessibilityEventsEnabledChangedCallback): Use a __bridge cast.
+        (-[WKWebView _certificateChain]): Ditto.
+        (-[WKWebView certificateChain]): Ditto.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView maybeInstallIconLoadingClient]): Call the method
+        _shouldLoadIconWithParameters:completionHandler: in a normal way rather than using
+        performSelector:withObject:withObject: since ARC is unable to correctly compile a call
+        when it doesn't know argument and result types.
+
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::NavigationClient::webCryptoMasterKey): Use the overload
+        of API::Data::createWithoutCopying that knows how to work with an NSData rather than
+        re-implementing it here.
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto. Also removed unneeded
+        use of RetainPtr.
+
+        * UIProcess/Cocoa/WebViewImpl.h: Use NSObject * as the result type of
+        immediateActionAnimationControllerForHitTestResult. Our techniques for defining such
+        functions in headers while remaining compatible with non-Objective-C will still work
+        fine given how we use this, and converting to and from void* rather than NSObject *
+        would be difficult to do correctly under ARC.
+
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::acceptsFirstMouse): Use CFRetain/CFAutorelease instead of
+        retain/autorelease.
+        (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent): Ditto.
+        (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
+        Updated return type to NSObject *.
+        (WebKit::WebViewImpl::performKeyEquivalent): Use CFRetain/CFAutorelease.
+
+        * UIProcess/PageClient.h: Use NSObject * as the result type, as above.
+
+        * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::updateLayerTree): Use __bridge casts to be compatible
+        with the changes to the RelatedLayerMap types.
+        (WebKit::recursivelyMapIOSurfaceBackingStore): Use __bridge cast.
+
+        * Source/WebKit/UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
+        Use NSObject * as the result type, as above.
+        * Source/WebKit/UIProcess/WebPageProxy.h: Ditto.
+
+        * UIProcess/mac/PageClientImplMac.h: Use NSObject * as the result type, as above.
+        * UIProcess/mac/PageClientImplMac.mm:
+        (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
+        Ditto.
+        (WebKit::PageClientImpl::refView): Use __bridge cast.
+        (WebKit::PageClientImpl::derefView): Ditto.
+
+        * UIProcess/mac/ServicesController.mm:
+        (WebKit::ServicesController::refreshExistingServices): Removed unnecessary use
+        of NeverDestroyed for Objective-C object pointers. Simpler and more efficient
+        both with and without ARC.
+
+        * UIProcess/mac/WKImmediateActionController.mm:
+        (-[WKImmediateActionController _updateImmediateActionItem]): Removed unneeded
+        cast now that immediateActionAnimationControllerForHitTestResult has a more
+        accurate return type.
+
+        * UIProcess/mac/WKPrintingView.mm:
+        (-[WKPrintingView dealloc]): Use a more direct approach to making sure we do the
+        non-thread-safe actions on the main thread with a call to callOnMainThread.
+        The old solution, WebCoreObjCScheduleDeallocateOnMainThread, may not be possible
+        in an ARC-compatible way, but this one should work fine.
+        (linkDestinationName): Changed to return an NSString * to make sure we get the
+        object lifetimes correct under ARC.
+        (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Added __bridge casts.
+
+        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Use __unsafe_unretained
+        for the value types in DOM caches.
+        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
+        (WebKit::toWKDOMNode): Updated for the above.
+        (WebKit::toWKDOMRange): Ditto.
+
+        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
+        (WebKit::NetscapePlugin::platformPreInitialize): Rewrote the class_replaceMethod
+        call to sidestep the rules about not using @selector(release) under ARC.
+        (WebKit::NetscapePlugin::updatePluginLayer): Use __bridge casts.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm: Added an include of
+        WebAccessibilityObjectWrapperMac.h, without which this code doesn't compile
+        under ARC.
+
+        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+        (WebKit::changeWordCase): Use a function rather than a selector, since ARC is unable
+        to correctly compile a method call when it doesn't know argument and result types.
+        (WebKit::WebEditorClient::uppercaseWord): Updated to use a function rather than a selector.
+        (WebKit::WebEditorClient::lowercaseWord): Ditto.
+        (WebKit::WebEditorClient::capitalizeWord): Ditto.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm: Added an include of
+        WebAccessibilityObjectWrapperIOS/Mac.h, without which this code doesn't compile
+        under ARC.
+
</ins><span class="cx"> 2018-08-27  Alex Christensen  <achristensen@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Fix authentication for clients of WKPageLoaderClient after r234941
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, uint64_t frameID, uint64_t pageID, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, std::optional<NetworkActivityTracker>);
</span><span class="cx"> 
</span><span class="cx">     bool tryPasswordBasedAuthentication(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&);
</span><del>-    void applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(NSURLRequest*&, bool shouldContentSniff, bool shouldContentEncodingSniff);
</del><ins>+    void applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(__strong NSURLRequest*&, bool shouldContentSniff, bool shouldContentEncodingSniff);
</ins><span class="cx"> 
</span><span class="cx"> #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
</span><span class="cx">     static NSHTTPCookieStorage *statelessCookieStorage();
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscocoaNetworkDataTaskCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm 2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm    2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -56,6 +56,15 @@
</span><span class="cx"> #import <CFNetwork/CFNSURLConnection.h>
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
+
+// FIXME: Move to CFNetworkSPI.h?
+@interface NSURLSessionTask ()
+- (void)_setExplicitCookieStorage:(CFHTTPCookieStorageRef)storage;
+@end
+
+#endif
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> #if USE(CREDENTIAL_STORAGE_WITH_NETWORK_SESSION)
</span><span class="lines">@@ -85,7 +94,7 @@
</span><span class="cx">     return NSURLSessionTaskPriorityDefault;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(NSURLRequest*& nsRequest, bool shouldContentSniff, bool shouldContentEncodingSniff)
</del><ins>+void NetworkDataTaskCocoa::applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(__strong NSURLRequest *& nsRequest, bool shouldContentSniff, bool shouldContentEncodingSniff)
</ins><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(MAC)
</span><span class="cx">     UNUSED_PARAM(shouldContentEncodingSniff);
</span><span class="lines">@@ -119,6 +128,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
</span><ins>+
</ins><span class="cx"> NSHTTPCookieStorage *NetworkDataTaskCocoa::statelessCookieStorage()
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed<RetainPtr<NSHTTPCookieStorage>> statelessCookieStorage;
</span><span class="lines">@@ -144,10 +154,11 @@
</span><span class="cx">     if (shouldBlock == m_hasBeenSetToUseStatelessCookieStorage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    NSHTTPCookieStorage *storage = shouldBlock ? statelessCookieStorage(): m_session->networkStorageSession().nsCookieStorage();
-    [m_task performSelector:NSSelectorFromString(@"_setExplicitCookieStorage:") withObject:(NSObject*)storage._cookieStorage];
</del><ins>+    NSHTTPCookieStorage *storage = shouldBlock ? statelessCookieStorage() : m_session->networkStorageSession().nsCookieStorage();
+    [m_task _setExplicitCookieStorage:storage._cookieStorage];
</ins><span class="cx">     m_hasBeenSetToUseStatelessCookieStorage = shouldBlock;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> bool NetworkDataTaskCocoa::isThirdPartyRequest(const WebCore::ResourceRequest& request)
</span></span></pre></div>
<a id="trunkSourceWebKitPluginProcessmacPluginProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm        2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm   2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -453,8 +453,8 @@
</span><span class="cx">                                                        usingBlock:^(NSNotification *notification) { fullscreenWindowTracker().windowHidden([notification object]); }];
</span><span class="cx"> 
</span><span class="cx">     // Leak the two observers so that they observe notifications for the lifetime of the process.
</span><del>-    CFRetain(orderOnScreenObserver);
-    CFRetain(orderOffScreenObserver);
</del><ins>+    CFRetain((__bridge CFTypeRef)orderOnScreenObserver);
+    CFRetain((__bridge CFTypeRef)orderOffScreenObserver);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginProcess::setModalWindowIsShowing(bool modalWindowIsShowing)
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPICocoaWKRemoteObjectCodermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm      2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/API/Cocoa/WKRemoteObjectCoder.mm 2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx">     const API::Array* _objectStream;
</span><span class="cx">     size_t _objectStreamPosition;
</span><span class="cx"> 
</span><del>-    const HashSet<Class>* _allowedClasses;
</del><ins>+    const HashSet<CFTypeRef>* _allowedClasses;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const API::Dictionary*)rootObjectDictionary replyToSelector:(SEL)replyToSelector
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx">     switch (*type) {
</span><span class="cx">     // int
</span><span class="cx">     case 'i':
</span><del>-        *static_cast<int*>(data) = [decodeObjectFromObjectStream(self, { [NSNumber class] }) intValue];
</del><ins>+        *static_cast<int*>(data) = [decodeObjectFromObjectStream(self, { (__bridge CFTypeRef)[NSNumber class] }) intValue];
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     default:
</span><span class="lines">@@ -433,9 +433,9 @@
</span><span class="cx">     return [self decodeObjectOfClasses:nil forKey:key];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static id decodeObject(WKRemoteObjectDecoder *, const API::Dictionary*, const HashSet<Class>& allowedClasses);
</del><ins>+static id decodeObject(WKRemoteObjectDecoder *, const API::Dictionary*, const HashSet<CFTypeRef>& allowedClasses);
</ins><span class="cx"> 
</span><del>-static id decodeObjectFromObjectStream(WKRemoteObjectDecoder *decoder, const HashSet<Class>& allowedClasses)
</del><ins>+static id decodeObjectFromObjectStream(WKRemoteObjectDecoder *decoder, const HashSet<CFTypeRef>& allowedClasses)
</ins><span class="cx"> {
</span><span class="cx">     if (!decoder->_objectStream)
</span><span class="cx">         return nil;
</span><span class="lines">@@ -454,11 +454,11 @@
</span><span class="cx">     if (!allowedClasses)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (allowedClasses->contains(objectClass))
</del><ins>+    if (allowedClasses->contains((__bridge CFTypeRef)objectClass))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     for (Class superclass = class_getSuperclass(objectClass); superclass; superclass = class_getSuperclass(superclass)) {
</span><del>-        if (allowedClasses->contains(superclass))
</del><ins>+        if (allowedClasses->contains((__bridge CFTypeRef)superclass))
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -478,7 +478,7 @@
</span><span class="cx">     [decoder validateClassSupportsSecureCoding:objectClass];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void decodeInvocationArguments(WKRemoteObjectDecoder *decoder, NSInvocation *invocation, const Vector<HashSet<Class>>& allowedArgumentClasses, NSUInteger firstArgument)
</del><ins>+static void decodeInvocationArguments(WKRemoteObjectDecoder *decoder, NSInvocation *invocation, const Vector<HashSet<CFTypeRef>>& allowedArgumentClasses, NSUInteger firstArgument)
</ins><span class="cx"> {
</span><span class="cx">     NSMethodSignature *methodSignature = invocation.methodSignature;
</span><span class="cx">     NSUInteger argumentCount = methodSignature.numberOfArguments;
</span><span class="lines">@@ -491,7 +491,7 @@
</span><span class="cx">         switch (*type) {
</span><span class="cx">         // double
</span><span class="cx">         case 'd': {
</span><del>-            double value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) doubleValue];
</del><ins>+            double value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) doubleValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -498,7 +498,7 @@
</span><span class="cx"> 
</span><span class="cx">         // float
</span><span class="cx">         case 'f': {
</span><del>-            float value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) floatValue];
</del><ins>+            float value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) floatValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx"> 
</span><span class="cx">         // int
</span><span class="cx">         case 'i': {
</span><del>-            int value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) intValue];
</del><ins>+            int value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) intValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx"> 
</span><span class="cx">         // unsigned
</span><span class="cx">         case 'I': {
</span><del>-            unsigned value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) unsignedIntValue];
</del><ins>+            unsigned value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) unsignedIntValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx"> 
</span><span class="cx">         // char
</span><span class="cx">         case 'c': {
</span><del>-            char value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) charValue];
</del><ins>+            char value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) charValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -526,7 +526,7 @@
</span><span class="cx"> 
</span><span class="cx">         // bool
</span><span class="cx">         case 'B': {
</span><del>-            bool value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) boolValue];
</del><ins>+            bool value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) boolValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -533,7 +533,7 @@
</span><span class="cx"> 
</span><span class="cx">         // long
</span><span class="cx">         case 'q': {
</span><del>-            long value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) longValue];
</del><ins>+            long value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) longValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> 
</span><span class="cx">         // unsigned long
</span><span class="cx">         case 'Q': {
</span><del>-            unsigned long value = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) unsignedLongValue];
</del><ins>+            unsigned long value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) unsignedLongValue];
</ins><span class="cx">             [invocation setArgument:&value atIndex:i];
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -559,13 +559,13 @@
</span><span class="cx">         // struct
</span><span class="cx">         case '{':
</span><span class="cx">             if (!strcmp(type, @encode(NSRange))) {
</span><del>-                NSRange value = [decodeObjectFromObjectStream(decoder, { [NSValue class] }) rangeValue];
</del><ins>+                NSRange value = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSValue class] }) rangeValue];
</ins><span class="cx">                 [invocation setArgument:&value atIndex:i];
</span><span class="cx">                 break;
</span><span class="cx">             } else if (!strcmp(type, @encode(CGSize))) {
</span><span class="cx">                 CGSize value;
</span><del>-                value.width = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) doubleValue];
-                value.height = [decodeObjectFromObjectStream(decoder, { [NSNumber class] }) doubleValue];
</del><ins>+                value.width = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) doubleValue];
+                value.height = [decodeObjectFromObjectStream(decoder, { (__bridge CFTypeRef)[NSNumber class] }) doubleValue];
</ins><span class="cx">                 [invocation setArgument:&value atIndex:i];
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="lines">@@ -675,7 +675,7 @@
</span><span class="cx">     return [result autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static id decodeObject(WKRemoteObjectDecoder *decoder, const API::Dictionary* dictionary, const HashSet<Class>& allowedClasses)
</del><ins>+static id decodeObject(WKRemoteObjectDecoder *decoder, const API::Dictionary* dictionary, const HashSet<CFTypeRef>& allowedClasses)
</ins><span class="cx"> {
</span><span class="cx">     if (!dictionary)
</span><span class="cx">         return nil;
</span><span class="lines">@@ -686,7 +686,7 @@
</span><span class="cx">     if (allowedClasses.isEmpty())
</span><span class="cx">         return decodeObject(decoder);
</span><span class="cx"> 
</span><del>-    SetForScope<const HashSet<Class>*> allowedClassesChange(decoder->_allowedClasses, &allowedClasses);
</del><ins>+    SetForScope<const HashSet<CFTypeRef>*> allowedClassesChange(decoder->_allowedClasses, &allowedClasses);
</ins><span class="cx">     return decodeObject(decoder);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -762,9 +762,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (id)decodeObjectOfClasses:(NSSet *)classes forKey:(NSString *)key
</span><span class="cx"> {
</span><del>-    HashSet<Class> allowedClasses;
</del><ins>+    HashSet<CFTypeRef> allowedClasses;
</ins><span class="cx">     for (Class allowedClass in classes)
</span><del>-        allowedClasses.add(allowedClass);
</del><ins>+        allowedClasses.add((__bridge CFTypeRef)allowedClass);
</ins><span class="cx"> 
</span><span class="cx">     return decodeObject(self, _currentDictionary->get<API::Dictionary>(escapeKey(key)), allowedClasses);
</span><span class="cx"> }
</span><span class="lines">@@ -775,8 +775,8 @@
</span><span class="cx">         return [NSSet set];
</span><span class="cx"> 
</span><span class="cx">     auto result = adoptNS([[NSMutableSet alloc] init]);
</span><del>-    for (Class allowedClass : *_allowedClasses)
-        [result addObject:allowedClass];
</del><ins>+    for (auto allowedClass : *_allowedClasses)
+        [result addObject:(__bridge Class)allowedClass];
</ins><span class="cx"> 
</span><span class="cx">     return result.autorelease();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPICocoa_WKRemoteObjectInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm 2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm    2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -46,12 +46,12 @@
</span><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> struct MethodInfo {
</span><del>-    Vector<HashSet<Class>> allowedArgumentClasses;
</del><ins>+    Vector<HashSet<CFTypeRef>> allowedArgumentClasses;
</ins><span class="cx"> 
</span><span class="cx">     struct ReplyInfo {
</span><span class="cx">         NSUInteger replyPosition;
</span><span class="cx">         CString replySignature;
</span><del>-        Vector<HashSet<Class>> allowedReplyClasses;
</del><ins>+        Vector<HashSet<CFTypeRef>> allowedReplyClasses;
</ins><span class="cx">     };
</span><span class="cx">     std::optional<ReplyInfo> replyInfo;
</span><span class="cx"> };
</span><span class="lines">@@ -70,12 +70,15 @@
</span><span class="cx">     return objectClass == arrayClass || objectClass == dictionaryClass;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashSet<Class>& propertyListClasses()
</del><ins>+static HashSet<CFTypeRef>& propertyListClasses()
</ins><span class="cx"> {
</span><del>-    static LazyNeverDestroyed<HashSet<Class>> propertyListClasses;
</del><ins>+    static LazyNeverDestroyed<HashSet<CFTypeRef>> propertyListClasses;
</ins><span class="cx">     static dispatch_once_t onceToken;
</span><span class="cx">     dispatch_once(&onceToken, ^{
</span><del>-        propertyListClasses.construct(std::initializer_list<Class> { [NSArray class], [NSDictionary class], [NSNumber class], [NSString class] });
</del><ins>+        propertyListClasses.construct(std::initializer_list<CFTypeRef> {
+            (__bridge CFTypeRef)[NSArray class], (__bridge CFTypeRef)[NSDictionary class],
+            (__bridge CFTypeRef)[NSNumber class], (__bridge CFTypeRef)[NSString class]
+        });
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     return propertyListClasses;
</span><span class="lines">@@ -83,7 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void initializeMethod(MethodInfo& methodInfo, Protocol *protocol, SEL selector, NSMethodSignature *methodSignature, bool forReplyBlock)
</span><span class="cx"> {
</span><del>-    Vector<HashSet<Class>> allowedClasses;
</del><ins>+    Vector<HashSet<CFTypeRef>> allowedClasses;
</ins><span class="cx"> 
</span><span class="cx">     NSUInteger firstArgument = forReplyBlock ? 1 : 2;
</span><span class="cx">     NSUInteger argumentCount = methodSignature.numberOfArguments;
</span><span class="lines">@@ -127,7 +130,7 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        allowedClasses.append({ objectClass });
</del><ins>+        allowedClasses.append({ (__bridge CFTypeRef)objectClass });
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (forReplyBlock)
</span><span class="lines">@@ -212,8 +215,8 @@
</span><span class="cx">             auto result = adoptNS([[NSMutableString alloc] initWithString:@"{"]);
</span><span class="cx"> 
</span><span class="cx">             auto orderedArgumentClasses = copyToVector(allowedArgumentClasses);
</span><del>-            std::sort(orderedArgumentClasses.begin(), orderedArgumentClasses.end(), [](Class a, Class b) {
-                return CString(class_getName(a)) < CString(class_getName(b));
</del><ins>+            std::sort(orderedArgumentClasses.begin(), orderedArgumentClasses.end(), [](CFTypeRef a, CFTypeRef b) {
+                return CString(class_getName((__bridge Class)a)) < CString(class_getName((__bridge Class)b));
</ins><span class="cx">             });
</span><span class="cx"> 
</span><span class="cx">             bool needsComma = false;
</span><span class="lines">@@ -221,7 +224,7 @@
</span><span class="cx">                 if (needsComma)
</span><span class="cx">                     [result appendString:@", "];
</span><span class="cx"> 
</span><del>-                [result appendFormat:@"%s", class_getName(argumentClass)];
</del><ins>+                [result appendFormat:@"%s", class_getName((__bridge Class)argumentClass)];
</ins><span class="cx">                 needsComma = true;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -252,7 +255,7 @@
</span><span class="cx">     return result.autorelease();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashSet<Class>& classesForSelectorArgument(_WKRemoteObjectInterface *interface, SEL selector, NSUInteger argumentIndex, bool replyBlock)
</del><ins>+static HashSet<CFTypeRef>& classesForSelectorArgument(_WKRemoteObjectInterface *interface, SEL selector, NSUInteger argumentIndex, bool replyBlock)
</ins><span class="cx"> {
</span><span class="cx">     auto it = interface->_methods.find(selector);
</span><span class="cx">     if (it == interface->_methods.end())
</span><span class="lines">@@ -280,7 +283,7 @@
</span><span class="cx">     auto result = adoptNS([[NSMutableSet alloc] init]);
</span><span class="cx"> 
</span><span class="cx">     for (auto allowedClass : classesForSelectorArgument(self, selector, argumentIndex, ofReply))
</span><del>-        [result addObject:allowedClass];
</del><ins>+        [result addObject:(__bridge Class)allowedClass];
</ins><span class="cx"> 
</span><span class="cx">     return result.autorelease();
</span><span class="cx"> }
</span><span class="lines">@@ -287,9 +290,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setClasses:(NSSet *)classes forSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex ofReply:(BOOL)ofReply
</span><span class="cx"> {
</span><del>-    HashSet<Class> allowedClasses;
</del><ins>+    HashSet<CFTypeRef> allowedClasses;
</ins><span class="cx">     for (Class allowedClass in classes)
</span><del>-        allowedClasses.add(allowedClass);
</del><ins>+        allowedClasses.add((__bridge CFTypeRef)allowedClass);
</ins><span class="cx"> 
</span><span class="cx">     classesForSelectorArgument(self, selector, argumentIndex, ofReply) = WTFMove(allowedClasses);
</span><span class="cx"> }
</span><span class="lines">@@ -344,7 +347,7 @@
</span><span class="cx">     return [NSMethodSignature signatureWithObjCTypes:methodInfo.replyInfo->replySignature.data()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (const Vector<HashSet<Class>>&)_allowedArgumentClassesForSelector:(SEL)selector
</del><ins>+- (const Vector<HashSet<CFTypeRef>>&)_allowedArgumentClassesForSelector:(SEL)selector
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(_methods.contains(selector));
</span><span class="cx"> 
</span><span class="lines">@@ -351,7 +354,7 @@
</span><span class="cx">     return _methods.find(selector)->value.allowedArgumentClasses;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (const Vector<HashSet<Class>>&)_allowedArgumentClassesForReplyBlockOfSelector:(SEL)selector
</del><ins>+- (const Vector<HashSet<CFTypeRef>>&)_allowedArgumentClassesForReplyBlockOfSelector:(SEL)selector
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(_methods.contains(selector));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPICocoa_WKRemoteObjectInterfaceInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (NSMethodSignature *)_methodSignatureForSelector:(SEL)selector;
</span><span class="cx"> - (NSMethodSignature *)_methodSignatureForReplyBlockOfSelector:(SEL)selector;
</span><del>-- (const Vector<HashSet<Class>>&)_allowedArgumentClassesForSelector:(SEL)selector;
-- (const Vector<HashSet<Class>>&)_allowedArgumentClassesForReplyBlockOfSelector:(SEL)selector;
</del><ins>+- (const Vector<HashSet<CFTypeRef>>&)_allowedArgumentClassesForSelector:(SEL)selector;
+- (const Vector<HashSet<CFTypeRef>>&)_allowedArgumentClassesForReplyBlockOfSelector:(SEL)selector;
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPIccfWKStringCFmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/c/cf/WKStringCF.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/c/cf/WKStringCF.mm        2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/API/c/cf/WKStringCF.mm   2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     // Since WKNSString is an internal class with no subclasses, we can do a simple equality check.
</span><span class="cx">     if (object_getClass((__bridge NSString *)cfString) == wkNSStringClass())
</span><del>-        return toAPI(static_cast<API::String*>(&[(WKNSString *)[(NSString *)cfString retain] _apiObject]));
</del><ins>+        return toAPI(static_cast<API::String*>(&[(WKNSString *)(__bridge NSString *)CFRetain(cfString) _apiObject]));
</ins><span class="cx"> #endif
</span><span class="cx">     String string(cfString);
</span><span class="cx">     return toCopiedAPI(string);
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPIccfWKURLCFmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/c/cf/WKURLCF.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/c/cf/WKURLCF.mm   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/API/c/cf/WKURLCF.mm      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     // Since WKNSURL is an internal class with no subclasses, we can do a simple equality check.
</span><span class="cx">     if (object_getClass((__bridge NSURL *)cfURL) == wkNSURLClass())
</span><del>-        return toAPI(static_cast<API::URL*>(&[(WKNSURL *)[(NSURL *)cfURL retain] _apiObject]));
</del><ins>+        return toAPI(static_cast<API::URL*>(&[(WKNSURL *)(__bridge NSURL *)CFRetain(cfURL) _apiObject]));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     CString urlBytes;
</span></span></pre></div>
<a id="trunkSourceWebKitSharedCocoaAPIObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/Cocoa/APIObject.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/Cocoa/APIObject.mm    2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/Cocoa/APIObject.mm       2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -95,17 +95,17 @@
</span><span class="cx"> 
</span><span class="cx"> void Object::ref()
</span><span class="cx"> {
</span><del>-    CFRetain(wrapper());
</del><ins>+    CFRetain((__bridge CFTypeRef)wrapper());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Object::deref()
</span><span class="cx"> {
</span><del>-    CFRelease(wrapper());
</del><ins>+    CFRelease((__bridge CFTypeRef)wrapper());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static id <WKObject> allocateWKObject(Class cls, size_t size)
</span><span class="cx"> {
</span><del>-    return NSAllocateObject(cls, size + maximumExtraSpaceForAlignment, nullptr);
</del><ins>+    return class_createInstance(cls, size + maximumExtraSpaceForAlignment);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> API::Object& Object::fromWKObjectExtraSpace(id <WKObject> obj)
</span><span class="lines">@@ -372,7 +372,7 @@
</span><span class="cx">     if (!object)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return static_cast<void*>(object->wrapper());
</del><ins>+    return (__bridge void*)object->wrapper();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> API::Object* Object::unwrap(void* object)
</span><span class="lines">@@ -380,7 +380,7 @@
</span><span class="cx">     if (!object)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return &static_cast<id <WKObject>>(object)._apiObject;
</del><ins>+    return &((__bridge id <WKObject>)object)._apiObject;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKitSharedRemoteLayerTreeRemoteLayerTreePropertyApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h      2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.h 2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> class RemoteLayerTreePropertyApplier {
</span><span class="cx"> public:
</span><del>-    typedef HashMap<WebCore::GraphicsLayer::PlatformLayerID, LayerOrView *> RelatedLayerMap;
</del><ins>+    using RelatedLayerMap = HashMap<WebCore::GraphicsLayer::PlatformLayerID, CFTypeRef>;
</ins><span class="cx">     static void applyProperties(CALayer *, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&, RemoteLayerBackingStore::LayerContentsType);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     static void applyProperties(UIView *, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&, RemoteLayerBackingStore::LayerContentsType);
</span></span></pre></div>
<a id="trunkSourceWebKitSharedRemoteLayerTreeRemoteLayerTreePropertyAppliermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm     2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm        2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx">         RetainPtr<NSMutableArray> children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]);
</span><span class="cx">         for (auto& child : properties.children) {
</span><span class="cx">             ASSERT(relatedLayers.get(child));
</span><del>-            [children addObject:relatedLayers.get(child)];
</del><ins>+            [children addObject:(__bridge id)relatedLayers.get(child)];
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         layer.sublayers = children.get();
</span><span class="lines">@@ -274,13 +274,13 @@
</span><span class="cx">             layer.mask = nullptr;
</span><span class="cx">         else {
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-            UIView *maskView = relatedLayers.get(properties.maskLayerID);
</del><ins>+            UIView *maskView = (__bridge UIView *)relatedLayers.get(properties.maskLayerID);
</ins><span class="cx">             // FIXME: need to check that the mask view is kept alive.
</span><span class="cx">             ASSERT(!maskView.layer.superlayer);
</span><span class="cx">             if (!maskView.layer.superlayer)
</span><span class="cx">                 layer.mask = maskView.layer;
</span><span class="cx"> #else
</span><del>-            CALayer *maskLayer = relatedLayers.get(properties.maskLayerID);
</del><ins>+            CALayer *maskLayer = (__bridge CALayer *)relatedLayers.get(properties.maskLayerID);
</ins><span class="cx">             ASSERT(!maskLayer.superlayer);
</span><span class="cx">             if (!maskLayer.superlayer)
</span><span class="cx">                 layer.mask = maskLayer;
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx">         RetainPtr<NSMutableArray> children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]);
</span><span class="cx">         for (auto& child : properties.children) {
</span><span class="cx">             ASSERT(relatedLayers.get(child));
</span><del>-            [children addObject:relatedLayers.get(child)];
</del><ins>+            [children addObject:(__bridge id)relatedLayers.get(child)];
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (properties.customAppearance == GraphicsLayer::CustomAppearance::LightBackdrop || properties.customAppearance == GraphicsLayer::CustomAppearance::DarkBackdrop) {
</span><span class="lines">@@ -324,7 +324,7 @@
</span><span class="cx">         if (!properties.maskLayerID)
</span><span class="cx">             maskOwnerLayer.mask = nullptr;
</span><span class="cx">         else {
</span><del>-            UIView *maskView = relatedLayers.get(properties.maskLayerID);
</del><ins>+            UIView *maskView = (__bridge UIView *)relatedLayers.get(properties.maskLayerID);
</ins><span class="cx">             // FIXME: need to check that the mask view is kept alive.
</span><span class="cx">             ASSERT(!maskView.layer.superlayer);
</span><span class="cx">             if (!maskView.layer.superlayer)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -83,9 +83,9 @@
</span><span class="cx">     WeakObjCPtr<id <WKBrowsingContextPolicyDelegate>> _policyDelegate;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashMap<WebPageProxy*, WKBrowsingContextController *>& browsingContextControllerMap()
</del><ins>+static HashMap<WebPageProxy*, __unsafe_unretained WKBrowsingContextController *>& browsingContextControllerMap()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed<HashMap<WebPageProxy*, WKBrowsingContextController *>> browsingContextControllerMap;
</del><ins>+    static NeverDestroyed<HashMap<WebPageProxy*, __unsafe_unretained WKBrowsingContextController *>> browsingContextControllerMap;
</ins><span class="cx">     return browsingContextControllerMap;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKConnectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     if ([delegate respondsToSelector:@selector(connection:didReceiveMessageWithName:body:)]) {
</span><span class="cx">         RetainPtr<CFStringRef> nsMessageName = adoptCF(WKStringCopyCFString(kCFAllocatorDefault, messageName));
</span><span class="cx">         RetainPtr<id> nsMessageBody = static_cast<ObjCObjectGraph*>(toImpl(messageBody))->rootObject();
</span><del>-        [delegate connection:connection didReceiveMessageWithName:(NSString *)nsMessageName.get() body:nsMessageBody.get()];
</del><ins>+        [delegate connection:connection didReceiveMessageWithName:(__bridge NSString *)nsMessageName.get() body:nsMessageBody.get()];
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKContentRuleListStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm        2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListStore.mm   2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -74,29 +74,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)compileContentRuleListForIdentifier:(NSString *)identifier encodedContentRuleList:(NSString *)encodedContentRuleList completionHandler:(void (^)(WKContentRuleList *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    [self _compileContentRuleListForIdentifier:identifier encodedContentRuleList:encodedContentRuleList completionHandler:completionHandler releasesArgument:NO];
</del><ins>+    [self _compileContentRuleListForIdentifier:identifier encodedContentRuleList:[encodedContentRuleList retain] completionHandler:completionHandler];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_compileContentRuleListForIdentifier:(NSString *)identifier encodedContentRuleList:(NSString *)encodedContentRuleList completionHandler:(void (^)(WKContentRuleList *, NSError *))completionHandler releasesArgument:(BOOL)releasesArgument
-{
-    String json(encodedContentRuleList);
-    if (releasesArgument) {
-        [encodedContentRuleList release];
-        encodedContentRuleList = nil;
-    }
-
-    _contentRuleListStore->compileContentRuleList(identifier, WTFMove(json), [completionHandler = makeBlockPtr(completionHandler)](RefPtr<API::ContentRuleList> contentRuleList, std::error_code error) {
-        if (error) {
-            auto userInfo = @{NSHelpAnchorErrorKey: [NSString stringWithFormat:@"Rule list compilation failed: %s", error.message().c_str()]};
-
-            // error.value() could have a specific compiler error that is not equal to WKErrorContentRuleListStoreCompileFailed.
-            // We want to use error.message, but here we want to only pass on CompileFailed with userInfo from the std::error_code.
-            return completionHandler(nil, [NSError errorWithDomain:WKErrorDomain code:WKErrorContentRuleListStoreCompileFailed userInfo:userInfo]);
-        }
-        completionHandler(wrapper(*contentRuleList), nil);
-    });
-}
-
</del><span class="cx"> - (void)lookUpContentRuleListForIdentifier:(NSString *)identifier completionHandler:(void (^)(WKContentRuleList *, NSError *))completionHandler
</span><span class="cx"> {
</span><span class="cx">     _contentRuleListStore->lookupContentRuleList(identifier, [completionHandler = makeBlockPtr(completionHandler)](RefPtr<API::ContentRuleList> contentRuleList, std::error_code error) {
</span><span class="lines">@@ -170,10 +150,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // NS_RELEASES_ARGUMENT to keep peak memory usage low.
</span><ins>+- (void)_compileContentRuleListForIdentifier:(NSString *)identifier encodedContentRuleList:(NSString *) NS_RELEASES_ARGUMENT encodedContentRuleList completionHandler:(void (^)(WKContentRuleList *, NSError *))completionHandler
+{
+    String json(encodedContentRuleList);
+    [encodedContentRuleList release];
+    encodedContentRuleList = nil;
</ins><span class="cx"> 
</span><del>-- (void)_compileContentRuleListForIdentifier:(NSString *)identifier encodedContentRuleList:(NSString *)encodedContentRuleList completionHandler:(void (^)(WKContentRuleList *, NSError *))completionHandler
-{
-    [self _compileContentRuleListForIdentifier:identifier encodedContentRuleList:encodedContentRuleList completionHandler:completionHandler releasesArgument:YES];
</del><ins>+    _contentRuleListStore->compileContentRuleList(identifier, WTFMove(json), [completionHandler = makeBlockPtr(completionHandler)](RefPtr<API::ContentRuleList> contentRuleList, std::error_code error) {
+        if (error) {
+            auto userInfo = @{NSHelpAnchorErrorKey: [NSString stringWithFormat:@"Rule list compilation failed: %s", error.message().c_str()]};
+
+            // error.value() could have a specific compiler error that is not equal to WKErrorContentRuleListStoreCompileFailed.
+            // We want to use error.message, but here we want to only pass on CompileFailed with userInfo from the std::error_code.
+            return completionHandler(nil, [NSError errorWithDomain:WKErrorDomain code:WKErrorContentRuleListStoreCompileFailed userInfo:userInfo]);
+        }
+        completionHandler(wrapper(*contentRuleList), nil);
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> + (instancetype)defaultStoreWithLegacyFilename
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKHTTPCookieStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm     2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm        2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> @implementation WKHTTPCookieStore {
</span><del>-    HashMap<id<WKHTTPCookieStoreObserver>, std::unique_ptr<WKHTTPCookieStoreObserver>> _observers;
</del><ins>+    HashMap<CFTypeRef, std::unique_ptr<WKHTTPCookieStoreObserver>> _observers;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)dealloc
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)addObserver:(id<WKHTTPCookieStoreObserver>)observer
</span><span class="cx"> {
</span><del>-    auto result = _observers.add(observer, nullptr);
</del><ins>+    auto result = _observers.add((__bridge CFTypeRef)observer, nullptr);
</ins><span class="cx">     if (!result.isNewEntry)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)removeObserver:(id<WKHTTPCookieStoreObserver>)observer
</span><span class="cx"> {
</span><del>-    auto result = _observers.take(observer);
</del><ins>+    auto result = _observers.take((__bridge CFTypeRef)observer);
</ins><span class="cx">     if (!result)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKProcessGroupmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm        2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm   2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     memset(&connectionClient, 0, sizeof(connectionClient));
</span><span class="cx"> 
</span><span class="cx">     connectionClient.base.version = 0;
</span><del>-    connectionClient.base.clientInfo = processGroup;
</del><ins>+    connectionClient.base.clientInfo = (__bridge CFTypeRef)processGroup;
</ins><span class="cx">     connectionClient.didCreateConnection = didCreateConnection;
</span><span class="cx"> 
</span><span class="cx">     WKContextSetConnectionClient(contextRef, &connectionClient.base);
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">     memset(&historyClient, 0, sizeof(historyClient));
</span><span class="cx"> 
</span><span class="cx">     historyClient.base.version = 0;
</span><del>-    historyClient.base.clientInfo = processGroup;
</del><ins>+    historyClient.base.clientInfo = (__bridge CFTypeRef)processGroup;
</ins><span class="cx">     historyClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
</span><span class="cx">     historyClient.didPerformClientRedirect = didPerformClientRedirect;
</span><span class="cx">     historyClient.didPerformServerRedirect = didPerformServerRedirect;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKViewPrivate.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKViewPrivate.h  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKViewPrivate.h     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> #import <WebKit/WKView.h>
</span><span class="cx"> #import <WebKit/_WKOverlayScrollbarStyle.h>
</span><span class="cx"> 
</span><ins>+@class _WKLinkIconParameters;
+
</ins><span class="cx"> @interface WKView (Private)
</span><span class="cx"> 
</span><span class="cx"> /* C SPI support. */
</span><span class="lines">@@ -146,4 +148,11 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+@interface WKView (PrivateForSubclassToDefine)
+
+// This a method that subclasses can define and WKView itself does not define. WKView will call the method if it is present.
+- (void)_shouldLoadIconWithParameters:(_WKLinkIconParameters *)parameters completionHandler:(void (^)(void (^)(NSData *)))completionHandler;
+
+@end
+
</ins><span class="cx"> #endif // !TARGET_OS_IPHONE
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm     2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm        2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -209,9 +209,9 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static HashMap<WebKit::WebPageProxy*, WKWebView *>& pageToViewMap()
</del><ins>+static HashMap<WebKit::WebPageProxy*, __unsafe_unretained WKWebView *>& pageToViewMap()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed<HashMap<WebKit::WebPageProxy*, WKWebView *>> map;
</del><ins>+    static NeverDestroyed<HashMap<WebKit::WebPageProxy*, __unsafe_unretained WKWebView *>> map;
</ins><span class="cx">     return map;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3151,10 +3151,11 @@
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ACCESSIBILITY_EVENTS)
</span><ins>+
</ins><span class="cx"> static void accessibilityEventsEnabledChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(observer);
</span><del>-    WKWebView* webview = static_cast<WKWebView*>(observer);
</del><ins>+    WKWebView *webview = (__bridge WKWebView *)observer;
</ins><span class="cx">     [webview _updateAccessibilityEventsEnabled];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3163,6 +3164,7 @@
</span><span class="cx">     if (!isNullFunctionPointer(_AXSWebAccessibilityEventsEnabled))
</span><span class="cx">         _page->updateAccessibilityEventsEnabled(_AXSWebAccessibilityEventsEnabled());
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #pragma mark OS X-specific methods
</span><span class="lines">@@ -4243,7 +4245,7 @@
</span><span class="cx"> - (NSArray *)_certificateChain
</span><span class="cx"> {
</span><span class="cx">     if (WebKit::WebFrameProxy* mainFrame = _page->mainFrame())
</span><del>-        return mainFrame->certificateInfo() ? (NSArray *)mainFrame->certificateInfo()->certificateInfo().certificateChain() : nil;
</del><ins>+        return mainFrame->certificateInfo() ? (__bridge NSArray *)mainFrame->certificateInfo()->certificateInfo().certificateChain() : nil;
</ins><span class="cx"> 
</span><span class="cx">     return nil;
</span><span class="cx"> }
</span><span class="lines">@@ -6619,7 +6621,7 @@
</span><span class="cx">     if (!certificateInfo)
</span><span class="cx">         return @[ ];
</span><span class="cx"> 
</span><del>-    return (NSArray *)certificateInfo->certificateInfo().certificateChain() ?: @[ ];
</del><ins>+    return (__bridge NSArray *)certificateInfo->certificateInfo().certificateChain() ?: @[ ];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/mac/WKView.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/mac/WKView.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/API/mac/WKView.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -884,7 +884,7 @@
</span><span class="cx"> 
</span><span class="cx">         static SEL delegateSelector()
</span><span class="cx">         {
</span><del>-            return sel_registerName("_shouldLoadIconWithParameters:completionHandler:");
</del><ins>+            return @selector(_shouldLoadIconWithParameters:completionHandler:);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">     private:
</span><span class="lines">@@ -894,7 +894,7 @@
</span><span class="cx">         {
</span><span class="cx">             RetainPtr<_WKLinkIconParameters> parameters = adoptNS([[_WKLinkIconParameters alloc] _initWithLinkIcon:linkIcon]);
</span><span class="cx"> 
</span><del>-            [m_wkView performSelector:delegateSelector() withObject:parameters.get() withObject:BlockPtr<void(IconLoadCompletionHandler)>::fromCallable([completionHandler = WTFMove(completionHandler)](IconLoadCompletionHandler loadCompletionHandler) mutable {
</del><ins>+            [m_wkView _shouldLoadIconWithParameters:parameters.get() completionHandler:BlockPtr<void(IconLoadCompletionHandler)>::fromCallable([completionHandler = WTFMove(completionHandler)](IconLoadCompletionHandler loadCompletionHandler) mutable {
</ins><span class="cx">                 ASSERT(RunLoop::isMain());
</span><span class="cx">                 if (loadCompletionHandler) {
</span><span class="cx">                     completionHandler([loadCompletionHandler = BlockPtr<void (NSData *)>(loadCompletionHandler)](API::Data* data, WebKit::CallbackBase::Error error) {
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -978,11 +978,8 @@
</span><span class="cx">     if (!navigationDelegate)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    RetainPtr<NSData> data = [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webCryptoMasterKeyForWebView:m_navigationState.m_webView];
-
-    return API::Data::createWithoutCopying((const unsigned char*)[data bytes], [data length], [] (unsigned char*, const void* data) {
-        [(NSData *)data release];
-    }, data.leakRef());
</del><ins>+    NSData *data = [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webCryptoMasterKeyForWebView:m_navigationState.m_webView];
+    return API::Data::createWithoutCopying(data);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr<API::String> NavigationState::NavigationClient::signedPublicKeyAndChallengeString(WebPageProxy& page, unsigned keySizeIndex, const RefPtr<API::String>& challengeString, const WebCore::URL& url)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebProcessPoolCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm       2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm  2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -226,12 +226,10 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> #if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
</span><del>-        auto data = retainPtr(keyedArchiver.get().encodedData);
</del><ins>+        auto data = keyedArchiver.get().encodedData;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        parameters.bundleParameterData = API::Data::createWithoutCopying((const unsigned char*)[data bytes], [data length], [] (unsigned char*, const void* data) {
-            [(NSData *)data release];
-        }, data.leakRef());
</del><ins>+        parameters.bundleParameterData = API::Data::createWithoutCopying(WTFMove(data));
</ins><span class="cx">     }
</span><span class="cx">     parameters.networkATSContext = adoptCF(_CFNetworkCopyATSContext());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h        2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h   2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -365,7 +365,7 @@
</span><span class="cx">     void prepareForDictionaryLookup();
</span><span class="cx">     void setAllowsLinkPreview(bool);
</span><span class="cx">     bool allowsLinkPreview() const { return m_allowsLinkPreview; }
</span><del>-    void* immediateActionAnimationControllerForHitTestResult(API::HitTestResult*, uint32_t type, API::Object* userData);
</del><ins>+    NSObject *immediateActionAnimationControllerForHitTestResult(API::HitTestResult*, uint32_t type, API::Object* userData);
</ins><span class="cx">     void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object* userData);
</span><span class="cx">     void prepareForImmediateActionAnimation();
</span><span class="cx">     void cancelImmediateActionAnimation();
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm       2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm  2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -2050,7 +2050,8 @@
</span><span class="cx">     // There's a chance that responding to this event will run a nested event loop, and
</span><span class="cx">     // fetching a new event might release the old one. Retaining and then autoreleasing
</span><span class="cx">     // the current event prevents that from causing a problem inside WebKit or AppKit code.
</span><del>-    [[event retain] autorelease];
</del><ins>+    CFRetain((__bridge CFTypeRef)event);
+    CFAutorelease((__bridge CFTypeRef)event);
</ins><span class="cx"> 
</span><span class="cx">     if (![m_view hitTest:event.locationInWindow])
</span><span class="cx">         return false;
</span><span class="lines">@@ -2069,7 +2070,8 @@
</span><span class="cx">     // There's a chance that responding to this event will run a nested event loop, and
</span><span class="cx">     // fetching a new event might release the old one. Retaining and then autoreleasing
</span><span class="cx">     // the current event prevents that from causing a problem inside WebKit or AppKit code.
</span><del>-    [[event retain] autorelease];
</del><ins>+    CFRetain((__bridge CFTypeRef)event);
+    CFAutorelease((__bridge CFTypeRef)event);
</ins><span class="cx"> 
</span><span class="cx">     if (![m_view hitTest:event.locationInWindow])
</span><span class="cx">         return false;
</span><span class="lines">@@ -3319,7 +3321,7 @@
</span><span class="cx">         [m_view addGestureRecognizer:immediateActionRecognizer];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void* WebViewImpl::immediateActionAnimationControllerForHitTestResult(API::HitTestResult* hitTestResult, uint32_t type, API::Object* userData)
</del><ins>+NSObject *WebViewImpl::immediateActionAnimationControllerForHitTestResult(API::HitTestResult* hitTestResult, uint32_t type, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx">     return [m_view _web_immediateActionAnimationControllerForHitTestResultInternal:hitTestResult withType:type userData:userData];
</span><span class="cx"> }
</span><span class="lines">@@ -4900,7 +4902,8 @@
</span><span class="cx">     // There's a chance that responding to this event will run a nested event loop, and
</span><span class="cx">     // fetching a new event might release the old one. Retaining and then autoreleasing
</span><span class="cx">     // the current event prevents that from causing a problem inside WebKit or AppKit code.
</span><del>-    [[event retain] autorelease];
</del><ins>+    CFRetain((__bridge CFTypeRef)event);
+    CFAutorelease((__bridge CFTypeRef)event);
</ins><span class="cx"> 
</span><span class="cx">     // We get Esc key here after processing either Esc or Cmd+period. The former starts as a keyDown, and the latter starts as a key equivalent,
</span><span class="cx">     // but both get transformed to a cancelOperation: command, executing which passes an Esc key event to -performKeyEquivalent:.
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/PageClient.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/PageClient.h       2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/PageClient.h  2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -400,11 +400,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     virtual void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object*) = 0;
</span><del>-
-    virtual void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>) = 0;
-
</del><ins>+    virtual NSObject *immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>) = 0;
</ins><span class="cx">     virtual void didHandleAcceptedCandidate() = 0;
</span><span class="cx"> #endif
</span><ins>+
</ins><span class="cx">     virtual void didFinishProcessingAllPendingMouseEvents() = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void videoControlsManagerDidChange() { }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessRemoteLayerTreeRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm     2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm        2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -104,11 +104,11 @@
</span><span class="cx">         RemoteLayerTreePropertyApplier::RelatedLayerMap relatedLayers;
</span><span class="cx">         if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) {
</span><span class="cx">             for (auto& child : properties.children)
</span><del>-                relatedLayers.set(child, getLayer(child));
</del><ins>+                relatedLayers.set(child, (__bridge CFTypeRef)getLayer(child));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (properties.changedProperties & RemoteLayerTreeTransaction::MaskLayerChanged && properties.maskLayerID)
</span><del>-            relatedLayers.set(properties.maskLayerID, getLayer(properties.maskLayerID));
</del><ins>+            relatedLayers.set(properties.maskLayerID, (__bridge CFTypeRef)getLayer(properties.maskLayerID));
</ins><span class="cx"> 
</span><span class="cx">         if (properties.changedProperties & RemoteLayerTreeTransaction::ClonedContentsChanged && properties.clonedLayerID)
</span><span class="cx">             clonesToUpdate.append(LayerIDPair(layerID, properties.clonedLayerID));
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx"> #if HAVE(IOSURFACE)
</span><span class="cx"> static void recursivelyMapIOSurfaceBackingStore(CALayer *layer)
</span><span class="cx"> {
</span><del>-    if (layer.contents && CFGetTypeID(layer.contents) == CAMachPortGetTypeID()) {
</del><ins>+    if (layer.contents && CFGetTypeID((__bridge CFTypeRef)layer.contents) == CAMachPortGetTypeID()) {
</ins><span class="cx">         MachSendRight port = MachSendRight::create(CAMachPortGetPort((__bridge CAMachPortRef)layer.contents));
</span><span class="cx">         auto surface = WebCore::IOSurface::createFromSendRight(WTFMove(port), sRGBColorSpaceRef());
</span><span class="cx">         layer.contents = surface ? surface->asLayerContents() : nil;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -7331,7 +7331,7 @@
</span><span class="cx">     m_pageClient.didPerformImmediateActionHitTest(result, contentPreventsDefault, m_process->transformHandlesToObjects(userData.object()).get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void* WebPageProxy::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
</del><ins>+NSObject *WebPageProxy::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
</ins><span class="cx"> {
</span><span class="cx">     return m_pageClient.immediateActionAnimationControllerForHitTestResult(hitTestResult, type, userData);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -1204,7 +1204,7 @@
</span><span class="cx">     void immediateActionDidCancel();
</span><span class="cx">     void immediateActionDidComplete();
</span><span class="cx"> 
</span><del>-    void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
</del><ins>+    NSObject *immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
</ins><span class="cx"> 
</span><span class="cx">     void installActivityStateChangeCompletionHandler(WTF::Function<void ()>&&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacPageClientImplMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h    2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h       2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx">     void handleControlledElementIDResponse(const String&) override;
</span><span class="cx"> 
</span><span class="cx">     void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object*) override;
</span><del>-    void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>) override;
</del><ins>+    NSObject *immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>) override;
</ins><span class="cx"> 
</span><span class="cx">     void didHandleAcceptedCandidate() override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacPageClientImplMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -827,7 +827,7 @@
</span><span class="cx">     m_impl->didPerformImmediateActionHitTest(result, contentPreventsDefault, userData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void* PageClientImpl::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
</del><ins>+NSObject *PageClientImpl::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
</ins><span class="cx"> {
</span><span class="cx">     return m_impl->immediateActionAnimationControllerForHitTestResult(hitTestResult.get(), type, userData.get());
</span><span class="cx"> }
</span><span class="lines">@@ -856,12 +856,12 @@
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::refView()
</span><span class="cx"> {
</span><del>-    CFRetain(m_view);
</del><ins>+    CFRetain((__bridge CFTypeRef)m_view);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::derefView()
</span><span class="cx"> {
</span><del>-    CFRelease(m_view);
</del><ins>+    CFRelease((__bridge CFTypeRef)m_view);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::startWindowDrag()
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacServicesControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/ServicesController.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/ServicesController.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/mac/ServicesController.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -97,27 +97,27 @@
</span><span class="cx">     dispatch_after(refreshTime, m_refreshQueue, ^{
</span><span class="cx">         auto serviceLookupGroup = adoptOSObject(dispatch_group_create());
</span><span class="cx"> 
</span><del>-        static NeverDestroyed<NSImage *> image([[NSImage alloc] init]);
</del><ins>+        static NSImage *image { [[NSImage alloc] init] };
</ins><span class="cx">         hasCompatibleServicesForItems(serviceLookupGroup.get(), @[ image ], [this] (bool hasServices) {
</span><span class="cx">             m_hasImageServices = hasServices;
</span><span class="cx">         });
</span><span class="cx"> 
</span><del>-        static NeverDestroyed<NSAttributedString *> attributedString([[NSAttributedString alloc] initWithString:@"a"]);
</del><ins>+        static NSAttributedString *attributedString { [[NSAttributedString alloc] initWithString:@"a"] };
</ins><span class="cx">         hasCompatibleServicesForItems(serviceLookupGroup.get(), @[ attributedString ], [this] (bool hasServices) {
</span><span class="cx">             m_hasSelectionServices = hasServices;
</span><span class="cx">         });
</span><span class="cx"> 
</span><del>-        static NSAttributedString *attributedStringWithRichContent;
-        if (!attributedStringWithRichContent) {
-            dispatch_sync(dispatch_get_main_queue(), ^ {
</del><ins>+        static NSAttributedString *attributedStringWithRichContent = [] {
+            NSMutableAttributedString *richString;
+            dispatch_sync(dispatch_get_main_queue(), [&richString] {
</ins><span class="cx">                 auto attachment = adoptNS([[NSTextAttachment alloc] init]);
</span><del>-                auto cell = adoptNS([[NSTextAttachmentCell alloc] initImageCell:image.get()]);
</del><ins>+                auto cell = adoptNS([[NSTextAttachmentCell alloc] initImageCell:image]);
</ins><span class="cx">                 [attachment setAttachmentCell:cell.get()];
</span><del>-                NSMutableAttributedString *richString = (NSMutableAttributedString *)[NSMutableAttributedString attributedStringWithAttachment:attachment.get()];
</del><ins>+                richString = [[NSAttributedString attributedStringWithAttachment:attachment.get()] mutableCopy];
</ins><span class="cx">                 [richString appendAttributedString:attributedString];
</span><del>-                attributedStringWithRichContent = [richString retain];
</del><span class="cx">             });
</span><del>-        }
</del><ins>+            return richString;
+        }();
</ins><span class="cx"> 
</span><span class="cx">         hasCompatibleServicesForItems(serviceLookupGroup.get(), @[ attributedStringWithRichContent ], [this] (bool hasServices) {
</span><span class="cx">             m_hasRichContentServices = hasServices;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWKImmediateActionControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm 2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm    2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult];
</span><del>-    id customClientAnimationController = (id)(_page->immediateActionAnimationControllerForHitTestResult(hitTestResult, _type, _userData));
</del><ins>+    id customClientAnimationController = _page->immediateActionAnimationControllerForHitTestResult(hitTestResult, _type, _userData);
</ins><span class="cx">     if (customClientAnimationController == [NSNull null]) {
</span><span class="cx">         [self _cancelImmediateAction];
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWKPrintingViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm      2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/UIProcess/mac/WKPrintingView.mm 2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -63,8 +63,10 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>-    if (WebCoreObjCScheduleDeallocateOnMainThread([WKPrintingView class], self))
-        return;
</del><ins>+    callOnMainThread([frame = WTFMove(_webFrame), previews = WTFMove(_pagePreviews)] {
+        // Deallocate these on the main thread, not the current thread, since the
+        // reference counting and the destructors aren't threadsafe.
+    });
</ins><span class="cx"> 
</span><span class="cx">     [super dealloc];
</span><span class="cx"> }
</span><span class="lines">@@ -431,9 +433,9 @@
</span><span class="cx">     return 0; // Invalid page number.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CFStringRef linkDestinationName(PDFDocument *document, PDFDestination *destination)
</del><ins>+static NSString *linkDestinationName(PDFDocument *document, PDFDestination *destination)
</ins><span class="cx"> {
</span><del>-    return (CFStringRef)[NSString stringWithFormat:@"%lu-%f-%f", (unsigned long)[document indexForPage:destination.page], destination.point.x, destination.point.y];
</del><ins>+    return [NSString stringWithFormat:@"%lu-%f-%f", (unsigned long)[document indexForPage:destination.page], destination.point.x, destination.point.y];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_drawPDFDocument:(PDFDocument *)pdfDocument page:(unsigned)page atPoint:(NSPoint)point
</span><span class="lines">@@ -470,7 +472,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (const auto& destination : _linkDestinationsPerPage[page]) {
</span><span class="cx">         CGPoint destinationPoint = CGPointApplyAffineTransform(NSPointToCGPoint([destination point]), transform);
</span><del>-        CGPDFContextAddDestinationAtPoint(context, linkDestinationName(pdfDocument, destination.get()), destinationPoint);
</del><ins>+        CGPDFContextAddDestinationAtPoint(context, (__bridge CFStringRef)linkDestinationName(pdfDocument, destination.get()), destinationPoint);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (PDFAnnotation *annotation in [pdfPage annotations]) {
</span><span class="lines">@@ -488,8 +490,7 @@
</span><span class="cx">             PDFDestination *destination = [linkAnnotation destination];
</span><span class="cx">             if (!destination)
</span><span class="cx">                 continue;
</span><del>-            CGPDFContextSetDestinationForRect(context, linkDestinationName(pdfDocument, destination), transformedRect);
-
</del><ins>+            CGPDFContextSetDestinationForRect(context, (__bridge CFStringRef)linkDestinationName(pdfDocument, destination), transformedRect);
</ins><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPImacWKDOMInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h   2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.h      2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -89,8 +89,8 @@
</span><span class="cx"> 
</span><span class="cx"> // -- Caches --
</span><span class="cx"> 
</span><del>-DOMCache<WebCore::Node*, WKDOMNode *>& WKDOMNodeCache();
-DOMCache<WebCore::Range*, WKDOMRange *>& WKDOMRangeCache();
</del><ins>+DOMCache<WebCore::Node*, __unsafe_unretained WKDOMNode *>& WKDOMNodeCache();
+DOMCache<WebCore::Range*, __unsafe_unretained WKDOMRange *>& WKDOMRangeCache();
</ins><span class="cx"> 
</span><span class="cx"> // -- Node and classes derived from Node. --
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPImacWKDOMInternalsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -51,15 +51,15 @@
</span><span class="cx"> 
</span><span class="cx"> // -- Caches -- 
</span><span class="cx"> 
</span><del>-DOMCache<WebCore::Node*, WKDOMNode *>& WKDOMNodeCache()
</del><ins>+DOMCache<WebCore::Node*, __unsafe_unretained WKDOMNode *>& WKDOMNodeCache()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed<DOMCache<WebCore::Node*, WKDOMNode *>> cache;
</del><ins>+    static NeverDestroyed<DOMCache<WebCore::Node*, __unsafe_unretained WKDOMNode *>> cache;
</ins><span class="cx">     return cache;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DOMCache<WebCore::Range*, WKDOMRange *>& WKDOMRangeCache()
</del><ins>+DOMCache<WebCore::Range*, __unsafe_unretained WKDOMRange *>& WKDOMRangeCache()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed<DOMCache<WebCore::Range*, WKDOMRange *>> cache;
</del><ins>+    static NeverDestroyed<DOMCache<WebCore::Range*, __unsafe_unretained WKDOMRange *>> cache;
</ins><span class="cx">     return cache;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> 
</span><span class="cx"> WKDOMNode *toWKDOMNode(WebCore::Node* impl)
</span><span class="cx"> {
</span><del>-    return toWKDOMType<WebCore::Node*, WKDOMNode *>(impl, WKDOMNodeCache());
</del><ins>+    return toWKDOMType<WebCore::Node*, __unsafe_unretained WKDOMNode *>(impl, WKDOMNodeCache());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebCore::Element* toWebCoreElement(WKDOMElement *wrapper)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> 
</span><span class="cx"> WKDOMRange *toWKDOMRange(WebCore::Range* impl)
</span><span class="cx"> {
</span><del>-    return toWKDOMType<WebCore::Range*, WKDOMRange *>(impl, WKDOMRangeCache());
</del><ins>+    return toWKDOMType<WebCore::Range*, __unsafe_unretained WKDOMRange *>(impl, WKDOMRangeCache());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // -- Helpers --
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessPluginsNetscapemacNetscapePluginMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm 2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm    2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -204,9 +204,10 @@
</span><span class="cx">         // Patch -[NSException release] to not release the object.
</span><span class="cx">         static dispatch_once_t once;
</span><span class="cx">         dispatch_once(&once, ^{
</span><del>-            Class exceptionClass = [NSException class];
-            Method exceptionReleaseMethod = class_getInstanceMethod(exceptionClass, @selector(release));
-            class_replaceMethod(exceptionClass, @selector(release), reinterpret_cast<IMP>(NSException_release), method_getTypeEncoding(exceptionReleaseMethod));
</del><ins>+            auto exceptionClass = [NSException class];
+            auto releaseSelector = sel_registerName("release");
+            auto exceptionReleaseMethod = class_getInstanceMethod(exceptionClass, releaseSelector);
+            class_replaceMethod(exceptionClass, releaseSelector, reinterpret_cast<IMP>(NSException_release), method_getTypeEncoding(exceptionReleaseMethod));
</ins><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -1159,9 +1160,9 @@
</span><span class="cx">     // be returned by using NPN_GetValue and pass the WKNVExpectsNonretainedLayer parameter.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=58282 describes the bug where WebKit expects retained layers.
</span><span class="cx">     if (m_pluginReturnsNonretainedLayer)
</span><del>-        m_pluginLayer = reinterpret_cast<CALayer *>(value);
</del><ins>+        m_pluginLayer = (__bridge CALayer *)value;
</ins><span class="cx">     else
</span><del>-        m_pluginLayer = adoptNS(reinterpret_cast<CALayer *>(value));
</del><ins>+        m_pluginLayer = adoptNS((__bridge CALayer *)value);
</ins><span class="cx"> 
</span><span class="cx">     if (m_pluginModule->pluginQuirks().contains(PluginQuirks::MakeOpaqueUnlessTransparentSilverlightBackgroundAttributeExists) &&
</span><span class="cx">         !m_isTransparent)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> #import <WebCore/HTMLFormElement.h>
</span><span class="cx"> #import <WebCore/HTMLPlugInElement.h>
</span><span class="cx"> #import <WebCore/LegacyNSPasteboardTypes.h>
</span><ins>+#import <WebCore/LocalDefaultSystemAppearance.h>
</ins><span class="cx"> #import <WebCore/LocalizedStrings.h>
</span><span class="cx"> #import <WebCore/MouseEvent.h>
</span><span class="cx"> #import <WebCore/PDFDocumentImage.h>
</span><span class="lines">@@ -81,15 +82,12 @@
</span><span class="cx"> #import <WebCore/ScrollAnimator.h>
</span><span class="cx"> #import <WebCore/ScrollbarTheme.h>
</span><span class="cx"> #import <WebCore/Settings.h>
</span><ins>+#import <WebCore/WebAccessibilityObjectWrapperMac.h>
</ins><span class="cx"> #import <WebCore/WheelEventTestTrigger.h>
</span><span class="cx"> #import <pal/spi/cg/CoreGraphicsSPI.h>
</span><span class="cx"> #import <pal/spi/mac/NSMenuSPI.h>
</span><span class="cx"> #import <wtf/UUID.h>
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
-#include <WebCore/LocalDefaultSystemAppearance.h>
-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> // Set overflow: hidden on the annotation container so <input> elements scrolled out of view don't show
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebCoreSupportmacWebEditorClientMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void changeWordCase(WebPage* page, SEL selector)
</del><ins>+static void changeWordCase(WebPage* page, NSString *(*changeCase)(NSString *))
</ins><span class="cx"> {
</span><span class="cx">     Frame& frame = page->corePage()->focusController().focusedOrMainFrame();
</span><span class="cx">     if (!frame.editor().canEdit())
</span><span class="lines">@@ -72,22 +72,28 @@
</span><span class="cx">     frame.editor().command("selectWord").execute();
</span><span class="cx"> 
</span><span class="cx">     NSString *selectedString = frame.displayStringModifiedByEncoding(frame.editor().selectedText());
</span><del>-    page->replaceSelectionWithText(&frame, [selectedString performSelector:selector]);
</del><ins>+    page->replaceSelectionWithText(&frame, changeCase(selectedString));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::uppercaseWord()
</span><span class="cx"> {
</span><del>-    changeWordCase(m_page, @selector(uppercaseString));
</del><ins>+    changeWordCase(m_page, [] (NSString *string) {
+        return [string uppercaseString];
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::lowercaseWord()
</span><span class="cx"> {
</span><del>-    changeWordCase(m_page, @selector(lowercaseString));
</del><ins>+    changeWordCase(m_page, [] (NSString *string) {
+        return [string lowercaseString];
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::capitalizeWord()
</span><span class="cx"> {
</span><del>-    changeWordCase(m_page, @selector(capitalizedString));
</del><ins>+    changeWordCase(m_page, [] (NSString *string) {
+        return [string capitalizedString];
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(AUTOMATIC_TEXT_REPLACEMENT)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcesscocoaWebProcessCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (235364 => 235365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm  2018-08-27 15:44:18 UTC (rev 235364)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm     2018-08-27 15:51:24 UTC (rev 235365)
</span><span class="lines">@@ -73,19 +73,22 @@
</span><span class="cx"> #import <stdio.h>
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+#import "WKAccessibilityWebPageObjectIOS.h"
</ins><span class="cx"> #import <UIKit/UIAccessibility.h>
</span><span class="cx"> #import <pal/spi/ios/GraphicsServicesSPI.h>
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-#if USE(APPLE_INTERNAL_SDK)
</del><ins>+#if PLATFORM(IOS) && USE(APPLE_INTERNAL_SDK)
</ins><span class="cx"> #import <AXRuntime/AXDefines.h>
</span><span class="cx"> #import <AXRuntime/AXNotificationConstants.h>
</span><del>-#else
-#define kAXPidStatusChangedNotification 0
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS) && !USE(APPLE_INTERNAL_SDK)
+#define kAXPidStatusChangedNotification 0
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><ins>+#import "WKAccessibilityWebPageObjectMac.h"
</ins><span class="cx"> #import <WebCore/GraphicsContext3DManager.h>
</span><span class="cx"> #import <WebCore/ScrollbarThemeMac.h>
</span><span class="cx"> #import <pal/spi/mac/NSScrollerImpSPI.h>
</span></span></pre>
</div>
</div>

</body>
</html>