[WebEditingTester] ARC-ify WebEditingTester
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 19:15:48 +0000 (19:15 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 19:15:48 +0000 (19:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141827

Reviewed by Sam Weinig.

* WebEditingTester/AppDelegate.m:
(-[WebEditingAppDelegate showOperations:]):
* WebEditingTester/EditingOperations.m:
(editingOperations):
* WebEditingTester/WK1WebDocumentController.m:
(-[WK1WebDocumentController dealloc]): Deleted.
* WebEditingTester/WK2WebDocumentController.m:
(-[WK2WebDocumentController dealloc]): Deleted.
* WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj:
Turn on ARC and remove a few retain/release/autorelease calls.
We don't need to implement dealloc in either document controller
because WebView and WKWebView's UIDelegate property does not hold a
strong reference.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180427 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebEditingTester/AppDelegate.m
Tools/WebEditingTester/WK1WebDocumentController.m
Tools/WebEditingTester/WK2WebDocumentController.m
Tools/WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj

index a1edfe9..3245f0d 100644 (file)
@@ -1,5 +1,26 @@
 2015-02-20  Timothy Horton  <timothy_horton@apple.com>
 
+        [WebEditingTester] ARC-ify WebEditingTester
+        https://bugs.webkit.org/show_bug.cgi?id=141827
+
+        Reviewed by Sam Weinig.
+
+        * WebEditingTester/AppDelegate.m:
+        (-[WebEditingAppDelegate showOperations:]):
+        * WebEditingTester/EditingOperations.m:
+        (editingOperations):
+        * WebEditingTester/WK1WebDocumentController.m:
+        (-[WK1WebDocumentController dealloc]): Deleted.
+        * WebEditingTester/WK2WebDocumentController.m:
+        (-[WK2WebDocumentController dealloc]): Deleted.
+        * WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj:
+        Turn on ARC and remove a few retain/release/autorelease calls.
+        We don't need to implement dealloc in either document controller
+        because WebView and WKWebView's UIDelegate property does not hold a
+        strong reference.
+
+2015-02-20  Timothy Horton  <timothy_horton@apple.com>
+
         [WebEditingTester] Factor out list of editing operations
         https://bugs.webkit.org/show_bug.cgi?id=141826
 
index 0ff38a4..5295b93 100644 (file)
@@ -120,7 +120,7 @@ static WKWebViewConfiguration *defaultConfiguration()
                 y = firstY - 16;
                 x += maxWidth;
             }
-            NSButton *button = [[[NSButton alloc] initWithFrame:NSMakeRect(x, y, maxWidth, 16)] autorelease];
+            NSButton *button = [[NSButton alloc] initWithFrame:NSMakeRect(x, y, maxWidth, 16)];
             [button setBezelStyle:NSRoundedBezelStyle];
             [button.cell setControlSize:NSMiniControlSize];
             [button setFont:font];
index 0c548f1..af9ed66 100644 (file)
     [[_webView mainFrame] loadHTMLString:[self defaultEditingSource] baseURL:nil];    
 }
 
-- (void)dealloc
-{
-    [_webView setUIDelegate:nil];
-    [_webView release];
-    
-    [super dealloc];
-}
-
 - (IBAction)pasteAsMarkup:(id)sender
 {
     // FIXME: This is probably incorrect, should use WebArchive
index f6f3499..56f1bbe 100644 (file)
     [self.window setTitle:@"WebEditor [WK2]"];
 }
 
-- (void)dealloc
-{
-    [_webView setUIDelegate:nil];
-    [_webView release];
-    [_configuration release];
-    
-    [super dealloc];
-}
-
 - (void)loadContent
 {
     [_webView loadHTMLString:[self defaultEditingSource] baseURL:nil];
index 2513723..08b3adf 100644 (file)
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               CLANG_ENABLE_OBJC_ARC = YES;
                                COMBINE_HIDPI_IMAGES = YES;
                                INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               CLANG_ENABLE_OBJC_ARC = YES;
                                COMBINE_HIDPI_IMAGES = YES;
                                INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
                                LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";