Diff
Modified: trunk/Source/WebCore/ChangeLog (215991 => 215992)
--- trunk/Source/WebCore/ChangeLog 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/ChangeLog 2017-04-30 20:47:21 UTC (rev 215992)
@@ -1,3 +1,29 @@
+2017-04-30 Dan Bernstein <[email protected]>
+
+ [Cocoa] Replaces uses of [get…() alloc] with alloc…Instance()
+ https://bugs.webkit.org/show_bug.cgi?id=171485
+
+ Reviewed by Geoffrey Garen.
+
+ * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
+ (WebCore::CDMSessionAVContentKeySession::contentKeySession):
+ * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
+ (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
+ * platform/ios/ValidationBubbleIOS.mm:
+ (-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
+ (WebCore::ValidationBubble::ValidationBubble):
+ * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+ (WebVideoFullscreenControllerContext::setUpFullscreen):
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
+ (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
+ * platform/mac/WebVideoFullscreenInterfaceMac.mm:
+ (-[WebVideoFullscreenInterfaceMacObjC setUpPIPForVideoView:withFrame:inWindow:]):
+ * platform/network/ios/PreviewConverter.mm:
+ (WebCore::PreviewConverter::PreviewConverter):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::iconForAttachment):
+
2017-04-30 Brady Eidson <[email protected]>
Updates to _WKWebsiteDataStoreConfiguration cookie storage location SPI.
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -358,7 +358,7 @@
return nil;
}
- m_contentKeySession = adoptNS([[getAVContentKeySessionClass() alloc] initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]]);
+ m_contentKeySession = adoptNS([allocAVContentKeySessionInstance() initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]]);
m_contentKeySession.get().delegate = m_contentKeySessionDelegate.get();
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -94,8 +94,8 @@
if (!m_outputDeviceMenuController) {
LOG(Media, "MediaPlaybackTargetPickerMac::devicePicker - allocating picker");
- RetainPtr<AVOutputContextType> context = adoptNS([[getAVOutputContextClass() alloc] init]);
- m_outputDeviceMenuController = adoptNS([[getAVOutputDeviceMenuControllerClass() alloc] initWithOutputContext:context.get()]);
+ RetainPtr<AVOutputContextType> context = adoptNS([allocAVOutputContextInstance() init]);
+ m_outputDeviceMenuController = adoptNS([allocAVOutputDeviceMenuControllerInstance() initWithOutputContext:context.get()]);
[m_outputDeviceMenuController.get() addObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDeviceAvailableKeyName options:NSKeyValueObservingOptionNew context:nullptr];
[m_outputDeviceMenuController.get() addObserver:m_outputDeviceMenuControllerDelegate.get() forKeyPath:externalOutputDevicePickedKeyName options:NSKeyValueObservingOptionNew context:nullptr];
Modified: trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -60,7 +60,7 @@
return nil;
_popoverController = popoverController;
- _tapGestureRecognizer = adoptNS([[getUITapGestureRecognizerClass() alloc] initWithTarget:self action:@selector(dismissPopover)]);
+ _tapGestureRecognizer = adoptNS([allocUITapGestureRecognizerInstance() initWithTarget:self action:@selector(dismissPopover)]);
[[_popoverController view] addGestureRecognizer:_tapGestureRecognizer.get()];
return self;
@@ -105,14 +105,14 @@
: m_view(view)
, m_message(message)
{
- m_popoverController = adoptNS([[getUIViewControllerClass() alloc] init]);
+ m_popoverController = adoptNS([allocUIViewControllerInstance() init]);
[m_popoverController setModalPresentationStyle:UIModalPresentationPopover];
- RetainPtr<UIView> popoverView = adoptNS([[getUIViewClass() alloc] initWithFrame:CGRectZero]);
+ RetainPtr<UIView> popoverView = adoptNS([allocUIViewInstance() initWithFrame:CGRectZero]);
[m_popoverController setView:popoverView.get()];
m_tapRecognizer = adoptNS([[WebValidationBubbleTapRecognizer alloc] initWithPopoverController:m_popoverController.get()]);
- RetainPtr<UILabel> label = adoptNS([[getUILabelClass() alloc] initWithFrame:CGRectZero]);
+ RetainPtr<UILabel> label = adoptNS([allocUILabelInstance() initWithFrame:CGRectZero]);
[label setText:message];
[label setFont:[getUIFontClass() preferredFontForTextStyle:getUIFontTextStyleCallout()]];
m_fontSize = [[label font] pointSize];
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -785,7 +785,7 @@
m_interface->setWebVideoFullscreenModel(this);
m_interface->setWebVideoFullscreenChangeObserver(this);
- m_videoFullscreenView = adoptNS([[getUIViewClass() alloc] init]);
+ m_videoFullscreenView = adoptNS([allocUIViewInstance() init]);
m_interface->setupFullscreen(*m_videoFullscreenView.get(), videoElementClientRect, viewRef.get(), mode, allowsPictureInPicture);
});
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -444,7 +444,7 @@
WebAVPlayerLayerView *playerLayerView = aSelf;
WebAVPictureInPicturePlayerLayerView *pipView = [playerLayerView valueForKey:@"_pictureInPicturePlayerLayerView"];
if (!pipView) {
- pipView = [[getWebAVPictureInPicturePlayerLayerViewClass() alloc] initWithFrame:CGRectZero];
+ pipView = [allocWebAVPictureInPicturePlayerLayerViewInstance() initWithFrame:CGRectZero];
[playerLayerView setValue:pipView forKey:@"_pictureInPicturePlayerLayerView"];
}
return pipView;
@@ -613,7 +613,7 @@
}
if (!m_playerLayerView)
- m_playerLayerView = adoptNS([[getWebAVPlayerLayerViewClass() alloc] init]);
+ m_playerLayerView = adoptNS([allocWebAVPlayerLayerViewInstance() init]);
[m_playerLayerView setHidden:[playerController() isExternalPlaybackActive]];
[m_playerLayerView setBackgroundColor:[getUIColorClass() clearColor]];
Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -187,7 +187,7 @@
ASSERT(!_videoViewContainerController);
ASSERT(!_videoViewContainer);
- _pipViewController = adoptNS([[getPIPViewControllerClass() alloc] init]);
+ _pipViewController = adoptNS([allocPIPViewControllerInstance() init]);
[_pipViewController setDelegate:self];
[_pipViewController setUserCanResize:YES];
[_pipViewController setPlaying:_playing];
Modified: trunk/Source/WebCore/platform/network/ios/PreviewConverter.mm (215991 => 215992)
--- trunk/Source/WebCore/platform/network/ios/PreviewConverter.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/platform/network/ios/PreviewConverter.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -48,12 +48,12 @@
}
PreviewConverter::PreviewConverter(id delegate, const ResourceResponse& response, const String& password)
- : m_platformConverter { adoptNS([[getQLPreviewConverterClass() alloc] initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) }
+ : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) }
{
}
PreviewConverter::PreviewConverter(NSData *data, const String& uti, const String& password)
- : m_platformConverter { adoptNS([[getQLPreviewConverterClass() alloc] initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) }
+ : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) }
{
}
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (215991 => 215992)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -1595,7 +1595,7 @@
static RetainPtr<UIImage> iconForAttachment(const RenderAttachment& attachment, FloatSize& size)
{
- auto documentInteractionController = adoptNS([[getUIDocumentInteractionControllerClass() alloc] init]);
+ auto documentInteractionController = adoptNS([allocUIDocumentInteractionControllerInstance() init]);
String fileName;
if (File* file = attachment.attachmentElement().file())
Modified: trunk/Source/WebKit/mac/ChangeLog (215991 => 215992)
--- trunk/Source/WebKit/mac/ChangeLog 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebKit/mac/ChangeLog 2017-04-30 20:47:21 UTC (rev 215992)
@@ -1,3 +1,14 @@
+2017-04-30 Dan Bernstein <[email protected]>
+
+ [Cocoa] Replaces uses of [get…() alloc] with alloc…Instance()
+ https://bugs.webkit.org/show_bug.cgi?id=171485
+
+ Reviewed by Geoffrey Garen.
+
+ * WebView/WebView.mm:
+ (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
+ (-[WebUITextIndicatorData initWithImage:scale:]):
+
2017-04-28 Youenn Fablet <[email protected]>
Adding a runtime flag specific to MediaDevices
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (215991 => 215992)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -654,7 +654,7 @@
if (!(self = [super init]))
return nil;
- _dataInteractionImage = [[getUIImageClass() alloc] initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
+ _dataInteractionImage = [allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
_selectionRectInRootViewCoordinates = indicatorData.selectionRectInRootViewCoordinates;
_textBoundingRectInRootViewCoordinates = indicatorData.textBoundingRectInRootViewCoordinates;
@@ -664,20 +664,20 @@
_textRectsInBoundingRectCoordinates = [[NSArray arrayWithArray:textRectsInBoundingRectCoordinates] retain];
_contentImageScaleFactor = indicatorData.contentImageScaleFactor;
if (indicatorData.contentImageWithHighlight)
- _contentImageWithHighlight = [[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored];
+ _contentImageWithHighlight = [allocUIImageInstance() initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored];
if (indicatorData.contentImage)
- _contentImage = [[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp];
+ _contentImage = [allocUIImageInstance() initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp];
if (indicatorData.contentImageWithoutSelection) {
auto nativeImage = indicatorData.contentImageWithoutSelection.get()->nativeImage();
if (nativeImage) {
- _contentImageWithoutSelection = [[getUIImageClass() alloc] initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp];
+ _contentImageWithoutSelection = [allocUIImageInstance() initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp];
_contentImageWithoutSelectionRectInRootViewCoordinates = indicatorData.contentImageWithoutSelectionRectInRootViewCoordinates;
}
}
if (indicatorData.options & TextIndicatorOptionComputeEstimatedBackgroundColor)
- _estimatedBackgroundColor = [[getUIColorClass() alloc] initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
+ _estimatedBackgroundColor = [allocUIColorInstance() initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
return self;
}
@@ -687,7 +687,7 @@
if (!(self = [super init]))
return nil;
- _dataInteractionImage = [[getUIImageClass() alloc] initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
+ _dataInteractionImage = [allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
return self;
}
Modified: trunk/Source/WebKit2/ChangeLog (215991 => 215992)
--- trunk/Source/WebKit2/ChangeLog 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebKit2/ChangeLog 2017-04-30 20:47:21 UTC (rev 215992)
@@ -1,3 +1,14 @@
+2017-04-30 Dan Bernstein <[email protected]>
+
+ [Cocoa] Replaces uses of [get…() alloc] with alloc…Instance()
+ https://bugs.webkit.org/show_bug.cgi?id=171485
+
+ Reviewed by Geoffrey Garen.
+
+ * Platform/mac/MenuUtilities.mm:
+ (WebKit::menuItemForTelephoneNumber):
+ (WebKit::menuForTelephoneNumber):
+
2017-04-30 Brady Eidson <[email protected]>
Updates to _WKWebsiteDataStoreConfiguration cookie storage location SPI.
Modified: trunk/Source/WebKit2/Platform/mac/MenuUtilities.mm (215991 => 215992)
--- trunk/Source/WebKit2/Platform/mac/MenuUtilities.mm 2017-04-30 20:24:05 UTC (rev 215991)
+++ trunk/Source/WebKit2/Platform/mac/MenuUtilities.mm 2017-04-30 20:47:21 UTC (rev 215992)
@@ -51,7 +51,7 @@
if (!DataDetectorsLibrary())
return nil;
- RetainPtr<DDActionContext> actionContext = adoptNS([[getDDActionContextClass() alloc] init]);
+ RetainPtr<DDActionContext> actionContext = adoptNS([allocDDActionContextInstance() init]);
[actionContext setAllowedActionUTIs:@[ @"com.apple.dial" ]];
NSArray *proposedMenuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForValue:(NSString *)telephoneNumber type:getDDBinderPhoneNumberKey() service:nil context:actionContext.get()];
@@ -82,7 +82,7 @@
NSMutableArray *faceTimeItems = [NSMutableArray array];
NSMenuItem *dialItem = nil;
- RetainPtr<DDActionContext> actionContext = adoptNS([[getDDActionContextClass() alloc] init]);
+ RetainPtr<DDActionContext> actionContext = adoptNS([allocDDActionContextInstance() init]);
[actionContext setAllowedActionUTIs:@[ @"com.apple.dial", @"com.apple.facetime", @"com.apple.facetimeaudio" ]];
NSArray *proposedMenuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForValue:(NSString *)telephoneNumber type:getDDBinderPhoneNumberKey() service:nil context:actionContext.get()];