[Cleanup] Modernize TrailingObjects
[WebKit-https.git] / Tools / WebEditingTester / WK1WebDocumentController.m
index 8906075..57f79da 100644 (file)
 #import <WebKit/WebPreferenceKeysPrivate.h>
 #import <WebKit/WebViewPrivate.h>
 
-@implementation WK1WebDocumentController {
-    WebView *_webView;
-}
+@interface WK1WebDocumentController () <WebUIDelegate>
+@property (nonatomic, strong) WebView *webView;
+@end
+
+@implementation WK1WebDocumentController
 
 - (void)awakeFromNib
 {
-    _webView = [[WebView alloc] initWithFrame:[containerView bounds] frameName:nil groupName:@"WebEditingTester"];
-    [_webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
+    self.webView = [[WebView alloc] initWithFrame:[containerView bounds] frameName:nil groupName:@"WebEditingTester"];
+    _webView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
     
-    [_webView setEditable:YES];
-    [_webView setUIDelegate:self];
+    _webView.editable = YES;
+    _webView.UIDelegate = self;
     
-    [[WebPreferences standardPreferences] setFullScreenEnabled:YES];
-    [[WebPreferences standardPreferences] setDeveloperExtrasEnabled:YES];
-    [[WebPreferences standardPreferences] setImageControlsEnabled:YES];
-    [[WebPreferences standardPreferences] setServiceControlsEnabled:YES];
+    WebPreferences *preferences = [WebPreferences standardPreferences];
+    preferences.fullScreenEnabled = YES;
+    preferences.developerExtrasEnabled = YES;
+    preferences.imageControlsEnabled = YES;
+    preferences.serviceControlsEnabled = YES;
     
-    [self.window setTitle:@"WebEditor [WK1]"];
+    self.window.title = @"WebEditor [WK1]";
     [containerView addSubview:_webView];
 }
 
 - (void)loadHTMLString:(NSString *)content
 {
-    [[_webView mainFrame] loadHTMLString:content baseURL:nil];
+    [_webView.mainFrame loadHTMLString:content baseURL:nil];
 }
 
 - (IBAction)pasteAsMarkup:(id)sender