WebKit Bugzilla
Attachment 341838 Details for
Bug 186227
: [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186227-20180602032653.patch (text/plain), 84.20 KB, created by
Darin Adler
on 2018-06-02 03:26:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-02 03:26:53 PDT
Size:
84.20 KB
patch
obsolete
>Subversion Revision: 232435 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 92185c85dc0048570d539a674b2cc31dbe8e33ac..5a1899e0c1db65678b1271fdaf291e57399b1667 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-02 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption >+ https://bugs.webkit.org/show_bug.cgi?id=186227 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/JSContext.mm: >+ (-[JSContext name]): Use CFBridgingRelease instead of autorelease. >+ * API/JSValue.mm: >+ (valueToObjectWithoutCopy): Use CFBridgingRelease instead of autorelease. >+ (containerValueToObject): Use adoptCF instead of autorelease. This is not only more >+ ARC-compatible, but more efficient. >+ (valueToString): Use CFBridgingRelease instead of autorelease. >+ > 2018-06-01 Wenson Hsieh <wenson_hsieh@apple.com> > > Fix the watchOS build after r232385 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e99b807bf30131a0c10bd4c73dedbb509ffea1bb..bfcd1c47f70560fabce836409cf07da97e621976 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-02 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption >+ https://bugs.webkit.org/show_bug.cgi?id=186227 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * bridge/objc/objc_instance.mm: >+ (ObjcInstance::~ObjcInstance): Use @autoreleasepool instead of NSAutoreleasePool. >+ * platform/ios/wak/WAKView.mm: >+ (-[WAKView _appendDescriptionToString:atLevel:]): Ditto. >+ > 2018-06-01 Ryosuke Niwa <rniwa@webkit.org> > > Editor can hold references to Documents after you navigate away >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 411b409b62922b6e6d5e3475d59996410264bc04..bf43c5ded4a154ce64f0ca4bdc48f1db28772ec4 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,17 @@ >+2018-06-02 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption >+ https://bugs.webkit.org/show_bug.cgi?id=186227 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Misc/WebKitErrors.m: >+ (+[NSError _registerWebKitErrors]): Use @autoreleasepool instead of NSAutoreleasePool. >+ * Plugins/WebPluginDatabase.mm: >+ (-[WebPluginDatabase refresh]): Ditto. >+ * WebCoreSupport/WebChromeClient.mm: >+ (WebChromeClient::setStatusbarText): Ditto. >+ > 2018-06-01 Chris Dumez <cdumez@apple.com> > > REGRESSION (r231456): Colloquy is broken >diff --git a/Source/JavaScriptCore/API/JSContext.mm b/Source/JavaScriptCore/API/JSContext.mm >index c632f395c02ab16e9923628fcdaca83c0ab5afe9..adb780138d85793ac69c4cc4bad8fb288f732139 100644 >--- a/Source/JavaScriptCore/API/JSContext.mm >+++ b/Source/JavaScriptCore/API/JSContext.mm >@@ -197,7 +197,7 @@ - (NSString *)name > if (!name) > return nil; > >- return (NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name)).autorelease(); >+ return CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, name)); > } > > - (void)setName:(NSString *)name >diff --git a/Source/JavaScriptCore/API/JSValue.mm b/Source/JavaScriptCore/API/JSValue.mm >index e7e329cafb989fbc0bcdec0b30bdaa73bfed2164..c8f497a0c14b048a114d2e740ceb199b633c3abc 100644 >--- a/Source/JavaScriptCore/API/JSValue.mm >+++ b/Source/JavaScriptCore/API/JSValue.mm >@@ -686,9 +686,8 @@ static JSContainerConvertor::Task valueToObjectWithoutCopy(JSGlobalContextRef co > } else if (JSValueIsString(context, value)) { > // Would be nice to unique strings, too. > JSStringRef jsstring = JSValueToStringCopy(context, value, 0); >- NSString * stringNS = (NSString *)JSStringCopyCFString(kCFAllocatorDefault, jsstring); >+ primitive = CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsstring)); > JSStringRelease(jsstring); >- primitive = [stringNS autorelease]; > } else if (JSValueIsNull(context, value)) > primitive = [NSNull null]; > else { >@@ -749,7 +748,7 @@ static id containerValueToObject(JSGlobalContextRef context, JSContainerConverto > for (size_t i = 0; i < length; ++i) { > JSStringRef propertyName = JSPropertyNameArrayGetNameAtIndex(propertyNameArray, i); > if (id objc = convertor.convert(JSObjectGetProperty(context, js, propertyName, 0))) >- dictionary[[(NSString *)JSStringCopyCFString(kCFAllocatorDefault, propertyName) autorelease]] = objc; >+ dictionary[(__bridge NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, propertyName)).get()] = objc; > } > > JSPropertyNameArrayRelease(propertyNameArray); >@@ -797,9 +796,9 @@ id valueToString(JSGlobalContextRef context, JSValueRef value, JSValueRef* excep > return nil; > } > >- RetainPtr<CFStringRef> stringCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, jsstring)); >+ NSString *string = CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsstring)); > JSStringRelease(jsstring); >- return (NSString *)stringCF.autorelease(); >+ return string; > } > > id valueToDate(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) >diff --git a/Source/WebCore/bridge/objc/objc_instance.mm b/Source/WebCore/bridge/objc/objc_instance.mm >index b7d24d44a24a6b05527745f61e94737de9b7968b..d8fab76570a7dad61aa8ec9bf5df4ca6fa5bdffd 100644 >--- a/Source/WebCore/bridge/objc/objc_instance.mm >+++ b/Source/WebCore/bridge/objc/objc_instance.mm >@@ -121,16 +121,14 @@ RefPtr<ObjcInstance> ObjcInstance::create(id instance, RefPtr<RootObject>&& root > ObjcInstance::~ObjcInstance() > { > // Both -finalizeForWebScript and -dealloc/-finalize of _instance may require autorelease pools. >- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; >+ @autoreleasepool { >+ ASSERT(_instance); >+ wrapperCache().remove(_instance.get()); > >- ASSERT(_instance); >- wrapperCache().remove(_instance.get()); >- >- if ([_instance.get() respondsToSelector:@selector(finalizeForWebScript)]) >- [_instance.get() performSelector:@selector(finalizeForWebScript)]; >- _instance = 0; >- >- [pool drain]; >+ if ([_instance.get() respondsToSelector:@selector(finalizeForWebScript)]) >+ [_instance.get() performSelector:@selector(finalizeForWebScript)]; >+ _instance = 0; >+ } > } > > void ObjcInstance::virtualBegin() >diff --git a/Source/WebCore/platform/ios/wak/WAKView.mm b/Source/WebCore/platform/ios/wak/WAKView.mm >index 42dc0482b45518ea76a36a745fff2532c415ef78..bb3a751e0592e05539f5747a8ffb00ceace805ad 100644 >--- a/Source/WebCore/platform/ios/wak/WAKView.mm >+++ b/Source/WebCore/platform/ios/wak/WAKView.mm >@@ -776,20 +776,18 @@ - (NSString *)description > > - (void)_appendDescriptionToString:(NSMutableString *)info atLevel:(int)level > { >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >+ @autoreleasepool { >+ if ([info length]) >+ [info appendString:@"\n"]; > >- if ([info length] != 0) >- [info appendString:@"\n"]; >+ for (int i = 1; i <= level; i++) >+ [info appendString:@" | "]; > >- for (int i = 1; i <= level; i++) >- [info appendString:@" | "]; >+ [info appendString:[self description]]; > >- [info appendString:[self description]]; >- >- for (WAKView *subview in [self subviews]) >- [subview _appendDescriptionToString:info atLevel:level + 1]; >- >- [pool release]; >+ for (WAKView *subview in [self subviews]) >+ [subview _appendDescriptionToString:info atLevel:level + 1]; >+ } > } > > @end >diff --git a/Source/WebKitLegacy/mac/Misc/WebKitErrors.m b/Source/WebKitLegacy/mac/Misc/WebKitErrors.m >index fc519154ea4c63aba7eaebc39bdd606d7dcdc2fa..07ef56e878967924eff2bff72c5ff6397cdf7a02 100644 >--- a/Source/WebKitLegacy/mac/Misc/WebKitErrors.m >+++ b/Source/WebKitLegacy/mac/Misc/WebKitErrors.m >@@ -66,30 +66,28 @@ + (void)_registerWebKitErrors > { > static dispatch_once_t flag; > dispatch_once(&flag, ^{ >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- >- NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: >- // Policy errors >- WebKitErrorDescriptionCannotShowMIMEType, [NSNumber numberWithInt: WebKitErrorCannotShowMIMEType], >- WebKitErrorDescriptionCannotShowURL, [NSNumber numberWithInt: WebKitErrorCannotShowURL], >- WebKitErrorDescriptionFrameLoadInterruptedByPolicyChange, [NSNumber numberWithInt: WebKitErrorFrameLoadInterruptedByPolicyChange], >- WebKitErrorDescriptionCannotUseRestrictedPort, [NSNumber numberWithInt: WebKitErrorCannotUseRestrictedPort], >- WebKitErrorDescriptionFrameLoadBlockedByContentFilter, [NSNumber numberWithInt: WebKitErrorFrameLoadBlockedByContentFilter], >- >- // Plug-in and java errors >- WebKitErrorDescriptionCannotFindPlugin, [NSNumber numberWithInt: WebKitErrorCannotFindPlugIn], >- WebKitErrorDescriptionCannotLoadPlugin, [NSNumber numberWithInt: WebKitErrorCannotLoadPlugIn], >- WebKitErrorDescriptionJavaUnavailable, [NSNumber numberWithInt: WebKitErrorJavaUnavailable], >- WebKitErrorDescriptionPlugInCancelledConnection, [NSNumber numberWithInt: WebKitErrorPlugInCancelledConnection], >- WebKitErrorDescriptionPlugInWillHandleLoad, [NSNumber numberWithInt: WebKitErrorPlugInWillHandleLoad], >- >- // Geolocation errors >- WebKitErrorDescriptionGeolocationLocationUnknown, [NSNumber numberWithInt: WebKitErrorGeolocationLocationUnknown], >- nil]; >- >- [NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain]; >- >- [pool drain]; >+ @autoreleasepool { >+ NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: >+ // Policy errors >+ WebKitErrorDescriptionCannotShowMIMEType, [NSNumber numberWithInt: WebKitErrorCannotShowMIMEType], >+ WebKitErrorDescriptionCannotShowURL, [NSNumber numberWithInt: WebKitErrorCannotShowURL], >+ WebKitErrorDescriptionFrameLoadInterruptedByPolicyChange, [NSNumber numberWithInt: WebKitErrorFrameLoadInterruptedByPolicyChange], >+ WebKitErrorDescriptionCannotUseRestrictedPort, [NSNumber numberWithInt: WebKitErrorCannotUseRestrictedPort], >+ WebKitErrorDescriptionFrameLoadBlockedByContentFilter, [NSNumber numberWithInt: WebKitErrorFrameLoadBlockedByContentFilter], >+ >+ // Plug-in and java errors >+ WebKitErrorDescriptionCannotFindPlugin, [NSNumber numberWithInt: WebKitErrorCannotFindPlugIn], >+ WebKitErrorDescriptionCannotLoadPlugin, [NSNumber numberWithInt: WebKitErrorCannotLoadPlugIn], >+ WebKitErrorDescriptionJavaUnavailable, [NSNumber numberWithInt: WebKitErrorJavaUnavailable], >+ WebKitErrorDescriptionPlugInCancelledConnection, [NSNumber numberWithInt: WebKitErrorPlugInCancelledConnection], >+ WebKitErrorDescriptionPlugInWillHandleLoad, [NSNumber numberWithInt: WebKitErrorPlugInWillHandleLoad], >+ >+ // Geolocation errors >+ WebKitErrorDescriptionGeolocationLocationUnknown, [NSNumber numberWithInt: WebKitErrorGeolocationLocationUnknown], >+ nil]; >+ >+ [NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebKitErrorDomain]; >+ } > }); > } > >diff --git a/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm b/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm >index 45afad3021bd272989bb07448e09fe4ffd0ff838..d86f2319c4d7789684a7dfa030adb3009cff23e8 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebPluginDatabase.mm >@@ -248,79 +248,80 @@ - (void)refresh > { > // This method does a bit of autoreleasing, so create an autorelease pool to ensure that calling > // -refresh multiple times does not bloat the default pool. >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- >- // Create map from plug-in path to WebBasePluginPackage >- if (!plugins) >- plugins = [[NSMutableDictionary alloc] initWithCapacity:12]; >- >- // Find all plug-ins on disk >- NSMutableSet *newPlugins = [self _scanForNewPlugins]; >- >- // Find plug-ins to remove from database (i.e., plug-ins that no longer exist on disk) >- NSMutableSet *pluginsToRemove = [NSMutableSet set]; >- NSEnumerator *pluginEnumerator = [plugins objectEnumerator]; >- WebBasePluginPackage *plugin; >- while ((plugin = [pluginEnumerator nextObject]) != nil) { >- // Any plug-ins that were removed from disk since the last refresh should be removed from >- // the database. >- if (![newPlugins containsObject:plugin]) >- [pluginsToRemove addObject:plugin]; >- >- // Remove every member of 'plugins' from 'newPlugins'. After this loop exits, 'newPlugins' >- // will be the set of new plug-ins that should be added to the database. >- [newPlugins removeObject:plugin]; >- } >+ @autoreleasepool { >+ // Create map from plug-in path to WebBasePluginPackage >+ if (!plugins) >+ plugins = [[NSMutableDictionary alloc] initWithCapacity:12]; >+ >+ // Find all plug-ins on disk >+ NSMutableSet *newPlugins = [self _scanForNewPlugins]; >+ >+ // Find plug-ins to remove from database (i.e., plug-ins that no longer exist on disk) >+ NSMutableSet *pluginsToRemove = [NSMutableSet set]; >+ NSEnumerator *pluginEnumerator = [plugins objectEnumerator]; >+ WebBasePluginPackage *plugin; >+ while ((plugin = [pluginEnumerator nextObject]) != nil) { >+ // Any plug-ins that were removed from disk since the last refresh should be removed from >+ // the database. >+ if (![newPlugins containsObject:plugin]) >+ [pluginsToRemove addObject:plugin]; >+ >+ // Remove every member of 'plugins' from 'newPlugins'. After this loop exits, 'newPlugins' >+ // will be the set of new plug-ins that should be added to the database. >+ [newPlugins removeObject:plugin]; >+ } > > #if !LOG_DISABLED >- if ([newPlugins count] > 0) >- LOG(Plugins, "New plugins:\n%@", newPlugins); >- if ([pluginsToRemove count] > 0) >- LOG(Plugins, "Removed plugins:\n%@", pluginsToRemove); >+ if ([newPlugins count] > 0) >+ LOG(Plugins, "New plugins:\n%@", newPlugins); >+ if ([pluginsToRemove count] > 0) >+ LOG(Plugins, "Removed plugins:\n%@", pluginsToRemove); > #endif > >- // Remove plugins from database >- pluginEnumerator = [pluginsToRemove objectEnumerator]; >- while ((plugin = [pluginEnumerator nextObject]) != nil) >- [self _removePlugin:plugin]; >- >- // Add new plugins to database >- pluginEnumerator = [newPlugins objectEnumerator]; >- while ((plugin = [pluginEnumerator nextObject]) != nil) >- [self _addPlugin:plugin]; >- >- // Build a list of MIME types. >- NSMutableSet *MIMETypes = [[NSMutableSet alloc] init]; >- pluginEnumerator = [plugins objectEnumerator]; >- while ((plugin = [pluginEnumerator nextObject])) { >- const PluginInfo& pluginInfo = [plugin pluginInfo]; >- for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) >- [MIMETypes addObject:pluginInfo.mimes[i].type]; >- } >- >- // Register plug-in views and representations. >- NSEnumerator *MIMEEnumerator = [MIMETypes objectEnumerator]; >- NSString *MIMEType; >- while ((MIMEType = [MIMEEnumerator nextObject]) != nil) { >- [registeredMIMETypes addObject:MIMEType]; >- >- if ([WebView canShowMIMETypeAsHTML:MIMEType]) >- // Don't allow plug-ins to override our core HTML types. >- continue; >- plugin = [self pluginForMIMEType:MIMEType]; >- if ([plugin isJavaPlugIn]) >- // Don't register the Java plug-in for a document view since Java files should be downloaded when not embedded. >- continue; >- if ([plugin isQuickTimePlugIn] && [[WebFrameView _viewTypesAllowImageTypeOmission:NO] objectForKey:MIMEType]) >- // Don't allow the QT plug-in to override any types because it claims many that we can handle ourselves. >- continue; >- >- if (self == sharedDatabase) >- [WebView _registerPluginMIMEType:MIMEType]; >+ // Remove plugins from database >+ pluginEnumerator = [pluginsToRemove objectEnumerator]; >+ while ((plugin = [pluginEnumerator nextObject]) != nil) >+ [self _removePlugin:plugin]; >+ >+ // Add new plugins to database >+ pluginEnumerator = [newPlugins objectEnumerator]; >+ while ((plugin = [pluginEnumerator nextObject]) != nil) >+ [self _addPlugin:plugin]; >+ >+ // Build a list of MIME types. >+ NSMutableSet *MIMETypes = [[NSMutableSet alloc] init]; >+ pluginEnumerator = [plugins objectEnumerator]; >+ while ((plugin = [pluginEnumerator nextObject])) { >+ const PluginInfo& pluginInfo = [plugin pluginInfo]; >+ for (size_t i = 0; i < pluginInfo.mimes.size(); ++i) >+ [MIMETypes addObject:pluginInfo.mimes[i].type]; >+ } >+ >+ // Register plug-in views and representations. >+ NSEnumerator *MIMEEnumerator = [MIMETypes objectEnumerator]; >+ NSString *MIMEType; >+ while ((MIMEType = [MIMEEnumerator nextObject]) != nil) { >+ [registeredMIMETypes addObject:MIMEType]; >+ >+ if ([WebView canShowMIMETypeAsHTML:MIMEType]) { >+ // Don't allow plug-ins to override our core HTML types. >+ continue; >+ } >+ plugin = [self pluginForMIMEType:MIMEType]; >+ if ([plugin isJavaPlugIn]) { >+ // Don't register the Java plug-in for a document view since Java files should be downloaded when not embedded. >+ continue; >+ } >+ if ([plugin isQuickTimePlugIn] && [[WebFrameView _viewTypesAllowImageTypeOmission:NO] objectForKey:MIMEType]) { >+ // Don't allow the QT plug-in to override any types because it claims many that we can handle ourselves. >+ continue; >+ } >+ >+ if (self == sharedDatabase) >+ [WebView _registerPluginMIMEType:MIMEType]; >+ } >+ [MIMETypes release]; > } >- [MIMETypes release]; >- >- [pool drain]; > } > > - (BOOL)isMIMETypeRegistered:(NSString *)MIMEType >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm >index 81fe21d7a6b741eaebe439f9b5731ec2b6590f38..7d5ff5ad5fb4e034a9a47b5c12f330f74d46ff80 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm >@@ -558,9 +558,9 @@ void WebChromeClient::setStatusbarText(const String& status) > { > // We want the temporaries allocated here to be released even before returning to the > // event loop; see <http://bugs.webkit.org/show_bug.cgi?id=9880>. >- NSAutoreleasePool* localPool = [[NSAutoreleasePool alloc] init]; >- CallUIDelegate(m_webView, @selector(webView:setStatusText:), (NSString *)status); >- [localPool drain]; >+ @autoreleasepool { >+ CallUIDelegate(m_webView, @selector(webView:setStatusText:), (NSString *)status); >+ } > } > > bool WebChromeClient::supportsImmediateInvalidation() >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a9b489e1928ed268c0c2a174f8998ecd35492fe8..794103d33a04f7245914f2b5ad8f2341f5a6a2a2 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,129 @@ >+2018-06-02 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption >+ https://bugs.webkit.org/show_bug.cgi?id=186227 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/mac/AccessibilityCommonMac.mm: >+ (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. >+ (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. >+ >+ * DumpRenderTree/mac/AccessibilityControllerMac.mm: Add a missing include. >+ >+ * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: >+ (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. >+ * DumpRenderTree/mac/AccessibilityTextMarkerMac.mm: >+ (AccessibilityTextMarker::isEqual): Ditto. >+ (AccessibilityTextMarkerRange::isEqual): Ditto. >+ >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (-[DumpRenderTree _waitForWebThread]): Use @autoreleasepool instead of NSAutoreleasePool. >+ (DumpRenderTreeMain): Ditto. >+ (WebThreadLockAfterDelegateCallbacksHaveCompleted): Ditto. >+ (runTest): Ditto. >+ >+ * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm: >+ (copyFile): Use a std::pair to return both a URL and an error rather than using an >+ out argument for the NSError. >+ (-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]): >+ Updated for the above change. >+ >+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm: >+ (-[DumpRenderTreeWindow _addToOpenWindows]): Add __bridge to a bridging typecast. >+ (-[DumpRenderTreeWindow close]): Ditto. >+ * DumpRenderTree/mac/LayoutTestHelper.m: >+ (setDisplayColorProfile): Ditto. >+ >+ * DumpRenderTree/mac/PolicyDelegate.mm: Add a missing include. >+ >+ * DumpRenderTree/mac/ResourceLoadDelegate.mm: >+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): >+ Add __bridge to a bridging typecast. >+ * DumpRenderTree/mac/TestRunnerMac.mm: >+ (-[APITestDelegateIPhone initWithTestRunner:utf8Data:baseURL:]): Ditto. >+ (TestRunner::apiTestNewWindowDataLoadBaseURL): Use @autoreleasepool instead of NSAutoreleasePool. >+ >+ * DumpRenderTree/mac/TextInputControllerMac.m: Fix a comment. >+ >+ * DumpRenderTree/mac/UIScriptControllerMac.mm: >+ (WTR::UIScriptController::replaceTextAtRange): Add __bridge to a bridging typecast. >+ (WTR::UIScriptController::contentsOfUserInterfaceItem const): Ditto. >+ (WTR::UIScriptController::overridePreference): Ditto. >+ * DumpRenderTree/mac/WorkQueueItemMac.mm: >+ (LoadItem::invoke const): Ditto. >+ (LoadHTMLStringItem::invoke const): Ditto. >+ (ScriptItem::invoke const): Ditto. >+ >+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: >+ (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. >+ (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. >+ >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: >+ (+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease. >+ (-[NSString createJSStringRef]): Add __bridge to a bridging typecast. >+ >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: >+ (WTR::AccessibilityController::accessibleElementById): Add __bridge to a bridging typecast. >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: >+ (-[NSString createJSStringRef]): Ditto. >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm: >+ (WTR::AccessibilityTextMarker::isEqual): Ditto. >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm: >+ (WTR::AccessibilityTextMarkerRange::isEqual): Ditto. >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: >+ (WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Ditto. >+ (WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto. >+ (WTR::AccessibilityUIElement::previousTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::nextTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto. >+ (WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto. >+ (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto. >+ (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto. >+ (WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto. >+ (WTR::createJSStringRef): Ditto. >+ (WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto. >+ (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto. >+ (WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto. >+ (WTR::AccessibilityUIElement::indexForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::isTextMarkerValid): Ditto. >+ (WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto. >+ (WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto. >+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm: >+ (WTR::initializeWebViewConfiguration): Ditto. >+ (WTR::TestController::platformContext): Ditto. >+ (WTR::TestController::platformPreferences): Ditto. >+ (WTR::TestController::platformAdjustContext): Ditto. >+ * WebKitTestRunner/mac/PlatformWebViewMac.mm: >+ (WTR::PlatformWebView::PlatformWebView): Ditto. >+ * WebKitTestRunner/mac/TestControllerMac.mm: >+ (WTR::TestController::initializeInjectedBundlePath): Ditto. >+ (WTR::TestController::initializeTestPluginDirectory): Ditto. >+ (WTR::TestController::platformConfigureViewForTest): Ditto. >+ >+ * WebKitTestRunner/mac/UIScriptControllerMac.mm: >+ (WTR::nsString): Use CFBridgingRelease instead of autorelease. >+ (WTR::UIScriptController::platformPlayBackEventStream): Add __bridge to a bridging >+ typecast. >+ >+ * WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Add a missing include. >+ >+ * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: >+ (-[LocalPasteboard setPropertyList:forType:]): Add _bridge to a bridging typecast. >+ (-[LocalPasteboard setString:forType:]): Ditto. >+ >+ * WebKitTestRunner/mac/main.mm: >+ (main): Use @autoreleasepool instead of NSAutoreleasePool. >+ > 2018-06-01 Daniel Bates <dabates@apple.com> > > Add some tests for lldb_webkit.py >diff --git a/Tools/DumpRenderTree/mac/AccessibilityCommonMac.mm b/Tools/DumpRenderTree/mac/AccessibilityCommonMac.mm >index 898d4f0aa67c3a2ecf7bcd3f900de5e28de7cc94..6597cad1805a154a25a0b22979390e7e38f71afb 100644 >--- a/Tools/DumpRenderTree/mac/AccessibilityCommonMac.mm >+++ b/Tools/DumpRenderTree/mac/AccessibilityCommonMac.mm >@@ -42,13 +42,12 @@ + (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef > if (!jsStringRef) > return nil; > >- CFStringRef cfString = JSStringCopyCFString(kCFAllocatorDefault, jsStringRef); >- return [(NSString *)cfString autorelease]; >+ return CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsStringRef)); > } > > - (JSStringRef)createJSStringRef > { >- return JSStringCreateWithCFString((CFStringRef)self); >+ return JSStringCreateWithCFString((__bridge CFStringRef)self); > } > > NSDictionary *searchPredicateParameterizedAttributeForSearchCriteria(JSContextRef context, AccessibilityUIElement *startElement, bool isDirectionNext, unsigned resultsLimit, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly, bool immediateDescendantsOnly) >diff --git a/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm b/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm >index 4c5e17c1bf051d88ecc3ab127c1f6949a42030e3..6b544553ffa8866947ff6723b345e118e3ba7c19 100644 >--- a/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm >+++ b/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm >@@ -34,8 +34,8 @@ > #import <Foundation/Foundation.h> > #import <JavaScriptCore/JSStringRef.h> > #import <JavaScriptCore/JSStringRefCF.h> >-#import <WebKit/WebFrame.h> > #import <WebKit/WebFramePrivate.h> >+#import <WebKit/WebFrameView.h> > #import <WebKit/WebHTMLView.h> > > AccessibilityController::AccessibilityController() >diff --git a/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm b/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm >index 5e9d6a159e43e0695dcb851c36e46e3eb43e4abb..03aa9c685a10e74614e9d26eb56c2526fc9b4139 100644 >--- a/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm >+++ b/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm >@@ -52,7 +52,7 @@ @implementation NSString (JSStringRefAdditions) > > - (JSStringRef)createJSStringRef > { >- return JSStringCreateWithCFString((CFStringRef)self); >+ return JSStringCreateWithCFString((__bridge CFStringRef)self); > } > > @end >diff --git a/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm b/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm >index b4781e2758c358a1e3717daa0afe95185a8c41ca..0eff91695064589fd9e8efb5c63561da199805d7 100644 >--- a/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm >+++ b/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm >@@ -48,7 +48,7 @@ AccessibilityTextMarker::~AccessibilityTextMarker() > > bool AccessibilityTextMarker::isEqual(AccessibilityTextMarker* other) > { >- return [(id)platformTextMarker() isEqual:(id)other->platformTextMarker()]; >+ return [(__bridge id)platformTextMarker() isEqual:(__bridge id)other->platformTextMarker()]; > } > > PlatformTextMarker AccessibilityTextMarker::platformTextMarker() const >@@ -74,7 +74,7 @@ AccessibilityTextMarkerRange::~AccessibilityTextMarkerRange() > > bool AccessibilityTextMarkerRange::isEqual(AccessibilityTextMarkerRange* other) > { >- return [(id)platformTextMarkerRange() isEqual:(id)other->platformTextMarkerRange()]; >+ return [(__bridge id)platformTextMarkerRange() isEqual:(__bridge id)other->platformTextMarkerRange()]; > } > > PlatformTextMarkerRange AccessibilityTextMarkerRange::platformTextMarkerRange() const >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 801656f5e360f12db4b0e7752e11ad590e8ac5f8..39a70b5c7179cac1b1ac4c6c4916c76e3e6b6307 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -1337,9 +1337,9 @@ - (void)_waitForWebThread > [self _webThreadInvoked]; > }); > while (!_hasFlushedWebThreadRunQueue) { >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >- [pool release]; >+ @autoreleasepool { >+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >+ } > } > } > >@@ -1367,23 +1367,25 @@ int DumpRenderTreeMain(int argc, const char *argv[]) > #if PLATFORM(IOS) > _UIApplicationLoadWebKit(); > #endif >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; > >- setDefaultsToConsistentValuesForTesting(); // Must be called before NSApplication initialization. >+ @autoreleasepoool { >+ setDefaultsToConsistentValuesForTesting(); // Must be called before NSApplication initialization. > > #if !PLATFORM(IOS) >- [DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself >+ [DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself > >- dumpRenderTree(argc, argv); >+ dumpRenderTree(argc, argv); > #else >- _argc = argc; >- _argv = argv; >- UIApplicationMain(argc, (char**)argv, @"DumpRenderTree", @"DumpRenderTree"); >-#endif >- [WebCoreStatistics garbageCollectJavaScriptObjects]; >- [WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts >- JSC::finalizeStatsAtEndOfTesting(); >- [pool release]; >+ _argc = argc; >+ _argv = argv; >+ UIApplicationMain(argc, (char**)argv, @"DumpRenderTree", @"DumpRenderTree"); >+#endif >+ >+ [WebCoreStatistics garbageCollectJavaScriptObjects]; >+ [WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts >+ JSC::finalizeStatsAtEndOfTesting(); >+ } >+ > returningFromMain = true; > return 0; > } >@@ -1867,9 +1869,9 @@ static void WebThreadLockAfterDelegateCallbacksHaveCompleted() > }); > > while (dispatch_semaphore_wait(delegateSemaphore, DISPATCH_TIME_NOW)) { >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >- [pool release]; >+ @autoreleasepool { >+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >+ } > } > > WebThreadLock(); >@@ -1994,70 +1996,70 @@ static void runTest(const string& inputLine) > if (ignoreWebCoreNodeLeaks) > [WebCoreStatistics startIgnoringWebCoreNodeLeaks]; > >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- [mainFrame loadRequest:[NSURLRequest requestWithURL:url]]; >- [pool release]; >+ @autoreleasepool { >+ [mainFrame loadRequest:[NSURLRequest requestWithURL:url]]; >+ } > > while (!done) { >- pool = [[NSAutoreleasePool alloc] init]; >- CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false); >- [pool release]; >+ @autoreleasepool { >+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false); >+ } > } > > #if PLATFORM(IOS) > [(DumpRenderTree *)UIApp _waitForWebThread]; > WebThreadLockAfterDelegateCallbacksHaveCompleted(); > #endif >- pool = [[NSAutoreleasePool alloc] init]; >- [EventSendingController clearSavedEvents]; >- [[mainFrame webView] setSelectedDOMRange:nil affinity:NSSelectionAffinityDownstream]; > >- workQueue.clear(); >+ @autoreleasepool { >+ [EventSendingController clearSavedEvents]; >+ [[mainFrame webView] setSelectedDOMRange:nil affinity:NSSelectionAffinityDownstream]; > >- // If the test page could have possibly opened the Web Inspector frontend, >- // then try to close it in case it was accidentally left open. >- if (shouldEnableDeveloperExtras(pathOrURL.c_str())) { >- gTestRunner->closeWebInspector(); >- gTestRunner->setDeveloperExtrasEnabled(false); >- } >+ workQueue.clear(); >+ >+ // If the test page could have possibly opened the Web Inspector frontend, >+ // then try to close it in case it was accidentally left open. >+ if (shouldEnableDeveloperExtras(pathOrURL.c_str())) { >+ gTestRunner->closeWebInspector(); >+ gTestRunner->setDeveloperExtrasEnabled(false); >+ } > > #if PLATFORM(MAC) >- // Make sure the WebView is parented, since the test may have unparented it. >- WebView *webView = [mainFrame webView]; >- if (![webView superview]) >- [[mainWindow contentView] addSubview:webView]; >+ // Make sure the WebView is parented, since the test may have unparented it. >+ WebView *webView = [mainFrame webView]; >+ if (![webView superview]) >+ [[mainWindow contentView] addSubview:webView]; > #endif > >- if (gTestRunner->closeRemainingWindowsWhenComplete()) { >- NSArray* array = [DumpRenderTreeWindow openWindows]; >+ if (gTestRunner->closeRemainingWindowsWhenComplete()) { >+ NSArray* array = [DumpRenderTreeWindow openWindows]; > >- unsigned count = [array count]; >- for (unsigned i = 0; i < count; i++) { >- NSWindow *window = [array objectAtIndex:i]; >+ unsigned count = [array count]; >+ for (unsigned i = 0; i < count; i++) { >+ NSWindow *window = [array objectAtIndex:i]; > >- // Don't try to close the main window >- if (window == [[mainFrame webView] window]) >- continue; >+ // Don't try to close the main window >+ if (window == [[mainFrame webView] window]) >+ continue; > > #if !PLATFORM(IOS) >- WebView *webView = [[[window contentView] subviews] objectAtIndex:0]; >+ WebView *webView = [[[window contentView] subviews] objectAtIndex:0]; > #else >- ASSERT([[window contentView] isKindOfClass:[WebView class]]); >- WebView *webView = (WebView *)[window contentView]; >+ ASSERT([[window contentView] isKindOfClass:[WebView class]]); >+ WebView *webView = (WebView *)[window contentView]; > #endif > >- [webView close]; >- [window close]; >+ [webView close]; >+ [window close]; >+ } > } >- } > >- resetWebViewToConsistentStateBeforeTesting(options); >+ resetWebViewToConsistentStateBeforeTesting(options); > >- // Loading an empty request synchronously replaces the document with a blank one, which is necessary >- // to stop timers, WebSockets and other activity that could otherwise spill output into next test's results. >- [mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@""]]]; >- >- [pool release]; >+ // Loading an empty request synchronously replaces the document with a blank one, which is necessary >+ // to stop timers, WebSockets and other activity that could otherwise spill output into next test's results. >+ [mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@""]]]; >+ } > > // We should only have our main window left open when we're done > ASSERT(CFArrayGetCount(openWindowsRef) == 1); >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm b/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >index 28a9e714e5035a75938f78a7b0f56bb452d01191..688203d3ef97157c9924fecdc66937855fdda65e 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >@@ -96,7 +96,7 @@ - (void)dealloc > [super dealloc]; > } > >-static NSURL *copyFile(NSURL *sourceURL, NSURL *destinationDirectory, NSError *&error) >+static std::pair<NSURL *, NSError *> copyFile(NSURL *sourceURL, NSURL *destinationDirectory) > { > // Emulate how CFPasteboard finds unique destination file names by inserting " 2", " 3", and so > // on between the file name's base and extension until a new file is successfully created in >@@ -105,16 +105,16 @@ static NSURL *copyFile(NSURL *sourceURL, NSURL *destinationDirectory, NSError *& > NSUInteger number = 2; > NSString *fileName = sourceURL.lastPathComponent; > NSURL *destinationURL = [NSURL fileURLWithPath:fileName relativeToURL:destinationDirectory]; >+ NSError *error; > while (![NSFileManager.defaultManager copyItemAtURL:sourceURL toURL:destinationURL error:&error]) { > if (error.domain != NSCocoaErrorDomain || error.code != NSFileWriteFileExistsError) >- return nil; >+ return { nil, error }; > > NSString *newFileName = [NSString stringWithFormat:@"%@ %lu.%@", fileName.stringByDeletingPathExtension, (unsigned long)number++, fileName.pathExtension]; > destinationURL = [NSURL fileURLWithPath:newFileName relativeToURL:destinationDirectory]; >- error = nil; > } > >- return destinationURL; >+ return { destinationURL, nil }; > } > > - (void)receivePromisedFilesAtDestination:(NSURL *)destinationDirectory options:(NSDictionary *)options operationQueue:(NSOperationQueue *)operationQueue reader:(void (^)(NSURL *fileURL, NSError * __nullable errorOrNil))reader >@@ -125,8 +125,9 @@ - (void)receivePromisedFilesAtDestination:(NSURL *)destinationDirectory options: > NSArray<NSURL *> *sourceURLs = _draggingSource.promisedFileURLs; > for (NSURL *sourceURL in sourceURLs) { > [operationQueue addOperationWithBlock:^{ >- NSError *error = nil; >- NSURL *destinationURL = copyFile(sourceURL, destinationDirectory, error); >+ NSError *error; >+ NSURL *destinationURL; >+ std::tie(destinationURL, error) = copyFile(sourceURL, destinationDirectory); > if (destinationURL) { > dispatch_async(dispatch_get_main_queue(), ^{ > [_destinationURLs addObject:destinationURL]; >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm >index 673e688da8920261d1b54754b881d0dc321734b6..15ec43bbd9ebf650f1d29dbd3c526f218d2ea470 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm >@@ -68,7 +68,7 @@ - (void)_addToOpenWindows > if (!openWindowsRef) > openWindowsRef = CFArrayCreateMutable(NULL, 0, &NonRetainingArrayCallbacks); > >- CFArrayAppendValue(openWindowsRef, self); >+ CFArrayAppendValue(openWindowsRef, (__bridge CFTypeRef)self); > } > > #if !PLATFORM(IOS) >@@ -102,7 +102,7 @@ - (void)close > [[NSNotificationCenter defaultCenter] removeObserver:self]; > > CFRange arrayRange = CFRangeMake(0, CFArrayGetCount(openWindowsRef)); >- CFIndex i = CFArrayGetFirstIndexOfValue(openWindowsRef, arrayRange, self); >+ CFIndex i = CFArrayGetFirstIndexOfValue(openWindowsRef, arrayRange, (__bridge CFTypeRef)self); > if (i != kCFNotFound) > CFArrayRemoveValueAtIndex(openWindowsRef, i); > >diff --git a/Tools/DumpRenderTree/mac/LayoutTestHelper.m b/Tools/DumpRenderTree/mac/LayoutTestHelper.m >index 88aa86fdf5ea4fe619a64a5b5fcda9d9e5fe87df..330f27ef0beb497a493872afa38c7aaaf7b36d4e 100644 >--- a/Tools/DumpRenderTree/mac/LayoutTestHelper.m >+++ b/Tools/DumpRenderTree/mac/LayoutTestHelper.m >@@ -147,7 +147,7 @@ static void saveDisplayColorProfiles(NSArray *displayUUIDStrings) > static void setDisplayColorProfile(NSString *displayUUIDString, NSURL *colorProfileURL) > { > NSDictionary *profileInfo = @{ >- (NSString *)kColorSyncDeviceDefaultProfileID : colorProfileURL >+ (__bridge NSString *)kColorSyncDeviceDefaultProfileID : colorProfileURL > }; > > CFUUIDRef uuid = CFUUIDCreateFromString(kCFAllocatorDefault, (CFStringRef)displayUUIDString); >diff --git a/Tools/DumpRenderTree/mac/PolicyDelegate.mm b/Tools/DumpRenderTree/mac/PolicyDelegate.mm >index be816cc44794fe3ac71382af009025063f99de9a..6cd48937f5534cb0c0ef96a313705250af70cef8 100644 >--- a/Tools/DumpRenderTree/mac/PolicyDelegate.mm >+++ b/Tools/DumpRenderTree/mac/PolicyDelegate.mm >@@ -32,6 +32,7 @@ > #import "DumpRenderTree.h" > #import "TestRunner.h" > #import <WebKit/DOMElement.h> >+#import <WebKit/WebDataSource.h> > #import <WebKit/WebFrame.h> > #import <WebKit/WebPolicyDelegate.h> > #import <WebKit/WebView.h> >diff --git a/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm >index 6cb5f24262397b21d110aa50adcd47a88b24c3f9..30e805fdad4454588ea5762eb8d52c0ad6dd5fda 100644 >--- a/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm >+++ b/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm >@@ -172,7 +172,7 @@ -(NSURLRequest *)webView: (WebView *)wv resource:identifier willSendRequest: (NS > } > } > >- if (disallowedURLs && CFSetContainsValue(disallowedURLs, url)) >+ if (disallowedURLs && CFSetContainsValue(disallowedURLs, (__bridge CFURLRef)url)) > return nil; > > NSMutableURLRequest *newRequest = [request mutableCopy]; >diff --git a/Tools/DumpRenderTree/mac/TestRunnerMac.mm b/Tools/DumpRenderTree/mac/TestRunnerMac.mm >index 1e9d627b5b5bf612aaebd3aafca623c7de5e36a9..e6d2d76cfbecaa1486650db3cf89e925c6a57866 100644 >--- a/Tools/DumpRenderTree/mac/TestRunnerMac.mm >+++ b/Tools/DumpRenderTree/mac/TestRunnerMac.mm >@@ -927,8 +927,8 @@ - (id)initWithTestRunner:(TestRunner*)runner utf8Data:(JSStringRef)dataString ba > return nil; > > testRunner = runner; >- data = [[(NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, dataString)).get() dataUsingEncoding:NSUTF8StringEncoding] retain]; >- baseURL = [[NSURL URLWithString:(NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, baseURLString)).get()] retain]; >+ data = [[(__bridge NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, dataString)).get() dataUsingEncoding:NSUTF8StringEncoding] retain]; >+ baseURL = [[NSURL URLWithString:(__bridge NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, baseURLString)).get()] retain]; > return self; > } > >@@ -1004,33 +1004,33 @@ void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringR > } > #endif > >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >+ @autoreleasepool { >+ RetainPtr<CFStringRef> utf8DataCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, utf8Data)); >+ RetainPtr<CFStringRef> baseURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, baseURL)); > >- RetainPtr<CFStringRef> utf8DataCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, utf8Data)); >- RetainPtr<CFStringRef> baseURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, baseURL)); >- >- WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]; >+ WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]; > >- bool done = false; >- APITestDelegate *delegate = [[APITestDelegate alloc] initWithCompletionCondition:&done]; >- [webView setFrameLoadDelegate:delegate]; >+ bool done = false; >+ APITestDelegate *delegate = [[APITestDelegate alloc] initWithCompletionCondition:&done]; >+ [webView setFrameLoadDelegate:delegate]; > >- [[webView mainFrame] loadData:[(NSString *)utf8DataCF.get() dataUsingEncoding:NSUTF8StringEncoding] MIMEType:@"text/html" textEncodingName:@"utf-8" baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]]; >- >- while (!done) { >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >- [pool release]; >- } >+ [[webView mainFrame] loadData:[(__bridge NSString *)utf8DataCF.get() dataUsingEncoding:NSUTF8StringEncoding] MIMEType:@"text/html" textEncodingName:@"utf-8" baseURL:[NSURL URLWithString:(__bridge NSString *)baseURLCF.get()]]; >+ >+ while (!done) { >+ @autoreleasepool { >+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; >+ [pool release]; >+ } >+ } > > #if PLATFORM(IOS) >- [(DumpRenderTree *)[UIApplication sharedApplication] _waitForWebThread]; >+ [(DumpRenderTree *)[UIApplication sharedApplication] _waitForWebThread]; > #endif > >- [webView close]; >- [webView release]; >- [delegate release]; >- [pool release]; >+ [webView close]; >+ [webView release]; >+ [delegate release]; >+ } > } > > void TestRunner::apiTestGoToCurrentBackForwardItem() >diff --git a/Tools/DumpRenderTree/mac/TextInputControllerMac.m b/Tools/DumpRenderTree/mac/TextInputControllerMac.m >index f79930d1ce2cadd2a18f07bf543ca780420e81ff..e7d0236b7f90034df94fc500a8cd614ef9799f09 100644 >--- a/Tools/DumpRenderTree/mac/TextInputControllerMac.m >+++ b/Tools/DumpRenderTree/mac/TextInputControllerMac.m >@@ -546,4 +546,4 @@ - (BOOL)interpretKeyEvents:(NSArray *)eventArray withSender:(WebHTMLView *)sende > > @end > >-#endif // !PLATFORM(IOS) >+#endif // PLATFORM(MAC) >diff --git a/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm b/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm >index 7172987319aa359e98aefcbcaf36920a1b9d3ddb..b3ac6ae69c06c07107a5511ac684103199ef8e36 100644 >--- a/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm >+++ b/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm >@@ -70,7 +70,7 @@ void UIScriptController::replaceTextAtRange(JSStringRef text, int location, int > { > auto textToInsert = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, text)); > auto rangeAttribute = adoptNS([[NSDictionary alloc] initWithObjectsAndKeys:NSStringFromRange(NSMakeRange(location == -1 ? NSNotFound : location, length)), NSTextInputReplacementRangeAttributeName, nil]); >- auto textAndRange = adoptNS([[NSAttributedString alloc] initWithString:(NSString *)textToInsert.get() attributes:rangeAttribute.get()]); >+ auto textAndRange = adoptNS([[NSAttributedString alloc] initWithString:(__bridge NSString *)textToInsert.get() attributes:rangeAttribute.get()]); > > [mainFrame.webView insertText:textAndRange.get()]; > } >@@ -98,7 +98,7 @@ JSObjectRef UIScriptController::contentsOfUserInterfaceItem(JSStringRef interfac > #if JSC_OBJC_API_ENABLED > WebView *webView = [mainFrame webView]; > RetainPtr<CFStringRef> interfaceItemCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, interfaceItem)); >- NSDictionary *contentDictionary = [webView _contentsOfUserInterfaceItem:(NSString *)interfaceItemCF.get()]; >+ NSDictionary *contentDictionary = [webView _contentsOfUserInterfaceItem:(__bridge NSString *)interfaceItemCF.get()]; > return JSValueToObject(m_context->jsContext(), [JSValue valueWithObject:contentDictionary inContext:[JSContext contextWithJSGlobalContextRef:m_context->jsContext()]].JSValueRef, nullptr); > #else > UNUSED_PARAM(interfaceItem); >@@ -112,7 +112,7 @@ void UIScriptController::overridePreference(JSStringRef preferenceRef, JSStringR > > RetainPtr<CFStringRef> value = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, valueRef)); > if (JSStringIsEqualToUTF8CString(preferenceRef, "WebKitMinimumFontSize")) >- preferences.minimumFontSize = [(NSString *)value.get() doubleValue]; >+ preferences.minimumFontSize = [(__bridge NSString *)value.get() doubleValue]; > } > > void UIScriptController::simulateRotation(DeviceOrientation*, JSValueRef) >diff --git a/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm b/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm >index 17455c98b6090097871c6b0b2d5725a14a9c4958..7cc1c29c80e3159b9bdf2189f93695ac87e718ed 100644 >--- a/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm >+++ b/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm >@@ -41,9 +41,9 @@ > bool LoadItem::invoke() const > { > RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_url.get())); >- NSString *urlNS = (NSString *)urlCF.get(); >+ NSString *urlNS = (__bridge NSString *)urlCF.get(); > RetainPtr<CFStringRef> targetCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_target.get())); >- NSString *targetNS = (NSString *)targetCF.get(); >+ NSString *targetNS = (__bridge NSString *)targetCF.get(); > > WebFrame *targetFrame; > if (targetNS && [targetNS length]) >@@ -61,11 +61,11 @@ bool LoadHTMLStringItem::invoke() const > > if (m_unreachableURL) { > RetainPtr<CFStringRef> unreachableURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_unreachableURL.get())); >- [mainFrame loadAlternateHTMLString:(NSString *)contentCF.get() baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()] forUnreachableURL:[NSURL URLWithString:(NSString *)unreachableURLCF.get()]]; >+ [mainFrame loadAlternateHTMLString:(__bridge NSString *)contentCF.get() baseURL:[NSURL URLWithString:(__bridge NSString *)baseURLCF.get()] forUnreachableURL:[NSURL URLWithString:(__bridge NSString *)unreachableURLCF.get()]]; > return true; > } > >- [mainFrame loadHTMLString:(NSString *)contentCF.get() baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]]; >+ [mainFrame loadHTMLString:(__bridge NSString *)contentCF.get() baseURL:[NSURL URLWithString:(__bridge NSString *)baseURLCF.get()]]; > return true; > } > >@@ -78,7 +78,7 @@ bool ReloadItem::invoke() const > bool ScriptItem::invoke() const > { > RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_script.get())); >- NSString *scriptNS = (NSString *)scriptCF.get(); >+ NSString *scriptNS = (__bridge NSString *)scriptCF.get(); > [[mainFrame webView] stringByEvaluatingJavaScriptFromString:scriptNS]; > return true; > } >diff --git a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm b/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >index ff256917fddd0909b9997b1f2a9eb89b191ea18b..d67ee4416a593c06f6ec7c2ebc58091e63c7d1a4 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >@@ -108,13 +108,12 @@ + (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef > if (!jsStringRef) > return nil; > >- CFStringRef cfString = JSStringCopyCFString(kCFAllocatorDefault, jsStringRef); >- return [(NSString *)cfString autorelease]; >+ return CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsStringRef)); > } > > - (JSStringRef)createJSStringRef > { >- return JSStringCreateWithCFString((CFStringRef)self); >+ return JSStringCreateWithCFString((__bridge CFStringRef)self); > } > > @end >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm >index 7d467788e57297ad2bd6ab0ce7a88560cd212e49..9ea64322d112206d2918ab447cb369ac2584ea2f 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm >@@ -42,13 +42,12 @@ + (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef > if (!jsStringRef) > return nil; > >- CFStringRef cfString = JSStringCopyCFString(kCFAllocatorDefault, jsStringRef); >- return [(NSString *)cfString autorelease]; >+ return CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsStringRef)); > } > > - (JSStringRef)createJSStringRef > { >- return JSStringCreateWithCFString((CFStringRef)self); >+ return JSStringCreateWithCFString((__bridge CFStringRef)self); > } > > namespace WTR { >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm >index 750ed8462f02e7b5865049d057de478677c5dfc2..310fa4871542e7f8bdb911736385498a19e04e77 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm >@@ -96,7 +96,7 @@ static id findAccessibleObjectById(id obj, NSString *idAttribute) > RefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef idAttribute) > { > WKBundlePageRef page = InjectedBundle::singleton().page()->page(); >- id root = static_cast<PlatformUIElement>(WKAccessibilityRootObject(page)); >+ id root = (__bridge id)WKAccessibilityRootObject(page); > > id result = findAccessibleObjectById(root, [NSString stringWithJSStringRef:idAttribute]); > if (result) >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm >index 61d4b258445e03f69c4f0595217524d101388c68..f3ecb3b460de67940b3696bedd4d595c0bf5e2db 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm >@@ -54,7 +54,7 @@ @implementation NSString (JSStringRefAdditions) > > - (JSStringRef)createJSStringRef > { >- return JSStringCreateWithCFString((CFStringRef)self); >+ return JSStringCreateWithCFString((__bridge CFStringRef)self); > } > > @end >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm >index face90ce50e239704ed17843b05277a38c9c207f..5eb95f227401f87d6f39f4d549c0fcc8546d7a87 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm >@@ -29,7 +29,7 @@ namespace WTR { > > bool AccessibilityTextMarker::isEqual(AccessibilityTextMarker* other) > { >- return [(id)platformTextMarker() isEqual:(id)other->platformTextMarker()]; >+ return [(__bridge id)platformTextMarker() isEqual:(__bridge id)other->platformTextMarker()]; > } > > } // namespace WTR >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm >index 2186497dfaaf3f983ea57c4ae231e70644ba0dec..d383dfa44343514f93f76750bb2884fc8dee97c5 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm >@@ -29,7 +29,7 @@ namespace WTR { > > bool AccessibilityTextMarkerRange::isEqual(AccessibilityTextMarkerRange* other) > { >- return [(id)platformTextMarkerRange() isEqual:(id)other->platformTextMarkerRange()]; >+ return [(__bridge id)platformTextMarkerRange() isEqual:(__bridge id)other->platformTextMarkerRange()]; > } > > } // namespace WTR >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >index ccc7f21ac78ef6781b3b3f169ea3b0f950b21442..9e074d1497fe2221766e751cd03ab13dfe0c4816 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >@@ -1402,7 +1402,7 @@ bool AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned le > bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange* markerRange) > { > BEGIN_AX_OBJC_EXCEPTIONS >- [m_element accessibilitySetValue:(id)markerRange->platformTextMarkerRange() forAttribute:NSAccessibilitySelectedTextMarkerRangeAttribute]; >+ [m_element accessibilitySetValue:(__bridge id)markerRange->platformTextMarkerRange() forAttribute:NSAccessibilitySelectedTextMarkerRangeAttribute]; > END_AX_OBJC_EXCEPTIONS > > return true; >@@ -1670,7 +1670,7 @@ void AccessibilityUIElement::removeSelection() > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::lineTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarkerRange = [m_element accessibilityAttributeValue:@"AXLineTextMarkerRangeForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id textMarkerRange = [m_element accessibilityAttributeValue:@"AXLineTextMarkerRangeForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS > >@@ -1690,7 +1690,7 @@ RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForE > int AccessibilityUIElement::textMarkerRangeLength(AccessibilityTextMarkerRange* range) > { > BEGIN_AX_OBJC_EXCEPTIONS >- NSNumber* lengthValue = [m_element accessibilityAttributeValue:@"AXLengthForTextMarkerRange" forParameter:(id)range->platformTextMarkerRange()]; >+ NSNumber* lengthValue = [m_element accessibilityAttributeValue:@"AXLengthForTextMarkerRange" forParameter:(__bridge id)range->platformTextMarkerRange()]; > return [lengthValue intValue]; > END_AX_OBJC_EXCEPTIONS > >@@ -1700,7 +1700,7 @@ int AccessibilityUIElement::textMarkerRangeLength(AccessibilityTextMarkerRange* > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id previousMarker = [m_element accessibilityAttributeValue:@"AXPreviousTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id previousMarker = [m_element accessibilityAttributeValue:@"AXPreviousTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(previousMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1710,7 +1710,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousTextMarker(Acces > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id nextMarker = [m_element accessibilityAttributeValue:@"AXNextTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id nextMarker = [m_element accessibilityAttributeValue:@"AXNextTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(nextMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1720,7 +1720,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextTextMarker(Accessibi > JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForTextMarkerRange(AccessibilityTextMarkerRange* markerRange) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textString = [m_element accessibilityAttributeValue:@"AXStringForTextMarkerRange" forParameter:(id)markerRange->platformTextMarkerRange()]; >+ id textString = [m_element accessibilityAttributeValue:@"AXStringForTextMarkerRange" forParameter:(__bridge id)markerRange->platformTextMarkerRange()]; > return [textString createJSStringRef]; > END_AX_OBJC_EXCEPTIONS > >@@ -1730,7 +1730,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForTextMarkerRange(Access > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- NSArray* textMarkers = [NSArray arrayWithObjects:(id)startMarker->platformTextMarker(), (id)endMarker->platformTextMarker(), nil]; >+ NSArray* textMarkers = [NSArray arrayWithObjects:(__bridge id)startMarker->platformTextMarker(), (__bridge id)endMarker->platformTextMarker(), nil]; > id textMarkerRange = [m_element accessibilityAttributeValue:@"AXTextMarkerRangeForUnorderedTextMarkers" forParameter:textMarkers]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS >@@ -1767,7 +1767,7 @@ void AccessibilityUIElement::resetSelectedTextMarkerRange() > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange* range) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarker = [m_element accessibilityAttributeValue:@"AXStartTextMarkerForTextMarkerRange" forParameter:(id)range->platformTextMarkerRange()]; >+ id textMarker = [m_element accessibilityAttributeValue:@"AXStartTextMarkerForTextMarkerRange" forParameter:(__bridge id)range->platformTextMarkerRange()]; > return AccessibilityTextMarker::create(textMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1777,7 +1777,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForTextMa > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange* range) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarker = [m_element accessibilityAttributeValue:@"AXEndTextMarkerForTextMarkerRange" forParameter:(id)range->platformTextMarkerRange()]; >+ id textMarker = [m_element accessibilityAttributeValue:@"AXEndTextMarkerForTextMarkerRange" forParameter:(__bridge id)range->platformTextMarkerRange()]; > return AccessibilityTextMarker::create(textMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1817,7 +1817,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForPoint(int x > RefPtr<AccessibilityUIElement> AccessibilityUIElement::accessibilityElementForTextMarker(AccessibilityTextMarker* marker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id uiElement = [m_element accessibilityAttributeValue:@"AXUIElementForTextMarker" forParameter:(id)marker->platformTextMarker()]; >+ id uiElement = [m_element accessibilityAttributeValue:@"AXUIElementForTextMarker" forParameter:(__bridge id)marker->platformTextMarker()]; > if (uiElement) > return AccessibilityUIElement::create(uiElement); > END_AX_OBJC_EXCEPTIONS >@@ -1835,9 +1835,9 @@ static JSStringRef createJSStringRef(id string) > misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue]; > if (misspelled) > [mutableString appendString:@"Misspelled, "]; >- id font = [attributes objectForKey:(id)kAXFontTextAttribute]; >+ id font = [attributes objectForKey:(__bridge id)kAXFontTextAttribute]; > if (font) >- [mutableString appendFormat:@"%@ - %@, ", (id)kAXFontTextAttribute, font]; >+ [mutableString appendFormat:@"%@ - %@, ", (__bridge id)kAXFontTextAttribute, font]; > }; > [string enumerateAttributesInRange:NSMakeRange(0, [string length]) options:(NSAttributedStringEnumerationOptions)0 usingBlock:attributeEnumerationBlock]; > [mutableString appendString:[string string]]; >@@ -1849,7 +1849,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForTextMarkerRa > NSAttributedString* string = nil; > > BEGIN_AX_OBJC_EXCEPTIONS >- string = [m_element accessibilityAttributeValue:@"AXAttributedStringForTextMarkerRange" forParameter:(id)markerRange->platformTextMarkerRange()]; >+ string = [m_element accessibilityAttributeValue:@"AXAttributedStringForTextMarkerRange" forParameter:(__bridge id)markerRange->platformTextMarkerRange()]; > END_AX_OBJC_EXCEPTIONS > > if (![string isKindOfClass:[NSAttributedString class]]) >@@ -1864,9 +1864,9 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForTextMarkerRa > > id parameter = nil; > if (includeSpellCheck) >- parameter = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:includeSpellCheck], @"AXSpellCheck", (id)markerRange->platformTextMarkerRange(), @"AXTextMarkerRange", nil]; >+ parameter = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:includeSpellCheck], @"AXSpellCheck", (__bridge id)markerRange->platformTextMarkerRange(), @"AXTextMarkerRange", nil]; > else >- parameter = (id)markerRange->platformTextMarkerRange(); >+ parameter = (__bridge id)markerRange->platformTextMarkerRange(); > > BEGIN_AX_OBJC_EXCEPTIONS > string = [m_element accessibilityAttributeValue:@"AXAttributedStringForTextMarkerRangeWithOptions" forParameter:parameter]; >@@ -1881,7 +1881,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForTextMarkerRa > bool AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute(JSStringRef attribute, AccessibilityTextMarkerRange* range) > { > BEGIN_AX_OBJC_EXCEPTIONS >- NSAttributedString* string = [m_element accessibilityAttributeValue:@"AXAttributedStringForTextMarkerRange" forParameter:(id)range->platformTextMarkerRange()]; >+ NSAttributedString* string = [m_element accessibilityAttributeValue:@"AXAttributedStringForTextMarkerRange" forParameter:(__bridge id)range->platformTextMarkerRange()]; > if (![string isKindOfClass:[NSAttributedString class]]) > return false; > >@@ -1896,7 +1896,7 @@ bool AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute > int AccessibilityUIElement::indexForTextMarker(AccessibilityTextMarker* marker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- NSNumber* indexNumber = [m_element accessibilityAttributeValue:@"AXIndexForTextMarker" forParameter:(id)marker->platformTextMarker()]; >+ NSNumber* indexNumber = [m_element accessibilityAttributeValue:@"AXIndexForTextMarker" forParameter:(__bridge id)marker->platformTextMarker()]; > return [indexNumber intValue]; > END_AX_OBJC_EXCEPTIONS > >@@ -1906,7 +1906,7 @@ int AccessibilityUIElement::indexForTextMarker(AccessibilityTextMarker* marker) > bool AccessibilityUIElement::isTextMarkerValid(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- NSNumber* validNumber = [m_element accessibilityAttributeValue:@"AXTextMarkerIsValid" forParameter:(id)textMarker->platformTextMarker()]; >+ NSNumber* validNumber = [m_element accessibilityAttributeValue:@"AXTextMarkerIsValid" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return [validNumber boolValue]; > END_AX_OBJC_EXCEPTIONS > >@@ -1946,7 +1946,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarker() > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarkerRange = [m_element accessibilityAttributeValue:@"AXLeftWordTextMarkerRangeForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id textMarkerRange = [m_element accessibilityAttributeValue:@"AXLeftWordTextMarkerRangeForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS > >@@ -1956,7 +1956,7 @@ RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::leftWordTextMarkerR > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarkerRange = [m_element accessibilityAttributeValue:@"AXRightWordTextMarkerRangeForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id textMarkerRange = [m_element accessibilityAttributeValue:@"AXRightWordTextMarkerRangeForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS > >@@ -1966,7 +1966,7 @@ RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::rightWordTextMarker > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousWordStartTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id previousWordStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousWordStartTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id previousWordStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousWordStartTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(previousWordStartMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1976,7 +1976,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousWordStartTextMar > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextWordEndTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id nextWordEndMarker = [m_element accessibilityAttributeValue:@"AXNextWordEndTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id nextWordEndMarker = [m_element accessibilityAttributeValue:@"AXNextWordEndTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(nextWordEndMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -1986,7 +1986,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextWordEndTextMarkerFor > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarkerRange = [m_element accessibilityAttributeValue:@"AXParagraphTextMarkerRangeForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id textMarkerRange = [m_element accessibilityAttributeValue:@"AXParagraphTextMarkerRangeForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS > >@@ -1996,7 +1996,7 @@ RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::paragraphTextMarker > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id previousParagraphStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousParagraphStartTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id previousParagraphStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousParagraphStartTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(previousParagraphStartMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -2006,7 +2006,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousParagraphStartTe > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id nextParagraphEndMarker = [m_element accessibilityAttributeValue:@"AXNextParagraphEndTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id nextParagraphEndMarker = [m_element accessibilityAttributeValue:@"AXNextParagraphEndTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(nextParagraphEndMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -2016,7 +2016,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextParagraphEndTextMark > RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id textMarkerRange = [m_element accessibilityAttributeValue:@"AXSentenceTextMarkerRangeForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id textMarkerRange = [m_element accessibilityAttributeValue:@"AXSentenceTextMarkerRangeForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarkerRange::create(textMarkerRange); > END_AX_OBJC_EXCEPTIONS > >@@ -2026,7 +2026,7 @@ RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::sentenceTextMarkerR > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id previousParagraphStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousSentenceStartTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id previousParagraphStartMarker = [m_element accessibilityAttributeValue:@"AXPreviousSentenceStartTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(previousParagraphStartMarker); > END_AX_OBJC_EXCEPTIONS > >@@ -2036,7 +2036,7 @@ RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousSentenceStartTex > RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker(AccessibilityTextMarker* textMarker) > { > BEGIN_AX_OBJC_EXCEPTIONS >- id nextParagraphEndMarker = [m_element accessibilityAttributeValue:@"AXNextSentenceEndTextMarkerForTextMarker" forParameter:(id)textMarker->platformTextMarker()]; >+ id nextParagraphEndMarker = [m_element accessibilityAttributeValue:@"AXNextSentenceEndTextMarkerForTextMarker" forParameter:(__bridge id)textMarker->platformTextMarker()]; > return AccessibilityTextMarker::create(nextParagraphEndMarker); > END_AX_OBJC_EXCEPTIONS > >diff --git a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >index 83da36654062a24cb94321057e6ad6e767658309..333a9e949dbdf960112d02a5e84fa3eeec36556e 100644 >--- a/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >+++ b/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm >@@ -61,8 +61,8 @@ void initializeWebViewConfiguration(const char* libraryPath, WKStringRef injecte > [globalWebViewConfiguration release]; > globalWebViewConfiguration = [[WKWebViewConfiguration alloc] init]; > >- globalWebViewConfiguration.processPool = (WKProcessPool *)context; >- globalWebViewConfiguration.websiteDataStore = (WKWebsiteDataStore *)WKContextGetWebsiteDataStore(context); >+ globalWebViewConfiguration.processPool = (__bridge WKProcessPool *)context; >+ globalWebViewConfiguration.websiteDataStore = (__bridge WKWebsiteDataStore *)WKContextGetWebsiteDataStore(context); > globalWebViewConfiguration._allowUniversalAccessFromFileURLs = YES; > globalWebViewConfiguration._applePayEnabled = YES; > >@@ -71,7 +71,7 @@ void initializeWebViewConfiguration(const char* libraryPath, WKStringRef injecte > WKCookieManagerSetStorageAccessAPIEnabled(WKContextGetCookieManager(context), true); > #endif > >- WKWebsiteDataStore* poolWebsiteDataStore = (WKWebsiteDataStore *)WKContextGetWebsiteDataStore((WKContextRef)globalWebViewConfiguration.processPool); >+ WKWebsiteDataStore* poolWebsiteDataStore = (__bridge WKWebsiteDataStore *)WKContextGetWebsiteDataStore((__bridge WKContextRef)globalWebViewConfiguration.processPool); > [poolWebsiteDataStore _setCacheStoragePerOriginQuota: 400 * 1024]; > if (libraryPath) { > String cacheStorageDirectory = String(libraryPath) + '/' + "CacheStorage"; >@@ -113,7 +113,7 @@ void TestController::cocoaPlatformInitialize() > WKContextRef TestController::platformContext() > { > #if WK_API_ENABLED >- return (WKContextRef)globalWebViewConfiguration.processPool; >+ return (__bridge WKContextRef)globalWebViewConfiguration.processPool; > #else > return nullptr; > #endif >@@ -122,7 +122,7 @@ WKContextRef TestController::platformContext() > WKPreferencesRef TestController::platformPreferences() > { > #if WK_API_ENABLED >- return (WKPreferencesRef)globalWebViewConfiguration.preferences; >+ return (__bridge WKPreferencesRef)globalWebViewConfiguration.preferences; > #else > return nullptr; > #endif >@@ -174,7 +174,7 @@ WKContextRef TestController::platformAdjustContext(WKContextRef context, WKConte > { > #if WK_API_ENABLED > initializeWebViewConfiguration(libraryPathForTesting(), injectedBundlePath(), context, contextConfiguration); >- return (WKContextRef)globalWebViewConfiguration.processPool; >+ return (__bridge WKContextRef)globalWebViewConfiguration.processPool; > #else > return nullptr; > #endif >diff --git a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm >index 4becc6934f19f5e56977e91c02578483fa1790ce..115cf0395a335559a10f98a32966dbeeb182db79 100644 >--- a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm >+++ b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm >@@ -138,7 +138,7 @@ PlatformWebView::PlatformWebView(WKWebViewConfiguration* configuration, const Te > [[NSUserDefaults standardUserDefaults] setValue:@YES forKey:@"WebKit2UseRemoteLayerTreeDrawingArea"]; > > RetainPtr<WKWebViewConfiguration> copiedConfiguration = adoptNS([configuration copy]); >- WKPreferencesSetThreadedScrollingEnabled((WKPreferencesRef)[copiedConfiguration preferences], m_options.useThreadedScrolling); >+ WKPreferencesSetThreadedScrollingEnabled((__bridge WKPreferencesRef)[copiedConfiguration preferences], m_options.useThreadedScrolling); > > NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight); > m_view = [[TestRunnerWKWebView alloc] initWithFrame:rect configuration:copiedConfiguration.get()]; >diff --git a/Tools/WebKitTestRunner/mac/TestControllerMac.mm b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >index c9209698947c2f6db8bbfcde0e60f7046ee3b9c6..e80094844e671ce2b795e5412f0a6e0772c79174 100644 >--- a/Tools/WebKitTestRunner/mac/TestControllerMac.mm >+++ b/Tools/WebKitTestRunner/mac/TestControllerMac.mm >@@ -90,12 +90,12 @@ void TestController::platformDestroy() > void TestController::initializeInjectedBundlePath() > { > NSString *nsBundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"WebKitTestRunnerInjectedBundle.bundle"]; >- m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath)); >+ m_injectedBundlePath.adopt(WKStringCreateWithCFString((__bridge CFStringRef)nsBundlePath)); > } > > void TestController::initializeTestPluginDirectory() > { >- m_testPluginDirectory.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath])); >+ m_testPluginDirectory.adopt(WKStringCreateWithCFString((__bridge CFStringRef)[[NSBundle mainBundle] bundlePath])); > } > > void TestController::platformResetPreferencesToConsistentValues() >@@ -125,7 +125,7 @@ void TestController::platformConfigureViewForTest(const TestInvocation& test) > return; > > RetainPtr<CFURLRef> testURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, test.url())); >- NSURL *filterURL = [(NSURL *)testURL.get() URLByAppendingPathExtension:@"json"]; >+ NSURL *filterURL = [(__bridge NSURL *)testURL.get() URLByAppendingPathExtension:@"json"]; > > NSStringEncoding encoding; > NSString *contentExtensionString = [[NSString alloc] initWithContentsOfURL:filterURL usedEncoding:&encoding error:NULL]; >diff --git a/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm b/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm >index 22fd35f03e8ff5db0795e7a1d29d03848c997846..1f4eed439cbd44e9ae0e07a912dbf30755e65f5b 100644 >--- a/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm >+++ b/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm >@@ -46,7 +46,7 @@ namespace WTR { > > NSString *nsString(JSStringRef string) > { >- return (NSString *)adoptCF(JSStringCopyCFString(kCFAllocatorDefault, string)).autorelease(); >+ return CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, string)); > } > > void UIScriptController::doAsyncTask(JSValueRef callback) >@@ -236,7 +236,7 @@ void UIScriptController::completeBackSwipe(JSValueRef callback) > void UIScriptController::platformPlayBackEventStream(JSStringRef eventStream, JSValueRef callback) > { > RetainPtr<CFStringRef> stream = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, eventStream)); >- playBackEvents(m_context, (NSString *)stream.get(), callback); >+ playBackEvents(m_context, (__bridge NSString *)stream.get(), callback); > } > > void UIScriptController::firstResponderSuppressionForWebView(bool shouldSuppress) >diff --git a/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm b/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm >index 1ea2c843182c308a22d923c6b012c6a1ae0ccbea..565db2f124f8f2c3248e9c321bcc8e9c8ddcb8e2 100644 >--- a/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm >+++ b/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm >@@ -29,6 +29,7 @@ > #import "EventSenderProxy.h" > #import "PlatformWebView.h" > #import "TestController.h" >+#import "TestRunnerWKWebView.h" > > using namespace WTR; > >diff --git a/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm b/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm >index 63df1a3c6bb1ab15a5edec2f68ce600168c4527e..a26180e01f411850699d1fcba11ac9d65663c35f 100644 >--- a/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm >+++ b/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm >@@ -189,8 +189,8 @@ - (BOOL)setPropertyList:(id)propertyList forType:(NSString *)dataType > { > CFDataRef data = 0; > if (propertyList) >- data = CFPropertyListCreateXMLData(0, propertyList); >- BOOL result = [self setData:(NSData *)data forType:dataType]; >+ data = CFPropertyListCreateXMLData(0, (__bridge CFTypeRef)propertyList); >+ BOOL result = [self setData:(__bridge NSData *)data forType:dataType]; > if (data) > CFRelease(data); > return result; >@@ -205,7 +205,7 @@ - (BOOL)setString:(NSString *)string forType:(NSString *)dataType > else > data = CFStringCreateExternalRepresentation(0, (CFStringRef)string, kCFStringEncodingUTF8, 0); > } >- BOOL result = [self setData:(NSData *)data forType:dataType]; >+ BOOL result = [self setData:(__bridge NSData *)data forType:dataType]; > if (data) > CFRelease(data); > return result; >diff --git a/Tools/WebKitTestRunner/mac/main.mm b/Tools/WebKitTestRunner/mac/main.mm >index 6637db2d787165653dd1a4a98dfd498b296e7259..6b35b962ff4d389ba60d1b51333682ef2916625f 100644 >--- a/Tools/WebKitTestRunner/mac/main.mm >+++ b/Tools/WebKitTestRunner/mac/main.mm >@@ -57,15 +57,12 @@ static void disableAppNapInUIProcess() > > int main(int argc, const char* argv[]) > { >- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >- [NSApplication sharedApplication]; >- setDefaultsToConsistentValuesForTesting(); >- disableAppNapInUIProcess(); // For secondary processes, app nap is disabled using WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(). >- >- { >+ @autoreleasepool { >+ [NSApplication sharedApplication]; >+ setDefaultsToConsistentValuesForTesting(); >+ disableAppNapInUIProcess(); // For secondary processes, app nap is disabled using WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(). > WTR::TestController controller(argc, argv); > } >- [pool drain]; > return 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186227
:
341838
|
341841