Diff
Modified: trunk/Tools/ChangeLog (235836 => 235837)
--- trunk/Tools/ChangeLog 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/ChangeLog 2018-09-09 17:55:00 UTC (rev 235837)
@@ -1,3 +1,16 @@
+2018-09-09 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r235832.
+ https://bugs.webkit.org/show_bug.cgi?id=189464
+
+ Broke WebKit2 tests (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "[Cocoa] Turn on ARC for WebKitTestRunner"
+ https://bugs.webkit.org/show_bug.cgi?id=189228
+ https://trac.webkit.org/changeset/235832
+
2018-09-08 Simon Fraser <[email protected]>
accessibility/notification-listeners.html abandons a document
Modified: trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm (235836 => 235837)
--- trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -198,7 +198,7 @@
RetainPtr<CGEventRef> plainEvent = adoptCF(CGEventCreate(NULL));
CGEventRef rawPlainEvent = plainEvent.get();
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
+ NSMutableDictionary *dict = [[[NSMutableDictionary alloc] init] autorelease];
FOR_EACH_CGEVENT_INTEGER_FIELD(LOAD_INTEGER_FIELD_FROM_EVENT);
FOR_EACH_CGEVENT_DOUBLE_FIELD(LOAD_DOUBLE_FIELD_FROM_EVENT);
Modified: trunk/Tools/TestRunnerShared/cocoa/LayoutTestSpellChecker.mm (235836 => 235837)
--- trunk/Tools/TestRunnerShared/cocoa/LayoutTestSpellChecker.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/TestRunnerShared/cocoa/LayoutTestSpellChecker.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -251,7 +251,7 @@
}
JSPropertyNameArrayRelease(detailsObjectProperties);
}
- [resultsForWord addObject:[[LayoutTestTextCheckingResult alloc] initWithType:nsTextCheckingType(WTFMove(typeValue)) range:NSMakeRange(fromValue, toValue - fromValue) replacement:(__bridge NSString *)replacementText.get() details:details.get()]];
+ [resultsForWord addObject:[[[LayoutTestTextCheckingResult alloc] initWithType:nsTextCheckingType(WTFMove(typeValue)) range:NSMakeRange(fromValue, toValue - fromValue) replacement:(__bridge NSString *)replacementText.get() details:details.get()] autorelease]];
}
auto cfTextToCheck = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, textToCheck));
[results setObject:resultsForWord.get() forKey:(__bridge NSString *)cfTextToCheck.get()];
Modified: trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig 2018-09-09 17:55:00 UTC (rev 235837)
@@ -30,7 +30,6 @@
CLANG_CXX_LANGUAGE_STANDARD = gnu++14;
CLANG_CXX_LIBRARY = libc++;
-CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_CXX0X_EXTENSIONS = NO;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -93,7 +93,7 @@
RefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef idAttribute)
{
WKBundlePageRef page = InjectedBundle::singleton().page()->page();
- id root = (__bridge PlatformUIElement)WKAccessibilityRootObject(page);
+ id root = static_cast<PlatformUIElement>(WKAccessibilityRootObject(page));
id result = findAccessibleObjectById(root, [NSString stringWithJSStringRef:idAttribute]);
if (result)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -29,7 +29,7 @@
bool AccessibilityTextMarker::isEqual(AccessibilityTextMarker* other)
{
- return [(__bridge id)platformTextMarker() isEqual:(__bridge id)other->platformTextMarker()];
+ return [(id)platformTextMarker() isEqual:(id)other->platformTextMarker()];
}
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -146,6 +146,8 @@
: m_element(element)
, m_notificationHandler(0)
{
+ // FIXME: [email protected] says ObjC objects need to be CFRetained/CFRelease to be GC-compliant on the mac.
+ [m_element retain];
}
AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
@@ -153,10 +155,12 @@
, m_element(other.m_element)
, m_notificationHandler(0)
{
+ [m_element retain];
}
AccessibilityUIElement::~AccessibilityUIElement()
{
+ [m_element release];
}
bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
@@ -972,6 +976,7 @@
ASSERT(m_notificationHandler);
[m_notificationHandler stopObserving];
+ [m_notificationHandler release];
m_notificationHandler = nil;
return true;
@@ -1058,41 +1063,41 @@
// Text markers
RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::lineTextMarkerRangeForTextMarker(AccessibilityTextMarker* textMarker)
{
- id startTextMarker = [m_element lineStartMarkerForMarker:(__bridge id)textMarker->platformTextMarker()];
- id endTextMarker = [m_element lineEndMarkerForMarker:(__bridge id)textMarker->platformTextMarker()];
+ id startTextMarker = [m_element lineStartMarkerForMarker:(id)textMarker->platformTextMarker()];
+ id endTextMarker = [m_element lineEndMarkerForMarker:(id)textMarker->platformTextMarker()];
NSArray *textMarkers = [NSArray arrayWithObjects:startTextMarker, endTextMarker, nil];
id textMarkerRange = [m_element textMarkerRangeForMarkers:textMarkers];
- return AccessibilityTextMarkerRange::create((__bridge PlatformTextMarkerRange)textMarkerRange);
+ return AccessibilityTextMarkerRange::create(textMarkerRange);
}
RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForElement(AccessibilityUIElement* element)
{
id textMarkerRange = [element->platformUIElement() textMarkerRange];
- return AccessibilityTextMarkerRange::create((__bridge PlatformTextMarkerRange)textMarkerRange);
+ return AccessibilityTextMarkerRange::create(textMarkerRange);
}
int AccessibilityUIElement::textMarkerRangeLength(AccessibilityTextMarkerRange* range)
{
- id textMarkers = (__bridge id)range->platformTextMarkerRange();
+ id textMarkers = (id)range->platformTextMarkerRange();
return [m_element lengthForTextMarkers:textMarkers];
}
RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousTextMarker(AccessibilityTextMarker* textMarker)
{
- id previousMarker = [m_element previousMarkerForMarker:(__bridge id)textMarker->platformTextMarker()];
- return AccessibilityTextMarker::create((__bridge PlatformTextMarker)previousMarker);
+ id previousMarker = [m_element previousMarkerForMarker:(id)textMarker->platformTextMarker()];
+ return AccessibilityTextMarker::create(previousMarker);
}
RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextTextMarker(AccessibilityTextMarker* textMarker)
{
- id nextMarker = [m_element nextMarkerForMarker:(__bridge id)textMarker->platformTextMarker()];
- return AccessibilityTextMarker::create((__bridge PlatformTextMarker)nextMarker);
+ id nextMarker = [m_element nextMarkerForMarker:(id)textMarker->platformTextMarker()];
+ return AccessibilityTextMarker::create(nextMarker);
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForTextMarkerRange(AccessibilityTextMarkerRange* markerRange)
{
- id textMarkers = (__bridge id)markerRange->platformTextMarkerRange();
+ id textMarkers = (id)markerRange->platformTextMarkerRange();
if (!textMarkers || ![textMarkers isKindOfClass:[NSArray class]])
return JSStringCreateWithCharacters(0, 0);
return [[m_element stringForTextMarkers:textMarkers] createJSStringRef];
@@ -1100,23 +1105,23 @@
RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker)
{
- NSArray *textMarkers = [NSArray arrayWithObjects:(__bridge id)startMarker->platformTextMarker(), (__bridge id)endMarker->platformTextMarker(), nil];
+ NSArray *textMarkers = [NSArray arrayWithObjects:(id)startMarker->platformTextMarker(), (id)endMarker->platformTextMarker(), nil];
id textMarkerRange = [m_element textMarkerRangeForMarkers:textMarkers];
- return AccessibilityTextMarkerRange::create((__bridge PlatformTextMarkerRange)textMarkerRange);
+ return AccessibilityTextMarkerRange::create(textMarkerRange);
}
RefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange* range)
{
- id textMarkers = (__bridge id)range->platformTextMarkerRange();
+ id textMarkers = (id)range->platformTextMarkerRange();
id textMarker = [m_element startOrEndTextMarkerForTextMarkers:textMarkers isStart:YES];
- return AccessibilityTextMarker::create((__bridge PlatformTextMarker)textMarker);
+ return AccessibilityTextMarker::create(textMarker);
}
RefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange* range)
{
- id textMarkers = (__bridge id)range->platformTextMarkerRange();
+ id textMarkers = (id)range->platformTextMarkerRange();
id textMarker = [m_element startOrEndTextMarkerForTextMarkers:textMarkers isStart:NO];
- return AccessibilityTextMarker::create((__bridge PlatformTextMarker)textMarker);
+ return AccessibilityTextMarker::create(textMarker);
}
RefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height)
@@ -1136,7 +1141,7 @@
RefPtr<AccessibilityUIElement> AccessibilityUIElement::accessibilityElementForTextMarker(AccessibilityTextMarker* marker)
{
- id obj = [m_element accessibilityObjectForTextMarker:(__bridge id)marker->platformTextMarker()];
+ id obj = [m_element accessibilityObjectForTextMarker:(id)marker->platformTextMarker()];
if (obj)
return AccessibilityUIElement::create(obj);
return nullptr;
@@ -1236,9 +1241,9 @@
{
NSArray *textMarkers = nil;
if (startMarker->platformTextMarker() && endMarker->platformTextMarker())
- textMarkers = [NSArray arrayWithObjects:(__bridge id)startMarker->platformTextMarker(), (__bridge id)endMarker->platformTextMarker(), nil];
+ textMarkers = [NSArray arrayWithObjects:(id)startMarker->platformTextMarker(), (id)endMarker->platformTextMarker(), nil];
id textMarkerRange = [m_element textMarkerRangeFromMarkers:textMarkers withText:[NSString stringWithJSStringRef:text]];
- return AccessibilityTextMarkerRange::create((__bridge PlatformTextMarkerRange)textMarkerRange);
+ return AccessibilityTextMarkerRange::create(textMarkerRange);
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const
@@ -1253,7 +1258,7 @@
static void _CGPathEnumerationIteration(void *info, const CGPathElement *element)
{
- NSMutableString *result = (__bridge NSMutableString *)info;
+ NSMutableString *result = (NSMutableString *)info;
switch (element->type) {
case kCGPathElementMoveToPoint:
[result appendString:@"\tMove to point\n"];
@@ -1277,7 +1282,9 @@
{
NSMutableString *result = [NSMutableString stringWithString:@"\nStart Path\n"];
CGPathRef pathRef = [m_element _accessibilityPath];
- CGPathApply(pathRef, (__bridge void*)result, _CGPathEnumerationIteration);
+
+ CGPathApply(pathRef, result, _CGPathEnumerationIteration);
+
return [result createJSStringRef];
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -83,6 +83,8 @@
JSValueUnprotect(context, m_notificationFunctionCallback);
m_notificationFunctionCallback = 0;
+
+ [super dealloc];
}
- (void)setCallback:(JSValueRef)callback
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -91,6 +91,8 @@
: m_element(element)
, m_notificationHandler(0)
{
+ // FIXME: [email protected] says ObjC objects need to be CFRetained/CFRelease to be GC-compliant on the mac.
+ [m_element retain];
}
AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
@@ -98,6 +100,7 @@
, m_element(other.m_element)
, m_notificationHandler(0)
{
+ [m_element retain];
}
AccessibilityUIElement::~AccessibilityUIElement()
@@ -104,6 +107,7 @@
{
// The notification handler should be nil because removeNotificationListener() should have been called in the test.
ASSERT(!m_notificationHandler);
+ [m_element release];
}
bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
@@ -1554,6 +1558,7 @@
ASSERT(m_notificationHandler);
[m_notificationHandler stopObserving];
+ [m_notificationHandler release];
m_notificationHandler = nil;
return true;
@@ -1822,15 +1827,16 @@
static JSStringRef createJSStringRef(id string)
{
- auto mutableString = [[NSMutableString alloc] init];
- auto attributes = [string attributesAtIndex:0 effectiveRange:nil];
- auto attributeEnumerationBlock = ^(NSDictionary<NSString *, id> *attrs, NSRange range, BOOL *stop) {
+ id mutableString = [[[NSMutableString alloc] init] autorelease];
+ id attributes = [string attributesAtIndex:0 effectiveRange:nil];
+ id attributeEnumerationBlock = ^(NSDictionary<NSString *, id> *attrs, NSRange range, BOOL *stop) {
BOOL misspelled = [[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue];
if (misspelled)
misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue];
if (misspelled)
[mutableString appendString:@"Misspelled, "];
- if (id font = [attributes objectForKey:(__bridge id)kAXFontTextAttribute])
+ id font = [attributes objectForKey:(__bridge id)kAXFontTextAttribute];
+ if (font)
[mutableString appendFormat:@"%@ - %@, ", (__bridge id)kAXFontTextAttribute, font];
};
[string enumerateAttributesInRange:NSMakeRange(0, [string length]) options:(NSAttributedStringEnumerationOptions)0 usingBlock:attributeEnumerationBlock];
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -57,6 +57,7 @@
void initializeWebViewConfiguration(const char* libraryPath, WKStringRef injectedBundlePath, WKContextRef context, WKContextConfigurationRef contextConfiguration)
{
#if WK_API_ENABLED
+ [globalWebViewConfiguration release];
globalWebViewConfiguration = [[WKWebViewConfiguration alloc] init];
globalWebViewConfiguration.processPool = (__bridge WKProcessPool *)context;
@@ -108,6 +109,7 @@
NSDictionary *resourceLogPlist = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:1], @"version", nil];
if (![resourceLogPlist writeToFile:fullBrowsingSessionResourceLog atomically:YES])
WTFCrash();
+ [resourceLogPlist release];
}
WKContextRef TestController::platformContext()
@@ -176,7 +178,7 @@
PlatformWebView* TestController::platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions& options)
{
#if WK_API_ENABLED
- WKWebViewConfiguration *newConfiguration = [globalWebViewConfiguration copy];
+ WKWebViewConfiguration *newConfiguration = [[globalWebViewConfiguration copy] autorelease];
newConfiguration._relatedWebView = static_cast<WKWebView*>(parentView->platformView());
return new PlatformWebView(newConfiguration, options);
#else
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -84,6 +84,22 @@
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ self.didStartFormControlInteractionCallback = nil;
+ self.didEndFormControlInteractionCallback = nil;
+ self.didShowForcePressPreviewCallback = nil;
+ self.didDismissForcePressPreviewCallback = nil;
+ self.willBeginZoomingCallback = nil;
+ self.didEndZoomingCallback = nil;
+ self.didShowKeyboardCallback = nil;
+ self.didHideKeyboardCallback = nil;
+ self.didEndScrollingCallback = nil;
+ self.rotationDidEndCallback = nil;
+
+ self.zoomToScaleCompletionHandler = nil;
+ self.retrieveSpeakSelectionContentCompletionHandler = nil;
+
+ [super dealloc];
}
- (void)didStartFormControlInteraction
Modified: trunk/Tools/WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -53,6 +53,10 @@
- (void)dealloc
{
_debugTouchWindow.hidden = YES;
+ [_debugTouchWindow release];
+ [_debugTouchViews release];
+
+ [super dealloc];
}
- (void)updateDebugIndicatorForTouch:(NSUInteger)index withPointInWindowCoordinates:(CGPoint)point isTouching:(BOOL)isTouching
Modified: trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -191,6 +191,15 @@
return self;
}
+- (void)dealloc
+{
+ [_eventCallbacks release];
+ [_debugTouchViews release];
+ [super dealloc];
+}
+
+
+
- (void)_sendIOHIDKeyboardEvent:(uint64_t)timestamp usage:(uint32_t)usage isKeyDown:(bool)isKeyDown
{
RetainPtr<IOHIDEventRef> eventRef = adoptCF(IOHIDEventCreateKeyboardEvent(kCFAllocatorDefault,
@@ -471,7 +480,7 @@
- (BOOL)_sendMarkerHIDEventWithCompletionBlock:(void (^)(void))completionBlock
{
auto callbackID = [HIDEventGenerator nextEventCallbackID];
- [_eventCallbacks setObject:completionBlock forKey:@(callbackID)];
+ [_eventCallbacks setObject:Block_copy(completionBlock) forKey:@(callbackID)];
auto markerEvent = adoptCF(IOHIDEventCreateVendorDefinedEvent(kCFAllocatorDefault,
mach_absolute_time(),
@@ -773,6 +782,7 @@
if (completionBlock) {
[_eventCallbacks removeObjectForKey:@(callbackID)];
completionBlock();
+ Block_release(completionBlock);
}
}
@@ -1026,6 +1036,7 @@
newTouch[HIDEventPressureKey] = @(interpolations[interpolationType]([startTouch[HIDEventPressureKey] doubleValue], [endTouch[HIDEventPressureKey] doubleValue], timeRatio));
[newTouches addObject:newTouch];
+ [newTouch release];
} else
NSLog(@"Missing End Touch with ID: %ld", (long)startTouchID);
}
@@ -1033,6 +1044,7 @@
newEvent[HIDEventTouchesKey] = newTouches;
[interpolatedEvents addObject:newEvent];
+ [newEvent release];
time += timeStep;
}
@@ -1100,10 +1112,10 @@
NSDictionary* threadData = @{
@"eventInfo": [eventInfo copy],
- @"completionBlock": [completionBlock copy]
+ @"completionBlock": [[completionBlock copy] autorelease]
};
- NSThread *eventDispatchThread = [[NSThread alloc] initWithTarget:self selector:@selector(eventDispatchThreadEntry:) object:threadData];
+ NSThread *eventDispatchThread = [[[NSThread alloc] initWithTarget:self selector:@selector(eventDispatchThreadEntry:) object:threadData] autorelease];
eventDispatchThread.qualityOfService = NSQualityOfServiceUserInteractive;
[eventDispatchThread start];
}
Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -69,6 +69,7 @@
{
allWindows.removeFirst(self);
ASSERT(!allWindows.contains(self));
+ [super dealloc];
}
- (BOOL)isKeyWindow
@@ -175,6 +176,7 @@
UIViewController *viewController = [[PlatformWebViewController alloc] init];
[m_window setRootViewController:viewController];
+ [viewController release];
m_view = [[TestRunnerWKWebView alloc] initWithFrame:viewRectForWindowRect(rect, WebViewSizingMode::Default) configuration:configuration];
@@ -185,6 +187,8 @@
PlatformWebView::~PlatformWebView()
{
m_window.platformWebView = nil;
+ [m_view release];
+ [m_window release];
}
PlatformWindow PlatformWebView::keyWindow()
@@ -266,6 +270,7 @@
UITextField* textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 100, 20)];
textField.tag = 1;
[m_window addSubview:textField];
+ [textField release];
}
void PlatformWebView::removeChromeInputField()
@@ -274,6 +279,7 @@
if (textField) {
[textField removeFromSuperview];
makeWebViewFirstResponder();
+ [textField release];
}
}
Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -86,12 +86,12 @@
void TestController::initializeInjectedBundlePath()
{
NSString *nsBundlePath = [[NSBundle mainBundle].builtInPlugInsPath stringByAppendingPathComponent:@"WebKitTestRunnerInjectedBundle.bundle"];
- m_injectedBundlePath.adopt(WKStringCreateWithCFString((__bridge CFStringRef)nsBundlePath));
+ m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath));
}
void TestController::initializeTestPluginDirectory()
{
- m_testPluginDirectory.adopt(WKStringCreateWithCFString((__bridge CFStringRef)[[NSBundle mainBundle] bundlePath]));
+ m_testPluginDirectory.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath]));
}
void TestController::platformResetPreferencesToConsistentValues()
Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -135,7 +135,7 @@
JSRetainPtr<JSStringRef> UIScriptController::accessibilitySpeakSelectionContent() const
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
- return adopt(JSStringCreateWithCFString((__bridge CFStringRef)webView.accessibilitySpeakSelectionContent));
+ return JSStringCreateWithCFString((CFStringRef)webView.accessibilitySpeakSelectionContent);
}
void UIScriptController::simulateAccessibilitySettingsChangeNotification(JSValueRef callback)
@@ -335,7 +335,7 @@
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
auto textAsCFString = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, text));
- [webView _simulateTextEntered:(__bridge NSString *)textAsCFString.get()];
+ [webView _simulateTextEntered:(NSString *)textAsCFString.get()];
}
void UIScriptController::typeCharacterUsingHardwareKeyboard(JSStringRef character, JSValueRef callback)
@@ -383,19 +383,19 @@
JSRetainPtr<JSStringRef> UIScriptController::selectFormPopoverTitle() const
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
- return adopt(JSStringCreateWithCFString((__bridge CFStringRef)webView.selectFormPopoverTitle));
+ return JSStringCreateWithCFString((CFStringRef)webView.selectFormPopoverTitle);
}
JSRetainPtr<JSStringRef> UIScriptController::textContentType() const
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
- return adopt(JSStringCreateWithCFString((__bridge CFStringRef)(webView.textContentTypeForTesting ?: @"")));
+ return JSStringCreateWithCFString((CFStringRef)(webView.textContentTypeForTesting ?: @""));
}
JSRetainPtr<JSStringRef> UIScriptController::formInputLabel() const
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
- return adopt(JSStringCreateWithCFString((__bridge CFStringRef)webView.formInputLabel));
+ return JSStringCreateWithCFString((CFStringRef)webView.formInputLabel);
}
void UIScriptController::selectFormAccessoryPickerRow(long rowIndex)
@@ -573,7 +573,7 @@
JSRetainPtr<JSStringRef> UIScriptController::scrollingTreeAsText() const
{
TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
- return adopt(JSStringCreateWithCFString((__bridge CFStringRef)[webView _scrollingTreeAsText]));
+ return JSStringCreateWithCFString((CFStringRef)[webView _scrollingTreeAsText]);
}
JSObjectRef UIScriptController::propertiesOfLayerWithID(uint64_t layerID) const
Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -110,6 +110,8 @@
{
m_window.platformWebView = nullptr;
[m_window close];
+ [m_window release];
+ [m_view release];
}
PlatformWindow PlatformWebView::keyWindow()
@@ -161,6 +163,7 @@
NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 20)];
textField.tag = 1;
[[m_window contentView] addSubview:textField];
+ [textField release];
NSView *view = platformView();
[textField setNextKeyView:view];
Modified: trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -155,7 +155,7 @@
static NSSet *allowedFontFamilySet()
{
- static NSSet *fontFamilySet = [NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@"Ahem",
@"Al Bayan",
@"American Typewriter",
@@ -277,7 +277,7 @@
@"Wingdings",
@"Zapf Dingbats",
@"Zapfino",
- nil];
+ nil] retain];
return fontFamilySet;
}
@@ -284,9 +284,9 @@
static NSSet *systemHiddenFontFamilySet()
{
- static NSSet *fontFamilySet = [NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@".LucidaGrandeUI",
- nil];
+ nil] retain];
return fontFamilySet;
}
Modified: trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -41,16 +41,24 @@
if (!self)
return nil;
- _draggedImage = image;
- _draggingPasteboard = pasteboard;
- _draggingSource = source;
+ _draggedImage = [image retain];
+ _draggingPasteboard = [pasteboard retain];
+ _draggingSource = [source retain];
_offset = offset;
return self;
}
-- (NSWindow *)draggingDestinationWindow
+- (void)dealloc
{
+ [_draggedImage release];
+ [_draggingPasteboard release];
+ [_draggingSource release];
+ [super dealloc];
+}
+
+- (NSWindow *)draggingDestinationWindow
+{
return [TestController::singleton().mainWebView()->platformView() window];
}
Modified: trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2018 Apple, Inc. All rights reserved.
+ * Copyright (C) 2005-2018 Apple, Inc. All rights reserved.
* Copyright (C) 2007 Graham Dennis ([email protected])
* Copyright (C) 2007 Eric Seidel <[email protected]>
*
@@ -28,6 +28,7 @@
#include "config.h"
#include "WebKitTestRunnerPasteboard.h"
+#include <objc/runtime.h>
#include <wtf/RetainPtr.h>
@interface LocalPasteboard : NSPasteboard
@@ -42,11 +43,6 @@
-(id)initWithName:(NSString *)name;
@end
-@interface NSPasteboard (SuperHelpers)
-+ (instancetype)superAlloc;
-+ (instancetype)superAllocWithZone:(NSZone *)zone;
-@end
-
static NSMutableDictionary *localPasteboards;
@implementation WebKitTestRunnerPasteboard
@@ -64,6 +60,7 @@
return pasteboard;
pasteboard = [[LocalPasteboard alloc] initWithName:name];
[localPasteboards setObject:pasteboard forKey:name];
+ [pasteboard release];
return pasteboard;
}
@@ -75,6 +72,7 @@
+ (void)releaseLocalPasteboards
{
+ [localPasteboards release];
localPasteboards = nil;
}
@@ -87,34 +85,14 @@
@end
-@implementation NSPasteboard (SuperHelpers)
-
-+ (instancetype)superAlloc
-{
- return [super alloc];
-}
-
-+ (instancetype)superAllocWithZone:(NSZone *)zone
-{
- return [super allocWithZone:zone];
-}
-
-@end
-
@implementation LocalPasteboard
+ (id)alloc
{
// Need to skip over [NSPasteboard alloc], which won't allocate a new object.
- return [self superAlloc];
+ return class_createInstance(self, 0);
}
-+ (id)allocWithZone:(NSZone *)zone
-{
- // Need to skip over [NSPasteboard allocWithZone:], which won't allocate a new object.
- return [self superAllocWithZone:zone];
-}
-
- (id)initWithName:(NSString *)name
{
self = [super init];
@@ -127,6 +105,15 @@
return self;
}
+- (void)dealloc
+{
+ [typesArray release];
+ [typesSet release];
+ [dataByType release];
+ [pasteboardName release];
+ [super dealloc];
+}
+
- (NSString *)name
{
return pasteboardName;
@@ -155,6 +142,7 @@
setType = [type copy];
[typesArray addObject:setType];
[typesSet addObject:setType];
+ [setType release];
}
if (newOwner && [newOwner respondsToSelector:@selector(pasteboard:provideDataForType:)])
[newOwner pasteboard:self provideDataForType:setType];
Modified: trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerWindow.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerWindow.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/WebKitTestRunnerWindow.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -54,6 +54,7 @@
{
allWindows.removeFirst(self);
ASSERT(!allWindows.contains(self));
+ [super dealloc];
}
- (BOOL)isKeyWindow
Modified: trunk/Tools/WebKitTestRunner/mac/main.mm (235836 => 235837)
--- trunk/Tools/WebKitTestRunner/mac/main.mm 2018-09-09 05:02:34 UTC (rev 235836)
+++ trunk/Tools/WebKitTestRunner/mac/main.mm 2018-09-09 17:55:00 UTC (rev 235837)
@@ -53,7 +53,7 @@
static void disableAppNapInUIProcess()
{
NSActivityOptions options = (NSActivityUserInitiatedAllowingIdleSystemSleep | NSActivityLatencyCritical) & ~(NSActivitySuddenTerminationDisabled | NSActivityAutomaticTerminationDisabled);
- static id assertion = [[NSProcessInfo processInfo] beginActivityWithOptions:options reason:@"WebKitTestRunner should not be subject to process suppression"];
+ static id assertion = [[[NSProcessInfo processInfo] beginActivityWithOptions:options reason:@"WebKitTestRunner should not be subject to process suppression"] retain];
ASSERT_UNUSED(assertion, assertion);
}