WebKit Bugzilla
Attachment 358140 Details for
Bug 193056
: Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v2
bug-193056-20181229134031.patch (text/plain), 77.49 KB, created by
David Kilzer (:ddkilzer)
on 2018-12-29 13:40:32 PST
(
hide
)
Description:
Patch v2
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-12-29 13:40:32 PST
Size:
77.49 KB
patch
obsolete
>Subversion Revision: 239558 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 4803c26e9159ac9375aca59941896e0b22331842..ea831ab2e11a541113b97834a43334267ecf0f01 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,30 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >+ <https://webkit.org/b/193056> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/RetainPtr.h: >+ (WTF::RetainPtr<T>::HelperPtrType): >+ - Use C++ template metaprogramming to define a shared return >+ type for adoptNS() and retainPtr() that uses >+ RetainPtr<NSObject> instead of RetainPtr<NSObject *>. The >+ non-Objective-C typedef is used with retainPtr() for CFTypeRef >+ objects. >+ (WTF::adoptNS): >+ - Only make declarations available when compilng with >+ Objective-C. The inline implementation is only available for >+ Objective-C, so this makes the declarations consistent. >+ - Change return type to remove '*' from NS types using >+ RetainPtr<T>::HelperPtrType. >+ (WTF::retainPtr): >+ - Change return type to remove '*' from NS types using >+ RetainPtr<T>::HelperPtrType. >+ >+ * wtf/SchedulePair.h: >+ - Remove '*' from RetainPtr<> type. >+ > 2018-12-27 Alex Christensen <achristensen@webkit.org> > > Resurrect Mac CMake build >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07c098758ecf84eee9926d3c5de1fc84707190f6..f828e8d6e3d9941fe60a30a85a5c98c37803d783 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >+ <https://webkit.org/b/193056> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: >+ (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): >+ (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): >+ * platform/network/cf/AuthenticationChallenge.h: >+ - Remove '*' from RetainPtr<> type. >+ >+ * platform/network/cocoa/NetworkStorageSessionCocoa.mm: >+ (WebCore::cookiesForURL): >+ - Once retainPtr() was changed to return RetainPtr<NSArray> >+ instead of RetainPtr<NSArray *> here, that forced the type of >+ `cookiesPtr` to change as well since >+ Optional<RetainPtr<NSArray>> is not assignable to >+ Optional<RetainPtr<NSArray *>> without further template >+ specialization, which didn't seem useful since >+ Optional<RetainPtr<>> variable types are rarely used. >+ > 2018-12-28 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [JSC] Remove one indirection in JSObject::toStringName >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 33e8fdb18ff47187a54c50ba1b6f0fcc162bfcd0..ccde476c5c23f7330272b0b1576105241803c165 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >+ <https://webkit.org/b/193056> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: >+ (WebKit::XPCServiceMain): >+ * UIProcess/API/Cocoa/_WKThumbnailView.mm: >+ * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: >+ * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: >+ * UIProcess/Plugins/PluginProcessProxy.h: >+ * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm: >+ (WebKit::RemoteLayerTreeHost::createEmbeddedView): >+ * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm: >+ (WebKit::PlatformCALayerRemoteCustom::clone const): >+ - Remove '*' from RetainPtr<> type. >+ > 2018-12-28 Wenson Hsieh <wenson_hsieh@apple.com> > > Move WKEditCommandObjC and WKEditorUndoTargetObjC into a separate file >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 441bb0930ed9d9b6f60860a73543105936f85eee..02a4c67cc9c4c7ce86a12c1b833ba6cf7af6b303 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,27 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >+ <https://webkit.org/b/193056> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Plugins/Hosted/NetscapePluginHostProxy.h: >+ * Plugins/Hosted/NetscapePluginInstanceProxy.h: >+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: >+ (WebKit::NetscapePluginInstanceProxy::enumerate): >+ (WebKit::NetscapePluginInstanceProxy::marshalValue): >+ (WebKit::NetscapePluginInstanceProxy::marshalValues): >+ (WebKit::NetscapePluginInstanceProxy::demarshalValue): >+ (WebKit::NetscapePluginInstanceProxy::demarshalValues): >+ * Plugins/Hosted/ProxyInstance.mm: >+ (WebKit::ProxyInstance::invoke): >+ * WebCoreSupport/WebGeolocationClient.mm: >+ * WebView/WebDataSource.mm: >+ (-[WebDataSource _receivedData:]): >+ * WebView/WebView.mm: >+ (-[WebView _cachedResponseForURL:]): >+ - Remove '*' from RetainPtr<> type. >+ > 2018-12-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Use Ref<> as much as possible >diff --git a/Source/WTF/wtf/RetainPtr.h b/Source/WTF/wtf/RetainPtr.h >index aa96dea1ac967031c8084a2be11a76bd717a9675..e0eba2de9dbde22ee11ca94fd09112b5466f8d53 100644 >--- a/Source/WTF/wtf/RetainPtr.h >+++ b/Source/WTF/wtf/RetainPtr.h >@@ -56,7 +56,9 @@ namespace WTF { > template<typename T> class RetainPtr; > > template<typename T> RetainPtr<T> adoptCF(T CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >-template<typename T> RetainPtr<T> adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >+#ifdef __OBJC__ >+template<typename T> RetainPtr<typename RetainPtr<T>::HelperPtrType> adoptNS(T NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >+#endif > > template<typename T> class RetainPtr { > public: >@@ -64,6 +66,12 @@ public: > typedef ValueType* PtrType; > typedef CFTypeRef StorageType; > >+#ifdef __OBJC__ >+ typedef typename std::conditional<std::is_convertible<T, id>::value && !std::is_same<T, id>::value, typename std::remove_pointer<T>::type, T>::type HelperPtrType; >+#else >+ typedef T HelperPtrType; >+#endif >+ > RetainPtr() : m_ptr(nullptr) { } > RetainPtr(PtrType ptr) : m_ptr(toStorageType(ptr)) { if (m_ptr) CFRetain(m_ptr); } > >@@ -109,7 +117,9 @@ public: > void swap(RetainPtr&); > > template<typename U> friend RetainPtr<U> adoptCF(U CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >- template<typename U> friend RetainPtr<U> adoptNS(U NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >+#ifdef __OBJC__ >+ template<typename U> friend RetainPtr<typename RetainPtr<U>::HelperPtrType> adoptNS(U NS_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; >+#endif > > private: > enum AdoptTag { Adopt }; >@@ -152,7 +162,7 @@ private: > }; > > // Helper function for creating a RetainPtr using template argument deduction. >-template<typename T> RetainPtr<T> retainPtr(T) WARN_UNUSED_RETURN; >+template<typename T> RetainPtr<typename RetainPtr<T>::HelperPtrType> retainPtr(T) WARN_UNUSED_RETURN; > > template<typename T> inline RetainPtr<T>::~RetainPtr() > { >@@ -306,21 +316,21 @@ template<typename T> inline RetainPtr<T> adoptCF(T CF_RELEASES_ARGUMENT ptr) > } > > #ifdef __OBJC__ >-template<typename T> inline RetainPtr<T> adoptNS(T NS_RELEASES_ARGUMENT ptr) >+template<typename T> inline RetainPtr<typename RetainPtr<T>::HelperPtrType> adoptNS(T NS_RELEASES_ARGUMENT ptr) > { > #if __has_feature(objc_arc) > return ptr; > #elif defined(OBJC_NO_GC) >- return RetainPtr<T>(ptr, RetainPtr<T>::Adopt); >+ return RetainPtr<typename RetainPtr<T>::HelperPtrType>(ptr, RetainPtr<typename RetainPtr<T>::HelperPtrType>::Adopt); > #else >- RetainPtr<T> result = ptr; >+ RetainPtr<typename RetainPtr<T>::HelperPtrType> result = ptr; > [ptr release]; > return result; > #endif > } > #endif > >-template<typename T> inline RetainPtr<T> retainPtr(T ptr) >+template<typename T> inline RetainPtr<typename RetainPtr<T>::HelperPtrType> retainPtr(T ptr) > { > return ptr; > } >@@ -373,10 +383,10 @@ template<typename T> T* dynamic_objc_cast(id object) > > using WTF::RetainPtr; > using WTF::adoptCF; >-using WTF::adoptNS; > using WTF::retainPtr; > > #ifdef __OBJC__ >+using WTF::adoptNS; > using WTF::dynamic_objc_cast; > #endif > >diff --git a/Source/WTF/wtf/SchedulePair.h b/Source/WTF/wtf/SchedulePair.h >index c41bcbbc5134cf9128b4ac44645eaf77a4878d1a..a36e00c42b463ecfb7d88718fb0193754646ba65 100644 >--- a/Source/WTF/wtf/SchedulePair.h >+++ b/Source/WTF/wtf/SchedulePair.h >@@ -63,7 +63,7 @@ private: > > #if PLATFORM(COCOA) > WTF_EXPORT_PRIVATE SchedulePair(NSRunLoop*, CFStringRef); >- RetainPtr<NSRunLoop*> m_nsRunLoop; >+ RetainPtr<NSRunLoop> m_nsRunLoop; > #endif > > RetainPtr<CFRunLoopRef> m_runLoop; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >index 0ecf755103cc20d06e4347908f60d6ee8f6dddda..c4717ce9b7dec72b3cd18721fb37263a6be70964 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >@@ -143,7 +143,7 @@ - (void)streamDataParser:(AVStreamDataParser *)streamDataParser didParseStreamDa > { > ASSERT_UNUSED(streamDataParser, streamDataParser == _parser); > >- RetainPtr<AVAsset*> protectedAsset = asset; >+ RetainPtr<AVAsset> protectedAsset = asset; > callOnMainThread([parent = _parent, protectedAsset = WTFMove(protectedAsset)] { > if (parent) > parent->didParseStreamDataAsAsset(protectedAsset.get()); >@@ -155,7 +155,7 @@ - (void)streamDataParser:(AVStreamDataParser *)streamDataParser didParseStreamDa > UNUSED_PARAM(discontinuity); > ASSERT_UNUSED(streamDataParser, streamDataParser == _parser); > >- RetainPtr<AVAsset*> protectedAsset = asset; >+ RetainPtr<AVAsset> protectedAsset = asset; > callOnMainThread([parent = _parent, protectedAsset = WTFMove(protectedAsset)] { > if (parent) > parent->didParseStreamDataAsAsset(protectedAsset.get()); >diff --git a/Source/WebCore/platform/network/cf/AuthenticationChallenge.h b/Source/WebCore/platform/network/cf/AuthenticationChallenge.h >index 157b852b60875e70af9165baa82b5696f3714128..3f648e06040b53ab78f6eaada02354afcf98c470 100644 >--- a/Source/WebCore/platform/network/cf/AuthenticationChallenge.h >+++ b/Source/WebCore/platform/network/cf/AuthenticationChallenge.h >@@ -73,7 +73,7 @@ private: > RetainPtr<CFURLAuthChallengeRef> m_cfChallenge; > #else > RetainPtr<id> m_sender; >- RetainPtr<NSURLAuthenticationChallenge *> m_nsChallenge; >+ RetainPtr<NSURLAuthenticationChallenge> m_nsChallenge; > #endif > }; > >diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >index b579973279c6184d322e7bcc910b65ad9dc3398e..465f1613634ce6375d524f3969cef39664583b32 100644 >--- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >+++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >@@ -202,7 +202,7 @@ static RetainPtr<NSDictionary> policyProperties(const SameSiteInfo& sameSiteInfo > static NSArray *cookiesForURL(NSHTTPCookieStorage *storage, NSURL *url, NSURL *mainDocumentURL, const Optional<SameSiteInfo>& sameSiteInfo, NSString *partition = nullptr) > { > // The _getCookiesForURL: method calls the completionHandler synchronously. We use Optional<> to ensure this invariant. >- Optional<RetainPtr<NSArray *>> cookiesPtr; >+ Optional<RetainPtr<NSArray>> cookiesPtr; > auto completionHandler = [&cookiesPtr] (NSArray *cookies) { > cookiesPtr = retainPtr(cookies); > }; >diff --git a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >index 9fa05fcabf12d9c9e8b145b822bdd8a9b9688154..a43fd908e753ea0fa17b3511526dfcc7fa0df2f2 100644 >--- a/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >+++ b/Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >@@ -130,7 +130,7 @@ int XPCServiceMain(int, const char**) > @autoreleasepool { > NSDictionary *existingArguments = [[NSUserDefaults standardUserDefaults] volatileDomainForName:NSArgumentDomain]; > NSMutableDictionary *newArguments = [existingArguments mutableCopy]; >- RetainPtr<NSMutableArray *> newLanguages = adoptNS([[NSMutableArray alloc] init]); >+ RetainPtr<NSMutableArray> newLanguages = adoptNS([[NSMutableArray alloc] init]); > xpc_array_apply(languages, ^(size_t index, xpc_object_t value) { > [newLanguages addObject:[NSString stringWithCString:xpc_string_get_string_ptr(value) encoding:NSUTF8StringEncoding]]; > return true; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm b/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >index c9bb1b5fa547542c3c46c9c3b95468c6f5bab9e1..d685db9d168e55a857135ae3123c721856323826 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm >@@ -57,7 +57,7 @@ @implementation _WKThumbnailView { > CGFloat _lastSnapshotScale; > CGSize _lastSnapshotMaximumSize; > >- RetainPtr<NSColor *> _overrideBackgroundColor; >+ RetainPtr<NSColor> _overrideBackgroundColor; > } > > @synthesize snapshotSize=_snapshotSize; >diff --git a/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h b/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h >index 1b16e9f9fc7ab0c644b9e152b1ae598916f76e7b..745c8ebacfd3a2f612af59344811a1b924c8a159 100644 >--- a/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h >+++ b/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h >@@ -151,7 +151,7 @@ private: > #if PLATFORM(MAC) > uint64_t m_showPaymentUIRequestSeed { 0 }; > RetainPtr<NSWindow> m_sheetWindow; >- RetainPtr<NSObject *> m_sheetWindowWillCloseObserver; >+ RetainPtr<NSObject> m_sheetWindowWillCloseObserver; > #endif > > #if defined(WEBPAYMENTCOORDINATORPROXY_ADDITIONS) >diff --git a/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h b/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h >index 297f968b3529e0c355cd4db1a899c20e8cc9024d..3e268ce6268862dfc91718c0eb14479fafd74c74 100644 >--- a/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h >+++ b/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h >@@ -111,7 +111,7 @@ private: > VideoFullscreenManagerProxy* m_manager; > Ref<PlaybackSessionModelContext> m_playbackSessionModel; > uint64_t m_contextId; >- RetainPtr<PlatformView *> m_layerHostView; >+ RetainPtr<PlatformView> m_layerHostView; > HashSet<WebCore::VideoFullscreenModelClient*> m_clients; > WebCore::FloatSize m_videoDimensions; > bool m_hasVideo { false }; >diff --git a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >index c7e94a8d47f830d6ce04eec45c95db5030203a99..6099967bdf70290e0e8b85bc73a854483aecfcfd 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >+++ b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >@@ -173,7 +173,7 @@ private: > > #if PLATFORM(COCOA) > RetainPtr<NSObject> m_activationObserver; >- RetainPtr<WKPlaceholderModalWindow *> m_placeholderWindow; >+ RetainPtr<WKPlaceholderModalWindow> m_placeholderWindow; > bool m_modalWindowIsShowing; > bool m_fullscreenWindowIsShowing; > unsigned m_preFullscreenAppPresentationOptions; >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >index 3d58acf27362508f271d6ca6be3329064da39ce6..c1fca2b8c5884af7c8f7b8cb354bdeb0caaf5279 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm >@@ -128,7 +128,7 @@ RetainPtr<WKEmbeddedView> RemoteLayerTreeHost::createEmbeddedView(const RemoteLa > if (m_isDebugLayerTreeHost) > return adoptNS([[UIView alloc] init]); > >- auto result = m_embeddedViews.ensure(properties.embeddedViewID, [&]() -> RetainPtr<UIView *> { >+ auto result = m_embeddedViews.ensure(properties.embeddedViewID, [&]() -> RetainPtr<UIView> { > switch (properties.type) { > #if HAVE(PENCILKIT) > case PlatformCALayer::LayerTypeEditableImageLayer: { >diff --git a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >index 4ce2070edbc3488d5c9af9121b4fbba7c1635b69..583614a0d04c6ede1ae98c5b16f63a3118e93101 100644 >--- a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >+++ b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm >@@ -100,7 +100,7 @@ uint32_t PlatformCALayerRemoteCustom::hostingContextID() > > Ref<WebCore::PlatformCALayer> PlatformCALayerRemoteCustom::clone(PlatformCALayerClient* owner) const > { >- RetainPtr<CALayer *> clonedLayer; >+ RetainPtr<CALayer> clonedLayer; > bool copyContents = true; > > if (layerType() == LayerTypeAVPlayerLayer) { >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.h b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.h >index 742d4c4c7fa9d1b7d208c05e4d1f2278da4e3e33..8d0ba6fd50a14664f4e7bc1c55eb77dc9f98492f 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.h >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.h >@@ -92,7 +92,7 @@ private: > RetainPtr<CFMachPortRef> m_deadNameNotificationPort; > > RetainPtr<id> m_activationObserver; >- RetainPtr<WebPlaceholderModalWindow *> m_placeholderWindow; >+ RetainPtr<WebPlaceholderModalWindow> m_placeholderWindow; > unsigned m_isModal; > bool m_menuBarIsVisible; > bool m_fullscreenWindowIsShowing; >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h >index 65205fc4c7d6d1e687a8abea5447a7f6f97d4100..10a08e950a3dc0c93671f1fc1c74c947793a07e8 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h >@@ -143,7 +143,7 @@ public: > double& destX, double& destY, NPCoordinateSpace destSpace); > > RefPtr<JSC::Bindings::Instance> createBindingsInstance(Ref<JSC::Bindings::RootObject>&&); >- RetainPtr<NSData *> marshalValues(JSC::ExecState*, const JSC::ArgList& args); >+ RetainPtr<NSData> marshalValues(JSC::ExecState*, const JSC::ArgList& args); > void marshalValue(JSC::ExecState*, JSC::JSValue, data_t& resultData, mach_msg_type_number_t& resultLength); > JSC::JSValue demarshalValue(JSC::ExecState*, const char* valueData, mach_msg_type_number_t valueLength); > >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >index c6928411ebe9834e3d8d643c1c1ff641c3545430..91c605e48ddcb23db45d3b5c65d59fbd83f4e930 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >@@ -101,8 +101,8 @@ private: > } > > uint32_t m_requestID; >- RetainPtr<NSURLRequest*> m_request; >- RetainPtr<NSString*> m_frameName; >+ RetainPtr<NSURLRequest> m_request; >+ RetainPtr<NSString> m_frameName; > bool m_allowPopups; > }; > >@@ -1277,7 +1277,7 @@ bool NetscapePluginInstanceProxy::enumerate(uint32_t objectID, data_t& resultDat > PropertyNameArray propertyNames(&vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); > object->methodTable(vm)->getPropertyNames(object, exec, propertyNames, EnumerationMode()); > >- RetainPtr<NSMutableArray*> array = adoptNS([[NSMutableArray alloc] init]); >+ RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] init]); > for (unsigned i = 0; i < propertyNames.size(); i++) { > uint64_t methodName = reinterpret_cast<uint64_t>(_NPN_GetStringIdentifier(propertyNames[i].string().utf8().data())); > >@@ -1346,7 +1346,7 @@ void NetscapePluginInstanceProxy::addValueToArray(NSMutableArray *array, ExecSta > > void NetscapePluginInstanceProxy::marshalValue(ExecState* exec, JSValue value, data_t& resultData, mach_msg_type_number_t& resultLength) > { >- RetainPtr<NSMutableArray*> array = adoptNS([[NSMutableArray alloc] init]); >+ RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] init]); > > addValueToArray(array.get(), exec, value); > >@@ -1359,9 +1359,9 @@ void NetscapePluginInstanceProxy::marshalValue(ExecState* exec, JSValue value, d > memcpy(resultData, data.bytes, resultLength); > } > >-RetainPtr<NSData *> NetscapePluginInstanceProxy::marshalValues(ExecState* exec, const ArgList& args) >+RetainPtr<NSData> NetscapePluginInstanceProxy::marshalValues(ExecState* exec, const ArgList& args) > { >- RetainPtr<NSMutableArray*> array = adoptNS([[NSMutableArray alloc] init]); >+ RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] init]); > > for (unsigned i = 0; i < args.size(); i++) > addValueToArray(array.get(), exec, args.at(i)); >@@ -1426,7 +1426,7 @@ bool NetscapePluginInstanceProxy::demarshalValueFromArray(ExecState* exec, NSArr > > JSValue NetscapePluginInstanceProxy::demarshalValue(ExecState* exec, const char* valueData, mach_msg_type_number_t valueLength) > { >- RetainPtr<NSData*> data = adoptNS([[NSData alloc] initWithBytesNoCopy:(void*)valueData length:valueLength freeWhenDone:NO]); >+ RetainPtr<NSData> data = adoptNS([[NSData alloc] initWithBytesNoCopy:(void*)valueData length:valueLength freeWhenDone:NO]); > > NSArray *array = [NSPropertyListSerialization propertyListWithData:data.get() options:NSPropertyListImmutable format:nullptr error:nullptr]; > >@@ -1440,7 +1440,7 @@ JSValue NetscapePluginInstanceProxy::demarshalValue(ExecState* exec, const char* > > void NetscapePluginInstanceProxy::demarshalValues(ExecState* exec, data_t valuesData, mach_msg_type_number_t valuesLength, MarkedArgumentBuffer& result) > { >- RetainPtr<NSData*> data = adoptNS([[NSData alloc] initWithBytesNoCopy:valuesData length:valuesLength freeWhenDone:NO]); >+ RetainPtr<NSData> data = adoptNS([[NSData alloc] initWithBytesNoCopy:valuesData length:valuesLength freeWhenDone:NO]); > > NSArray *array = [NSPropertyListSerialization propertyListWithData:data.get() options:NSPropertyListImmutable format:nullptr error:nullptr]; > >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >index fe508860ec7979dd6d006510a58d80ed6e4cc169..202c6deaf13d07c6e3a5698b1cdb59a19b5da039 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/ProxyInstance.mm >@@ -146,7 +146,7 @@ JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id > if (!m_instanceProxy) > return jsUndefined(); > >- RetainPtr<NSData*> arguments(m_instanceProxy->marshalValues(exec, args)); >+ RetainPtr<NSData> arguments(m_instanceProxy->marshalValues(exec, args)); > > uint32_t requestID = m_instanceProxy->nextRequestID(); > >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm >index cb083bfc120cc69ab286ae284417538d2ab2c472..2cf715e2d90dfe7668488bc17451b13edb2e30f8 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebGeolocationClient.mm >@@ -56,7 +56,7 @@ @end > @interface WebGeolocationPolicyListener : NSObject <WebAllowDenyPolicyListener> > { > RefPtr<Geolocation> _geolocation; >- RetainPtr<WebView *> _webView; >+ RetainPtr<WebView> _webView; > } > - (id)initWithGeolocation:(Geolocation*)geolocation forWebView:(WebView*)webView; > @end >diff --git a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm >index 645b1b24aa26b01668b8f152db7b13c57238f6fe..51802cc180dc65a1a530ffef7764f78b40a2dd16 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebDataSource.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebDataSource.mm >@@ -246,7 +246,7 @@ - (void)_finishedLoading > - (void)_receivedData:(NSData *)data > { > // protect self temporarily, as the bridge receivedData call could remove our last ref >- RetainPtr<WebDataSource*> protect(self); >+ RetainPtr<WebDataSource> protect(self); > > [[self representation] receivedData:data withDataSource:self]; > [[[[self webFrame] frameView] documentView] dataSourceUpdated:self]; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 4b661278470d3a4bc8e6ee55b1cd3350040f6e9d..f247b03012af8353bfc79ec220649fc5a959f110 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -3661,7 +3661,7 @@ - (void)_didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)f > > - (NSCachedURLResponse *)_cachedResponseForURL:(NSURL *)URL > { >- RetainPtr<NSMutableURLRequest *> request = adoptNS([[NSMutableURLRequest alloc] initWithURL:URL]); >+ RetainPtr<NSMutableURLRequest> request = adoptNS([[NSMutableURLRequest alloc] initWithURL:URL]); > [request _web_setHTTPUserAgent:[self userAgentForURL:URL]]; > NSCachedURLResponse *cachedResponse; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 2842d800182ad71f6aa1308e45e47a6cb82481e3..06c5efa99b0571fb5d1ca204db45c4cb5ab24342 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,81 @@ >+2018-12-29 David Kilzer <ddkilzer@apple.com> >+ >+ Prefer RetainPtr<NSObject> to RetainPtr<NSObject *> >+ <https://webkit.org/b/193056> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/style/checker.py: >+ - Ignore use of new runtime/retainptr check in >+ Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm since it >+ contains tests to ensure RetainPtr<NSObject *> is compatible >+ with RetainPtr<NSObject>. >+ >+ * Scripts/webkitpy/style/checkers/cpp.py: >+ (check_language): >+ (CppChecker): >+ - Add checker for use of '*' in RetainPtr<> type. A for loop >+ was used instead of a single regex so that angle brackets >+ could be matched up when checking the type contained within >+ the RetainPtr<> type. >+ >+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: >+ (CppStyleTest): >+ - Add unit test for new runtime/retainptr check. >+ >+ * TestRunnerShared/EventSerialization/mac/EventSerializerMac.h: >+ * TestWebKitAPI/EditingTestHarness.h: >+ - Remove '*' from RetainPtr<> type. >+ >+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: >+ - Add cf/RetainPtr.cpp back to TestWTFLibrary target! This >+ regressed in r201938. >+ >+ * TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp: >+ (TestWebKitAPI::TEST): >+ - Update tests to match RetainPtr.mm tests (except for the >+ `*SimilarNSType` tests since there is no CF equivalent of >+ RetainPtr<NSString> and RetainPtr<NSString *>). >+ >+ * TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: >+ (TestWebKitAPI::TEST): >+ - Update tests to: >+ - Not conflict by name with equivalent CF tests in >+ RetainPtr.cpp. >+ - Add test cases for RetainPtr<NSObject>, >+ RetainPtr<NSObject *> and RetainPtr<id> were appropriate. >+ - Add `*SimilarNSType` tests for converting between >+ RetainPtr<NSObject> and RetainPtr<NSObject *>. >+ - Change `0` to `nil` as appropriate. >+ - Re-alphabetize the tests by name. >+ - Add Optional<RetainPtr<>> tests. >+ - Add retainPtr() tests. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm: >+ (-[DownloadProgressTestRunner _download:decideDestinationWithSuggestedFilename:completionHandler:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm: >+ (TEST): >+ - Remove '*' from RetainPtr<> type. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm: >+ (TEST(WebKit, JITEnabled)): >+ - Add missing WTFMove(). Apparently a temporary was being >+ created before in the argument list due to mismatched >+ RetainPtr<> types. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: >+ * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm: >+ (TestWebKitAPI::setUpWebViewForTestingVideoControlsManager): >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: >+ * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: >+ * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: >+ (WTR::resourcesDirectoryURL): >+ * WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm: >+ (WTR::InjectedBundle::platformInitialize): >+ * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: >+ - Remove '*' from RetainPtr<> type. >+ > 2018-12-27 Alex Christensen <achristensen@webkit.org> > > Resurrect Mac CMake build >diff --git a/Tools/Scripts/webkitpy/style/checker.py b/Tools/Scripts/webkitpy/style/checker.py >index 17424934e187fd7dc3118bf2c41d6df6cf2f960a..f3076501e58cb34c68bb80ebbdf5a5f2ae10e114 100644 >--- a/Tools/Scripts/webkitpy/style/checker.py >+++ b/Tools/Scripts/webkitpy/style/checker.py >@@ -142,6 +142,9 @@ _PATH_RULES_SPECIFIER = [ > os.path.join('Tools', 'DumpRenderTree', 'TestNetscapePlugIn')], > ["-build/include", > "-readability/naming"]), >+ ([ # Ignore use of RetainPtr<NSObject *> for tests that ensure its compatibility with ReteainPtr<NSObject>. >+ os.path.join('Tools', 'TestWebKitAPI', 'Tests', 'WTF', 'ns', 'RetainPtr.mm')], >+ ["-runtime/retainptr"]), > ([ # There is no clean way to avoid "yy_*" names used by flex. > os.path.join('Source', 'WebCore', 'css', 'CSSParser.cpp'), > # TestWebKitAPI uses funny macros like EXPECT_WK_STREQ. >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py >index 8cd2c052682e3ce37d4270e8019dfbd64773ec1c..ced973f82eed9784496bc255d48f221c9259a519 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py >@@ -3313,6 +3313,25 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s > error(line_number, 'runtime/dispatch_set_target_queue', 5, > 'Never use dispatch_set_target_queue. Use dispatch_queue_create_with_target instead.') > >+ matched = search(r'\b(RetainPtr<.*)', line) >+ if matched: >+ match_line = matched.group(1) >+ nested_angle_bracket_count = 1 >+ previous_closing_angle_bracket_index = -1 >+ closing_angle_bracket_index = 9 # Used if only one pair of angle brackets. >+ for i in xrange(10, len(match_line) - 1): >+ if match_line[i] == '<': >+ nested_angle_bracket_count += 1 >+ if match_line[i] == '>': >+ nested_angle_bracket_count -= 1 >+ previous_closing_angle_bracket_index = closing_angle_bracket_index >+ closing_angle_bracket_index = i >+ if nested_angle_bracket_count == 0: >+ if "*" in match_line[previous_closing_angle_bracket_index:closing_angle_bracket_index]: >+ error(line_number, 'runtime/retainptr', 5, >+ 'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.') >+ break >+ > # Check for suspicious usage of "if" like > # } if (a == b) { > if search(r'\}\s*if\s*\(', line): >@@ -4052,6 +4071,7 @@ class CppChecker(object): > 'runtime/printf', > 'runtime/printf_format', > 'runtime/references', >+ 'runtime/retainptr', > 'runtime/rtti', > 'runtime/sizeof', > 'runtime/soft-linked-alloc', >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >index 318d1c3e7ad18d214d9e50202d309b20f39cde29..d6ad3b23d53ddbc70da576d405d133f26f829d82 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >@@ -1667,6 +1667,27 @@ class CppStyleTest(CppStyleTestBase): > ' [runtime/dispatch_set_target_queue] [5]') > self.assert_lint('globalQueue = dispatch_queue_create_with_target("My Serial Queue", DISPATCH_QUEUE_SERIAL, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0));', '') > >+ def test_retainptr_pointer(self): >+ self.assert_lint( >+ '''RetainPtr<CFRunLoopRef*> m_cfRunLoop;''', >+ 'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.' >+ ' [runtime/retainptr] [5]') >+ self.assert_lint('RetainPtr<CFRunLoopRef> m_cfRunLoop;', '') >+ self.assert_lint( >+ '''RetainPtr<NSRunLoop*> m_nsRunLoop;''', >+ 'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.' >+ ' [runtime/retainptr] [5]') >+ self.assert_lint('RetainPtr<NSRunLoop> m_nsRunLoop;', '') >+ self.assert_lint( >+ '''RetainPtr<NSMutableArray<NSDictionary *> *> m_editorStateHistory;''', >+ 'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.' >+ ' [runtime/retainptr] [5]') >+ self.assert_lint( >+ '''RetainPtr<NSDictionary<NSString *, NSArray<NSString *>> *> dictionary;''', >+ 'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.' >+ ' [runtime/retainptr] [5]') >+ self.assert_lint('''RetainPtr<NSDictionary<NSString *, NSArray<NSString *>>> dictionary;''', '') >+ > # Variable-length arrays are not permitted. > def test_variable_length_array_detection(self): > errmsg = ('Do not use variable-length arrays. Use an appropriately named ' >diff --git a/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.h b/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.h >index 2cd2d55dfb5d9ddfaecc01debcd5569aed1cd7ea..9028f00b8b5736317eeeb0558ea9388da390644a 100644 >--- a/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.h >+++ b/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.h >@@ -38,8 +38,8 @@ > @end > > @interface EventStreamPlayer : NSObject { >- RetainPtr<NSMutableArray *> _remainingEventDictionaries; >- RetainPtr<NSWindow *> _window; >+ RetainPtr<NSMutableArray> _remainingEventDictionaries; >+ RetainPtr<NSWindow> _window; > BlockPtr<void ()> _completionHandler; > uint64_t _startTime; > } >diff --git a/Tools/TestWebKitAPI/EditingTestHarness.h b/Tools/TestWebKitAPI/EditingTestHarness.h >index 33e26c3624721400e90400d8259ea77e1f48455d..29af32161c7530f26eb61ab1733317c1d1d13de7 100644 >--- a/Tools/TestWebKitAPI/EditingTestHarness.h >+++ b/Tools/TestWebKitAPI/EditingTestHarness.h >@@ -31,8 +31,8 @@ > #import <WebKit/WKUIDelegatePrivate.h> > > @interface EditingTestHarness : NSObject<WKUIDelegatePrivate> { >- RetainPtr<NSMutableArray<NSDictionary *> *> _editorStateHistory; >- RetainPtr<TestWKWebView *> _webView; >+ RetainPtr<NSMutableArray<NSDictionary *>> _editorStateHistory; >+ RetainPtr<TestWKWebView> _webView; > } > > - (instancetype)initWithWebView:(TestWKWebView *)webView; >diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >index 2314328fed4ea1119fe35d1a59cf54dcaeee9227..54a89b80c3ef8ecafda11c29ce783b8246b38d1a 100644 >--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >@@ -171,6 +171,7 @@ > 4433A396208044140091ED57 /* SynchronousTimeoutTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4433A395208044130091ED57 /* SynchronousTimeoutTests.mm */; }; > 44817A2F1F0486BF00003810 /* WKRequestActivatedElementInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44817A2E1F0486BF00003810 /* WKRequestActivatedElementInfo.mm */; }; > 448D7E471EA6C55500ECC756 /* EnvironmentUtilitiesTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 448D7E451EA6C55500ECC756 /* EnvironmentUtilitiesTest.cpp */; }; >+ 44AC8BC621D0245A00CAFB34 /* RetainPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC029B161486AD6400817DA9 /* RetainPtr.cpp */; }; > 4612C2B9210A6ACE00B788A6 /* LoadFileThenReload.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4612C2B8210A6ABF00B788A6 /* LoadFileThenReload.mm */; }; > 46397B951DC2C850009A78AE /* DOMNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46397B941DC2C850009A78AE /* DOMNode.mm */; }; > 4647B1261EBA3B850041D7EF /* ProcessDidTerminate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4647B1251EBA3B730041D7EF /* ProcessDidTerminate.cpp */; }; >@@ -3781,6 +3782,7 @@ > 7C83DF151D0A590C00FEBCF3 /* RefCounter.cpp in Sources */, > 7C83DED71D0A590C00FEBCF3 /* RefLogger.cpp in Sources */, > 7C83DF161D0A590C00FEBCF3 /* RefPtr.cpp in Sources */, >+ 44AC8BC621D0245A00CAFB34 /* RetainPtr.cpp in Sources */, > 7C83DF241D0A590C00FEBCF3 /* RetainPtr.mm in Sources */, > 7C83DF051D0A590C00FEBCF3 /* RunLoop.cpp in Sources */, > 7C83DF261D0A590C00FEBCF3 /* SaturatedArithmeticOperations.cpp in Sources */, >diff --git a/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp b/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp >index 0033f3b8bc689b271ed064d478b8b6b675247085..c9cfef19c3b7c5e1680e6b83f239ee68c8a64b71 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2011 Apple Inc. All rights reserved. >+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -29,14 +29,155 @@ > #include "config.h" > > #include <wtf/RetainPtr.h> >+#include <wtf/cf/TypeCastsCF.h> > > namespace TestWebKitAPI { > > TEST(RetainPtr, AdoptCF) > { >- RetainPtr<CFArrayRef> foo = adoptCF(CFArrayCreate(kCFAllocatorDefault, nullptr, 0, nullptr)); >+ RetainPtr<CFArrayRef> array1 = adoptCF(CFArrayCreate(kCFAllocatorDefault, nullptr, 0, nullptr)); >+ EXPECT_EQ(1, CFGetRetainCount(array1.get())); >+ EXPECT_EQ(0, CFArrayGetCount(array1.get())); > >- EXPECT_EQ(1, CFGetRetainCount(foo.get())); >+ RetainPtr<CFTypeRef> array2 = adoptCF(CFArrayCreate(kCFAllocatorDefault, nullptr, 0, nullptr)); >+ EXPECT_EQ(1, CFGetRetainCount(array2.get())); >+ EXPECT_EQ(0, CFArrayGetCount(checked_cf_cast<CFArrayRef>(array2.get()))); >+} >+ >+TEST(RetainPtr, ConstructionFromMutableCFType) >+{ >+ CFMutableStringRef string = CFStringCreateMutableCopy(kCFAllocatorDefault, 4, CFSTR("foo")); >+ >+ // This should invoke RetainPtr's move constructor. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // CFTypeRef that logs -retain and -release calls. >+ RetainPtr<CFStringRef> ptr = RetainPtr<CFMutableStringRef>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ RetainPtr<CFMutableStringRef> temp = string; >+ >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<CFStringRef> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((CFStringRef)nullptr, temp); >+} >+ >+TEST(RetainPtr, ConstructionFromSameCFType) >+{ >+ CFStringRef string = CFSTR("foo"); >+ >+ // This should invoke RetainPtr's move constructor. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // CFTypeRef that logs -retain and -release calls. >+ RetainPtr<CFStringRef> ptr = RetainPtr<CFStringRef>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ RetainPtr<CFStringRef> temp = string; >+ >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<CFStringRef> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((CFStringRef)nullptr, temp); >+} >+ >+TEST(RetainPtr, MoveAssignmentFromMutableCFType) >+{ >+ CFMutableStringRef string = CFStringCreateMutableCopy(kCFAllocatorDefault, 4, CFSTR("foo")); >+ RetainPtr<CFStringRef> ptr; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // CFTypeRef that logs -retain and -release calls. >+ ptr = RetainPtr<CFMutableStringRef>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ ptr = nullptr; >+ RetainPtr<CFMutableStringRef> temp = string; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ ptr = WTFMove(temp); >+ >+ EXPECT_EQ(string, ptr); >+ EXPECT_EQ((CFStringRef)nullptr, temp); >+} >+ >+TEST(RetainPtr, MoveAssignmentFromSameCFType) >+{ >+ CFStringRef string = CFSTR("foo"); >+ RetainPtr<CFStringRef> ptr; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // CFTypeRef that logs -retain and -release calls. >+ ptr = RetainPtr<CFStringRef>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ ptr = nullptr; >+ RetainPtr<CFStringRef> temp = string; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ ptr = WTFMove(temp); >+ >+ EXPECT_EQ(string, ptr); >+ EXPECT_EQ((CFStringRef)nullptr, temp); >+} >+ >+TEST(RetainPtr, OptionalRetainPtrCF) >+{ >+ // Test assignment from adoptCF(). >+ float value = 3.1415926535; >+ Optional<RetainPtr<CFNumberRef>> optionalObject1 = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value)); >+ EXPECT_EQ(1, CFGetRetainCount(optionalObject1.value().get())); >+ RetainPtr<CFNumberRef> object1 = optionalObject1.value(); >+ EXPECT_EQ(optionalObject1.value(), object1); >+ >+ // Test assignment from retainPtr(). >+ Optional<RetainPtr<CFNumberRef>> optionalObject2 = retainPtr(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value)); >+ CFRelease(optionalObject2.value().get()); >+ EXPECT_EQ(1, CFGetRetainCount(optionalObject2.value().get())); >+ RetainPtr<CFNumberRef> object2 = optionalObject2.value(); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ EXPECT_NE(object1, object2); >+ >+ // Test assignment from Optional<RetainPtr<CFNumberRef>>. >+ optionalObject1 = optionalObject2; >+ EXPECT_TRUE(optionalObject1.value()); >+ EXPECT_TRUE(optionalObject1.value().get()); >+ EXPECT_EQ(optionalObject1.value(), object2); >+ EXPECT_TRUE(optionalObject2.value()); >+ EXPECT_TRUE(optionalObject2.value().get()); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ // Reset after assignment test. >+ optionalObject1 = object1; >+ EXPECT_EQ(optionalObject1.value(), object1); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ // Test move from Optional<RetainPtr<CFNumberRef>>. >+ optionalObject1 = WTFMove(optionalObject2); >+ EXPECT_TRUE(optionalObject1.value()); >+ EXPECT_TRUE(optionalObject1.value().get()); >+ EXPECT_EQ(optionalObject1.value(), object2); >+ EXPECT_FALSE(optionalObject2); >+} >+ >+TEST(RetainPtr, RetainPtrCF) >+{ >+ float value = 3.1415926535; >+ RetainPtr<CFNumberRef> object1 = retainPtr(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value)); >+ CFRelease(object1.get()); >+ EXPECT_EQ(1, CFGetRetainCount(object1.get())); >+ >+ RetainPtr<CFTypeRef> object2 = retainPtr(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value)); >+ CFRelease(object2.get()); >+ EXPECT_EQ(1, CFGetRetainCount(object2.get())); > } > > } // namespace TestWebKitAPI >diff --git a/Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm b/Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm >index f925ce7cf95935016d53ea630182a1d1820597fc..09e03ff0049445da39eee3be30dfaeea032ee8fb 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm >+++ b/Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. >+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -34,34 +34,97 @@ namespace TestWebKitAPI { > > TEST(RetainPtr, AdoptNS) > { >- RetainPtr<NSObject> foo = adoptNS([[NSObject alloc] init]); >+ RetainPtr<NSObject> object1 = adoptNS([[NSObject alloc] init]); >+ EXPECT_EQ(1, CFGetRetainCount(object1.get())); > >- EXPECT_EQ(1, CFGetRetainCount(foo.get())); >+ RetainPtr<NSObject *> object2 = adoptNS([[NSObject alloc] init]); >+ EXPECT_EQ(1, CFGetRetainCount(object2.get())); >+ >+ RetainPtr<id> object3 = adoptNS([[NSObject alloc] init]); >+ EXPECT_EQ(1, CFGetRetainCount(object3.get())); > } > >-TEST(RetainPtr, MoveAssignmentFromSameType) >+TEST(RetainPtr, ConstructionFromMutableNSType) >+{ >+ NSMutableString *string = [NSMutableString stringWithUTF8String:"foo"]; >+ >+ // This should invoke RetainPtr's move constructor. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // NSObject that logs -retain and -release calls. >+ RetainPtr<NSString> ptr = RetainPtr<NSMutableString>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ RetainPtr<NSMutableString> temp = string; >+ >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<NSString> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((NSString *)nil, temp); >+} >+ >+TEST(RetainPtr, ConstructionFromSameNSType) > { > NSString *string = @"foo"; >- RetainPtr<NSString> ptr; > >- // This should invoke RetainPtr's move assignment operator. >+ // This should invoke RetainPtr's move constructor. > // FIXME: This doesn't actually test that we moved the value. We should use a mock > // NSObject that logs -retain and -release calls. >- ptr = RetainPtr<NSString>(string); >+ RetainPtr<NSString> ptr = RetainPtr<NSString>(string); > > EXPECT_EQ(string, ptr); > >- ptr = 0; > RetainPtr<NSString> temp = string; > >- // This should invoke RetainPtr's move assignment operator. >- ptr = WTFMove(temp); >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<NSString> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((NSString *)nil, temp); >+} >+ >+TEST(RetainPtr, ConstructionFromSimilarNSType) >+{ >+ NSString *string = @"foo"; >+ >+ // This should invoke RetainPtr's move constructor. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // NSObject that logs -retain and -release calls. >+ RetainPtr<NSString> ptr = RetainPtr<NSString *>(string); > > EXPECT_EQ(string, ptr); >- EXPECT_EQ((NSString *)0, temp); >+ >+ RetainPtr<NSString *> temp = string; >+ >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<NSString> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((NSString *)nil, temp); > } > >-TEST(RetainPtr, MoveAssignmentFromSimilarType) >+TEST(RetainPtr, ConstructionFromSimilarNSTypeReversed) >+{ >+ NSString *string = @"foo"; >+ >+ // This should invoke RetainPtr's move constructor. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // NSObject that logs -retain and -release calls. >+ RetainPtr<NSString *> ptr = RetainPtr<NSString>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ RetainPtr<NSString> temp = string; >+ >+ // This should invoke RetainPtr's move constructor. >+ RetainPtr<NSString *> ptr2(WTFMove(temp)); >+ >+ EXPECT_EQ(string, ptr2); >+ EXPECT_EQ((NSString *)nil, temp); >+} >+ >+TEST(RetainPtr, MoveAssignmentFromMutableNSType) > { > NSMutableString *string = [NSMutableString stringWithUTF8String:"foo"]; > RetainPtr<NSString> ptr; >@@ -73,54 +136,142 @@ TEST(RetainPtr, MoveAssignmentFromSimilarType) > > EXPECT_EQ(string, ptr); > >- ptr = 0; >+ ptr = nil; > RetainPtr<NSMutableString> temp = string; > > // This should invoke RetainPtr's move assignment operator. > ptr = WTFMove(temp); > > EXPECT_EQ(string, ptr); >- EXPECT_EQ((NSString *)0, temp); >+ EXPECT_EQ((NSString *)nil, temp); > } > >-TEST(RetainPtr, ConstructionFromSameType) >+TEST(RetainPtr, MoveAssignmentFromSameNSType) > { > NSString *string = @"foo"; >+ RetainPtr<NSString> ptr; > >- // This should invoke RetainPtr's move constructor. >+ // This should invoke RetainPtr's move assignment operator. > // FIXME: This doesn't actually test that we moved the value. We should use a mock > // NSObject that logs -retain and -release calls. >- RetainPtr<NSString> ptr = RetainPtr<NSString>(string); >+ ptr = RetainPtr<NSString>(string); > > EXPECT_EQ(string, ptr); > >+ ptr = nil; > RetainPtr<NSString> temp = string; > >- // This should invoke RetainPtr's move constructor. >- RetainPtr<NSString> ptr2(WTFMove(temp)); >+ // This should invoke RetainPtr's move assignment operator. >+ ptr = WTFMove(temp); > >- EXPECT_EQ(string, ptr2); >- EXPECT_EQ((NSString *)0, temp); >+ EXPECT_EQ(string, ptr); >+ EXPECT_EQ((NSString *)nil, temp); > } > >-TEST(RetainPtr, ConstructionFromSimilarType) >+TEST(RetainPtr, MoveAssignmentFromSimilarNSType) > { >- NSMutableString *string = [NSMutableString stringWithUTF8String:"foo"]; >+ NSString *string = @"foo"; >+ RetainPtr<NSString> ptr; > >- // This should invoke RetainPtr's move constructor. >+ // This should invoke RetainPtr's move assignment operator. > // FIXME: This doesn't actually test that we moved the value. We should use a mock > // NSObject that logs -retain and -release calls. >- RetainPtr<NSString> ptr = RetainPtr<NSMutableString>(string); >+ ptr = RetainPtr<NSString *>(string); > > EXPECT_EQ(string, ptr); > >- RetainPtr<NSMutableString> temp = string; >+ ptr = nil; >+ RetainPtr<NSString *> temp = string; > >- // This should invoke RetainPtr's move constructor. >- RetainPtr<NSString> ptr2(WTFMove(temp)); >+ // This should invoke RetainPtr's move assignment operator. >+ ptr = WTFMove(temp); > >- EXPECT_EQ(string, ptr2); >- EXPECT_EQ((NSString *)0, temp); >+ EXPECT_EQ(string, ptr); >+ EXPECT_EQ((NSString *)nil, temp); >+} >+ >+TEST(RetainPtr, MoveAssignmentFromSimilarNSTypeReversed) >+{ >+ NSString *string = @"foo"; >+ RetainPtr<NSString *> ptr; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ // FIXME: This doesn't actually test that we moved the value. We should use a mock >+ // NSObject that logs -retain and -release calls. >+ ptr = RetainPtr<NSString>(string); >+ >+ EXPECT_EQ(string, ptr); >+ >+ ptr = nil; >+ RetainPtr<NSString> temp = string; >+ >+ // This should invoke RetainPtr's move assignment operator. >+ ptr = WTFMove(temp); >+ >+ EXPECT_EQ(string, ptr); >+ EXPECT_EQ((NSString *)nil, temp); >+} >+ >+TEST(RetainPtr, OptionalRetainPtrNS) >+{ >+ // Test assignment from adoptNS(). >+ Optional<RetainPtr<NSObject>> optionalObject1 = adoptNS([NSObject new]); >+ EXPECT_EQ(1, CFGetRetainCount(optionalObject1.value().get())); >+ RetainPtr<NSObject> object1 = optionalObject1.value(); >+ EXPECT_EQ(optionalObject1.value(), object1); >+ >+ // Test assignment from retainPtr(). >+ Optional<RetainPtr<NSObject>> optionalObject2; >+ @autoreleasepool { >+ optionalObject2 = retainPtr([[NSObject new] autorelease]); >+ } >+ EXPECT_EQ(1, CFGetRetainCount(optionalObject2.value().get())); >+ RetainPtr<NSObject> object2 = optionalObject2.value(); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ EXPECT_NE(object1, object2); >+ >+ // Test assignment from Optional<RetainPtr<NSObject>>. >+ optionalObject1 = optionalObject2; >+ EXPECT_TRUE(optionalObject1.value()); >+ EXPECT_TRUE(optionalObject1.value().get()); >+ EXPECT_EQ(optionalObject1.value(), object2); >+ EXPECT_TRUE(optionalObject2.value()); >+ EXPECT_TRUE(optionalObject2.value().get()); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ // Reset after assignment test. >+ optionalObject1 = object1; >+ EXPECT_EQ(optionalObject1.value(), object1); >+ EXPECT_EQ(optionalObject2.value(), object2); >+ >+ // Test move from Optional<RetainPtr<NSObject>>. >+ optionalObject1 = WTFMove(optionalObject2); >+ EXPECT_TRUE(optionalObject1.value()); >+ EXPECT_TRUE(optionalObject1.value().get()); >+ EXPECT_EQ(optionalObject1.value(), object2); >+ EXPECT_FALSE(optionalObject2); >+} >+ >+TEST(RetainPtr, RetainPtrNS) >+{ >+ RetainPtr<NSObject> object1; >+ @autoreleasepool { >+ object1 = retainPtr([[NSObject new] autorelease]); >+ } >+ EXPECT_EQ(1, CFGetRetainCount(object1.get())); >+ >+ RetainPtr<NSObject *> object2; >+ @autoreleasepool { >+ object2 = retainPtr([[NSObject new] autorelease]); >+ } >+ EXPECT_EQ(1, CFGetRetainCount(object2.get())); >+ >+ RetainPtr<id> object3; >+ @autoreleasepool { >+ object3 = retainPtr([[NSObject new] autorelease]); >+ } >+ EXPECT_EQ(1, CFGetRetainCount(object3.get())); > } > > } // namespace TestWebKitAPI >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm >index f771243383fe94c79bb4995d784ad234ff984514..f560df3f4c42e24e65b3bf62871b5fadc19a5f65 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm >@@ -381,7 +381,7 @@ - (void)_download:(_WKDownload *)download decideDestinationWithSuggestedFilename > EXPECT_EQ(download, m_download.get()); > > WebCore::FileSystem::PlatformFileHandle fileHandle; >- RetainPtr<NSString *> path = (NSString *)WebCore::FileSystem::openTemporaryFile("TestWebKitAPI", fileHandle); >+ RetainPtr<NSString> path = (NSString *)WebCore::FileSystem::openTemporaryFile("TestWebKitAPI", fileHandle); > EXPECT_TRUE(fileHandle != WebCore::FileSystem::invalidPlatformFileHandle); > WebCore::FileSystem::closeFile(fileHandle); > >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm >index 1f825bb8daa469c22b0d9108d1ce90e93ad84ce3..71d28101145682a4d99b050a9fe8e6921f3467b2 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm >@@ -205,7 +205,7 @@ TEST(IconLoading, AlreadyCachedIcon) > RetainPtr<IconLoadingSchemeHandler> handler = adoptNS([[IconLoadingSchemeHandler alloc] initWithData:mainData]); > > NSURL *url = [[NSBundle mainBundle] URLForResource:@"large-red-square-image" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; >- RetainPtr<NSData *> iconDataFromDisk = [NSData dataWithContentsOfURL:url]; >+ RetainPtr<NSData> iconDataFromDisk = [NSData dataWithContentsOfURL:url]; > [handler.get() setFaviconData:iconDataFromDisk.get()]; > > [configuration setURLSchemeHandler:handler.get() forURLScheme:@"testing"]; >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm >index 8068719e16e2b93ed052ca4fe213c43da08580fa..b3a3b3d5cb29b9c24e092a3d6768f36e5a676b1c 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm >@@ -53,7 +53,7 @@ TEST(WebKit, JITEnabled) > auto configuration = adoptNS([WKWebViewConfiguration new]); > [configuration setProcessPool:[[[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()] autorelease]]; > auto webViewNoJIT = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); >- checkJITEnabled(webViewNoJIT, NO); >+ checkJITEnabled(WTFMove(webViewNoJIT), NO); > checkJITEnabled(adoptNS([WKWebView new]), YES); > } > >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >index 2434bcec8c1e11b543bdb78f8d5f2fe5be97f7a3..1c25de8e44dbd28449cd853ebcba788bd396f462 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm >@@ -188,7 +188,7 @@ @end > @interface PSONScheme : NSObject <WKURLSchemeHandler> { > const char* _bytes; > HashMap<String, String> _redirects; >- HashMap<String, RetainPtr<NSData *>> _dataMappings; >+ HashMap<String, RetainPtr<NSData>> _dataMappings; > } > - (instancetype)initWithBytes:(const char*)bytes; > - (void)addRedirectFromURLString:(NSString *)sourceURLString toURLString:(NSString *)destinationURLString; >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm >index f489bbe8e05f6c9c8475efa06a1fe3dd8152610c..abf2aa6b8d1e217bed6f728c2ae96f910584f387 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm >@@ -117,7 +117,7 @@ @end > > namespace TestWebKitAPI { > >-RetainPtr<VideoControlsManagerTestWebView*> setUpWebViewForTestingVideoControlsManager(NSRect frame) >+RetainPtr<VideoControlsManagerTestWebView> setUpWebViewForTestingVideoControlsManager(NSRect frame) > { > RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > configuration.get().mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone; >@@ -126,7 +126,7 @@ RetainPtr<VideoControlsManagerTestWebView*> setUpWebViewForTestingVideoControlsM > > TEST(VideoControlsManager, VideoControlsManagerSingleLargeVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > // A large video with audio should have a controls manager even if it is played via script like this video. > // So the expectation is YES. >@@ -136,7 +136,7 @@ TEST(VideoControlsManager, VideoControlsManagerSingleLargeVideo) > > TEST(VideoControlsManager, VideoControlsManagerSingleSmallVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > // A small video will not have a controls manager unless it started playing because of a user gesture. Since this > // video is started with a script, the expectation is NO. >@@ -146,7 +146,7 @@ TEST(VideoControlsManager, VideoControlsManagerSingleSmallVideo) > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosWithAudio) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > [webView loadTestPageNamed:@"large-videos-with-audio"]; > [webView waitForPageToLoadWithAutoplayingVideos:0]; >@@ -157,7 +157,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosWithAudio) > // FIXME: Re-enable this test once <webkit.org/b/175143> is resolved. > TEST(VideoControlsManager, DISABLED_VideoControlsManagerMultipleVideosWithAudioAndAutoplay) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > [webView loadTestPageNamed:@"large-videos-with-audio-autoplay"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -168,7 +168,7 @@ TEST(VideoControlsManager, DISABLED_VideoControlsManagerMultipleVideosWithAudioA > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPausedVideoOutOfView) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"large-videos-paused-video-hides-controls"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -179,7 +179,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPausedVideoOu > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPlayingVideoWithSoundOutOfView) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"large-videos-playing-video-keeps-controls"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -190,7 +190,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPlayingVideoW > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPlayingMutedVideoOutOfView) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"large-videos-playing-muted-video-hides-controls"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -201,7 +201,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollPlayingMutedV > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosShowControlsForLastInteractedVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); > NSPoint clickPoint = NSMakePoint(400, 300); > > [webView loadTestPageNamed:@"large-videos-autoplaying-click-to-pause"]; >@@ -228,7 +228,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosShowControlsForLast > // FIXME: Re-enable this test once <webkit.org/b/175909> is resolved. > TEST(VideoControlsManager, DISABLED_VideoControlsManagerMultipleVideosSwitchControlledVideoWhenScrolling) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); > > [webView loadTestPageNamed:@"large-videos-autoplaying-scroll-to-video"]; > [webView waitForPageToLoadWithAutoplayingVideos:2]; >@@ -241,7 +241,7 @@ TEST(VideoControlsManager, DISABLED_VideoControlsManagerMultipleVideosSwitchCont > > TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollOnlyLargeVideoOutOfView) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"large-video-playing-scroll-away"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -251,7 +251,7 @@ TEST(VideoControlsManager, VideoControlsManagerMultipleVideosScrollOnlyLargeVide > > TEST(VideoControlsManager, VideoControlsManagerSingleSmallAutoplayingVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > [webView loadTestPageNamed:@"autoplaying-video-with-audio"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -262,7 +262,7 @@ TEST(VideoControlsManager, VideoControlsManagerSingleSmallAutoplayingVideo) > > TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoSeeksAfterEnding) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > [webView loadTestPageNamed:@"large-video-seek-after-ending"]; > >@@ -275,7 +275,7 @@ TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoSeeksAfterEn > > TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoSeeksAndPlaysAfterEnding) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > // Since the video is still playing, the expectation is YES even if the video has ended once. > [webView loadTestPageNamed:@"large-video-seek-to-beginning-and-play-after-ending"]; >@@ -284,7 +284,7 @@ TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoSeeksAndPlay > > TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoAfterSeekingToEnd) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > [webView loadTestPageNamed:@"large-video-hides-controls-after-seek-to-end"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -297,7 +297,7 @@ TEST(VideoControlsManager, VideoControlsManagerLargeAutoplayingVideoAfterSeeking > > TEST(VideoControlsManager, VideoControlsManagerSingleLargeVideoWithoutAudio) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > // A large video with no audio will not have a controls manager unless it started playing because of a user gesture. Since this > // video is started with a script, the expectation is NO. >@@ -307,7 +307,7 @@ TEST(VideoControlsManager, VideoControlsManagerSingleLargeVideoWithoutAudio) > > TEST(VideoControlsManager, VideoControlsManagerAudioElementStartedWithScript) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > // An audio element MUST be started with a user gesture in order to have a controls manager, so the expectation is NO. > [webView loadTestPageNamed:@"audio-only"]; >@@ -316,7 +316,7 @@ TEST(VideoControlsManager, VideoControlsManagerAudioElementStartedWithScript) > > TEST(VideoControlsManager, VideoControlsManagerAudioElementStartedByInteraction) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 400, 400)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 400, 400)); > > [webView loadTestPageNamed:@"play-audio-on-click"]; > [webView waitForPageToLoadWithAutoplayingVideos:0]; >@@ -329,7 +329,7 @@ TEST(VideoControlsManager, VideoControlsManagerAudioElementStartedByInteraction) > > TEST(VideoControlsManager, DISABLED_VideoControlsManagerAudioElementFollowingUserInteraction) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 400, 400)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 400, 400)); > > [webView loadTestPageNamed:@"play-audio-on-click"]; > [webView waitForPageToLoadWithAutoplayingVideos:0]; >@@ -354,7 +354,7 @@ TEST(VideoControlsManager, DISABLED_VideoControlsManagerAudioElementFollowingUse > > TEST(VideoControlsManager, VideoControlsManagerTearsDownMediaControlsOnDealloc) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > NSURL *urlOfVideo = [[NSBundle mainBundle] URLForResource:@"video-with-audio" withExtension:@"mp4" subdirectory:@"TestWebKitAPI.resources"]; > [webView loadFileURL:urlOfVideo allowingReadAccessToURL:[urlOfVideo URLByDeletingLastPathComponent]]; >@@ -374,7 +374,7 @@ TEST(VideoControlsManager, VideoControlsManagerTearsDownMediaControlsOnDealloc) > > TEST(VideoControlsManager, VideoControlsManagerDoesNotShowMediaControlsForOffscreenVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1024, 768)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1024, 768)); > > [webView loadTestPageNamed:@"large-video-offscreen"]; > [webView waitForMediaControlsToHide]; >@@ -382,7 +382,7 @@ TEST(VideoControlsManager, VideoControlsManagerDoesNotShowMediaControlsForOffscr > > TEST(VideoControlsManager, VideoControlsManagerKeepsControlsStableDuringSrcChangeOnClick) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); > > [webView loadTestPageNamed:@"change-video-source-on-click"]; > [webView waitForPageToLoadWithAutoplayingVideos:1]; >@@ -393,7 +393,7 @@ TEST(VideoControlsManager, VideoControlsManagerKeepsControlsStableDuringSrcChang > > TEST(VideoControlsManager, VideoControlsManagerKeepsControlsStableDuringSrcChangeOnEnd) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); > > [webView loadTestPageNamed:@"change-video-source-on-end"]; > [webView expectControlsManager:YES afterReceivingMessage:@"changed"]; >@@ -401,7 +401,7 @@ TEST(VideoControlsManager, VideoControlsManagerKeepsControlsStableDuringSrcChang > > TEST(VideoControlsManager, VideoControlsManagerSmallVideoInMediaDocument) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 100, 100)); > > __block bool finishedLoad = false; > [webView performAfterLoading:^ { >@@ -419,7 +419,7 @@ TEST(VideoControlsManager, VideoControlsManagerSmallVideoInMediaDocument) > > TEST(VideoControlsManager, VideoControlsManagerOffscreenIframeMediaDocument) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 800, 600)); > [webView loadTestPageNamed:@"offscreen-iframe-of-media-document"]; > > // We do not expect a controls manager becuase the media document is in an iframe. >@@ -428,7 +428,7 @@ TEST(VideoControlsManager, VideoControlsManagerOffscreenIframeMediaDocument) > > TEST(VideoControlsManager, VideoControlsManagerLongSkinnyVideoInWideMainFrame) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); > > [webView loadTestPageNamed:@"skinny-autoplaying-video-with-audio"]; > [webView expectControlsManager:NO afterReceivingMessage:@"playing"]; >@@ -436,7 +436,7 @@ TEST(VideoControlsManager, VideoControlsManagerLongSkinnyVideoInWideMainFrame) > > TEST(VideoControlsManager, VideoControlsManagerWideMediumSizedVideoInWideMainFrame) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); > > [webView loadTestPageNamed:@"wide-autoplaying-video-with-audio"]; > [webView expectControlsManager:YES afterReceivingMessage:@"playing"]; >@@ -444,7 +444,7 @@ TEST(VideoControlsManager, VideoControlsManagerWideMediumSizedVideoInWideMainFra > > TEST(VideoControlsManager, VideoControlsManagerFullSizeVideoInWideMainFrame) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 1600, 800)); > > [webView loadTestPageNamed:@"full-size-autoplaying-video-with-audio"]; > [webView expectControlsManager:YES afterReceivingMessage:@"playing"]; >@@ -452,7 +452,7 @@ TEST(VideoControlsManager, VideoControlsManagerFullSizeVideoInWideMainFrame) > > TEST(VideoControlsManager, VideoControlsManagerVideoMutesOnPlaying) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"large-video-mutes-onplaying"]; > [webView expectControlsManager:NO afterReceivingMessage:@"playing"]; >@@ -460,7 +460,7 @@ TEST(VideoControlsManager, VideoControlsManagerVideoMutesOnPlaying) > > TEST(VideoControlsManager, VideoControlsManagerPageWithEnormousVideo) > { >- RetainPtr<VideoControlsManagerTestWebView*> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); >+ RetainPtr<VideoControlsManagerTestWebView> webView = setUpWebViewForTestingVideoControlsManager(NSMakeRect(0, 0, 500, 500)); > > [webView loadTestPageNamed:@"enormous-video-with-sound"]; > [webView expectControlsManager:NO afterReceivingMessage:@"playing"]; >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >index 708b072805e7ce360eff75a5df7e653d83ce70d9..10a354f9dcd5301623cb19df1327769b76e882fb 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm >@@ -865,7 +865,7 @@ TEST(WebKit, CustomHeaderFields) > static unsigned loadCount; > > @interface DataMappingSchemeHandler : NSObject <WKURLSchemeHandler> { >- HashMap<String, RetainPtr<NSData *>> _dataMappings; >+ HashMap<String, RetainPtr<NSData>> _dataMappings; > } > - (void)addMappingFromURLString:(NSString *)urlString toData:(const char*)data; > @end >diff --git a/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm b/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >index 4cb851827c89bfc6a8e8fad8d0d7db5f1f08e6cf..20f32ca5a12453e1873aacc72ce3682909c614bb 100644 >--- a/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >+++ b/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >@@ -297,8 +297,8 @@ @implementation DragAndDropSimulator { > RetainPtr<MockDropSession> _dropSession; > RetainPtr<NSMutableArray> _observedEventNames; > RetainPtr<NSArray> _externalItemProviders; >- RetainPtr<NSArray *> _sourceItemProviders; >- RetainPtr<NSArray *> _finalSelectionRects; >+ RetainPtr<NSArray> _sourceItemProviders; >+ RetainPtr<NSArray> _finalSelectionRects; > CGPoint _startLocation; > CGPoint _endLocation; > CGRect _lastKnownDragCaretRect; >diff --git a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >index ea36a0e557085bfad17aabb1935704c42a5f376a..3fef2d5818c9974d9cb9a0f734bccadc59919567 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >@@ -47,7 +47,7 @@ namespace WTR { > > static NSURL *resourcesDirectoryURL() > { >- static NeverDestroyed<RetainPtr<NSURL *>> resourcesDirectory([[NSBundle bundleForClass:[WKTRFontActivatorDummyClass class]] resourceURL]); >+ static NeverDestroyed<RetainPtr<NSURL>> resourcesDirectory([[NSBundle bundleForClass:[WKTRFontActivatorDummyClass class]] resourceURL]); > return resourcesDirectory.get().get(); > } > >diff --git a/Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm b/Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm >index 3f2d76c65c64df6b51082cd1045b9c93a85b5396..42908befef7a58f7ae04f05805314e5a45e4e3ed 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm >@@ -37,7 +37,7 @@ void InjectedBundle::platformInitialize(WKTypeRef) > // Language was set up earlier in main(). Don't clobber it. > NSArray *languages = [[[NSUserDefaults standardUserDefaults] volatileDomainForName:NSArgumentDomain] valueForKey:@"AppleLanguages"]; > >- RetainPtr<NSMutableDictionary *> dict = adoptNS([[NSMutableDictionary alloc] init]); >+ RetainPtr<NSMutableDictionary> dict = adoptNS([[NSMutableDictionary alloc] init]); > if (languages) > [dict setObject:languages forKey:@"AppleLanguages"]; > >diff --git a/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm b/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm >index 6c780375a92979f7c4ad95a19e3d2a754e4e1fdb..fbfca09d8d351e9417bef8340d2f13a03cd550d0 100644 >--- a/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm >+++ b/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm >@@ -48,7 +48,7 @@ @end > #if WK_API_ENABLED > > @interface TestRunnerWKWebView () <WKUIDelegatePrivate> { >- RetainPtr<NSNumber *> m_stableStateOverride; >+ RetainPtr<NSNumber> m_stableStateOverride; > BOOL m_isInteractingWithFormControl; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
achristensen
:
review+
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193056
:
358136
| 358140