Changeset 162505 in webkit


Ignore:
Timestamp:
Jan 21, 2014 10:18:19 PM (10 years ago)
Author:
timothy_horton@apple.com
Message:

[wk2] De-.get()ify receivers of Objective-C messages
https://bugs.webkit.org/show_bug.cgi?id=127398

Reviewed by Sam Weinig.

RetainPtr does the right thing when you use it as the
receiver of an Obj-C message, so we don't need .get().

Long and useless file list elided.

Location:
trunk/Source/WebKit2
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r162501 r162505  
     12014-01-21  Tim Horton  <timothy_horton@apple.com>
     2
     3        [wk2] De-.get()ify receivers of Objective-C messages
     4        https://bugs.webkit.org/show_bug.cgi?id=127398
     5
     6        Reviewed by Sam Weinig.
     7
     8        RetainPtr does the right thing when you use it as the
     9        receiver of an Obj-C message, so we don't need .get().
     10
     11        Long and useless file list elided.
     12
    1132014-01-21  Brady Eidson  <beidson@apple.com>
    214
  • trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm

    r161148 r162505  
    6464
    6565    // FIXME: Allow this to be changed by the client.
    66     [m_nsURLDownload.get() setDeletesFileUponFailure:NO];
     66    [m_nsURLDownload setDeletesFileUponFailure:NO];
    6767}
    6868
     
    8080
    8181    // FIXME: Allow this to be changed by the client.
    82     [m_nsURLDownload.get() setDeletesFileUponFailure:NO];
     82    [m_nsURLDownload setDeletesFileUponFailure:NO];
    8383}
    8484
    8585void Download::cancel()
    8686{
    87     [m_nsURLDownload.get() cancel];
    88 
    89     RetainPtr<NSData> resumeData = [m_nsURLDownload.get() resumeData];
    90     didCancel(IPC::DataReference(reinterpret_cast<const uint8_t*>([resumeData.get() bytes]), [resumeData.get() length]));
     87    [m_nsURLDownload cancel];
     88
     89    RetainPtr<NSData> resumeData = [m_nsURLDownload resumeData];
     90    didCancel(IPC::DataReference(reinterpret_cast<const uint8_t*>([resumeData bytes]), [resumeData length]));
    9191}
    9292
     
    9696    ASSERT(m_delegate);
    9797
    98     [m_delegate.get() invalidate];
     98    [m_delegate invalidate];
    9999    m_delegate = nullptr;
    100100    m_nsURLDownload = nullptr;
     
    264264
    265265        RetainPtr<NSData> resumeData = [download resumeData];
    266         IPC::DataReference dataReference(reinterpret_cast<const uint8_t*>([resumeData.get() bytes]), [resumeData.get() length]);
     266        IPC::DataReference dataReference(reinterpret_cast<const uint8_t*>([resumeData bytes]), [resumeData length]);
    267267
    268268        _download->didFail(error, dataReference);
  • trunk/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm

    r161148 r162505  
    217217
    218218    dispatchOnResourceLoaderRunLoop(^ {
    219         [[protocol.get() client] URLProtocol:protocol.get() didFailWithError:nsError.get()];
     219        [[protocol client] URLProtocol:protocol.get() didFailWithError:nsError.get()];
    220220    });
    221221
     
    232232
    233233    dispatchOnResourceLoaderRunLoop(^ {
    234         [[protocol.get() client] URLProtocol:protocol.get() didLoadData:nsData.get()];
     234        [[protocol client] URLProtocol:protocol.get() didLoadData:nsData.get()];
    235235    });
    236236}
     
    245245
    246246    dispatchOnResourceLoaderRunLoop(^ {
    247         [[protocol.get() client] URLProtocol:protocol.get() didReceiveResponse:nsResponse.get() cacheStoragePolicy:static_cast<NSURLCacheStoragePolicy>(cacheStoragePolicy)];
     247        [[protocol client] URLProtocol:protocol.get() didReceiveResponse:nsResponse.get() cacheStoragePolicy:static_cast<NSURLCacheStoragePolicy>(cacheStoragePolicy)];
    248248    });
    249249}
     
    256256
    257257    dispatchOnResourceLoaderRunLoop(^ {
    258         [[protocol.get() client] URLProtocolDidFinishLoading:protocol.get()];
     258        [[protocol client] URLProtocolDidFinishLoading:protocol.get()];
    259259    });
    260260
  • trunk/Source/WebKit2/Shared/mac/ArgumentCodersMac.mm

    r161309 r162505  
    250250        return false;
    251251
    252     NSUInteger stringLength = [plainString.get() length];
     252    NSUInteger stringLength = [plainString length];
    253253
    254254    RetainPtr<NSMutableAttributedString> resultString = adoptNS([[NSMutableAttributedString alloc] initWithString:plainString.get()]);
     
    274274        if (!IPC::decode(decoder, attributes))
    275275            return false;
    276         [resultString.get() addAttributes:attributes.get() range:NSMakeRange(rangeLocation, rangeLength)];
     276        [resultString addAttributes:attributes.get() range:NSMakeRange(rangeLocation, rangeLength)];
    277277    }
    278278
     
    341341            return false;
    342342
    343         [dictionary.get() setObject:value.get() forKey:key.get()];
     343        [dictionary setObject:value.get() forKey:key.get()];
    344344    }
    345345
     
    426426            return false;
    427427
    428         [array.get() addObject:value.get()];
     428        [array addObject:value.get()];
    429429    }
    430430
  • trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm

    r161148 r162505  
    194194                    return false;
    195195
    196                 [array.get() addObject:value.get()];
     196                [array addObject:value.get()];
    197197            }
    198198
     
    218218                    return false;
    219219
    220                 [dictionary.get() setObject:value.get() forKey:key.get()];
     220                [dictionary setObject:value.get() forKey:key.get()];
    221221            }
    222222
  • trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm

    r161950 r162505  
    110110
    111111    if (_requestsWaitingForCoreLocationStart.isEmpty() && _requestsInWarmUp.isEmpty()) {
    112         [_coreLocationProvider.get() stop];
     112        [_coreLocationProvider stop];
    113113        _lastActivePosition.clear();
    114114    }
     
    119119{
    120120    _isWebCoreGeolocationActive = YES;
    121     [_coreLocationProvider.get() start];
     121    [_coreLocationProvider start];
    122122
    123123    // If we have the last position, it is from the initialization or warm up. It is the last known
     
    135135-(void)_setEnableHighAccuracy:(BOOL)enableHighAccuracy
    136136{
    137     [_coreLocationProvider.get() setEnableHighAccuracy:enableHighAccuracy];
     137    [_coreLocationProvider setEnableHighAccuracy:enableHighAccuracy];
    138138}
    139139
     
    173173    geolocationRequestData.window = window;
    174174    _requestsWaitingForCoreLocationStart.append(geolocationRequestData);
    175     [_coreLocationProvider.get() start];
     175    [_coreLocationProvider start];
    176176}
    177177@end
     
    264264- (void)deny
    265265{
    266     [_provider.get() permissionDenied:_permissionRequestProxy.get()];
     266    [_provider permissionDenied:_permissionRequestProxy.get()];
    267267    _permissionRequestProxy->deny();
    268268}
  • trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm

    r162175 r162505  
    308308    if (!_highlightView) {
    309309        _highlightView = adoptNS([[_UIHighlightView alloc] initWithFrame:CGRectZero]);
    310         [_highlightView.get() setOpaque:NO];
    311         [_highlightView.get() setCornerRadius:UIWebViewMinimumHighlightRadius];
     310        [_highlightView setOpaque:NO];
     311        [_highlightView setCornerRadius:UIWebViewMinimumHighlightRadius];
    312312    }
    313313    [self addSubview:_highlightView.get()];
    314314
    315315    RetainPtr<UIColor> highlightUIKitColor = adoptNS([[UIColor alloc] initWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)]);
    316     [_highlightView.get() setColor:highlightUIKitColor.get()];
     316    [_highlightView setColor:highlightUIKitColor.get()];
    317317
    318318    bool allHighlightRectsAreRectilinear = true;
     
    334334    CGRect boundaryRect = [self frame];
    335335    if (allHighlightRectsAreRectilinear)
    336         [_highlightView.get() setFrames:rects.get() boundaryRect:boundaryRect];
     336        [_highlightView setFrames:rects.get() boundaryRect:boundaryRect];
    337337    else {
    338338        RetainPtr<NSMutableArray> quads = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
     
    340340            const FloatQuad& quad = highlightedQuads[i];
    341341            FloatQuad extendedQuad = inflateQuad(quad, UIWebViewMinimumHighlightRadius);
    342             [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p1()]];
    343             [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p2()]];
    344             [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p3()]];
    345             [quads.get() addObject:[NSValue valueWithCGPoint:extendedQuad.p4()]];
     342            [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p1()]];
     343            [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p2()]];
     344            [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p3()]];
     345            [quads addObject:[NSValue valueWithCGPoint:extendedQuad.p4()]];
    346346        }
    347         [_highlightView.get() setQuads:quads.get() boundaryRect:boundaryRect];
     347        [_highlightView setQuads:quads.get() boundaryRect:boundaryRect];
    348348    }
    349349
    350350    RetainPtr<NSMutableArray> borderRadii = adoptNS([[NSMutableArray alloc] initWithCapacity:4]);
    351     [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(topLeftRadius.width() + UIWebViewMinimumHighlightRadius, topLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
    352     [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(topRightRadius.width() + UIWebViewMinimumHighlightRadius, topRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
    353     [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(bottomLeftRadius.width() + UIWebViewMinimumHighlightRadius, bottomLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
    354     [borderRadii.get() addObject:[NSValue valueWithCGSize:CGSizeMake(bottomRightRadius.width() + UIWebViewMinimumHighlightRadius, bottomRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
    355     [_highlightView.get() setCornerRadii:borderRadii.get()];
     351    [borderRadii addObject:[NSValue valueWithCGSize:CGSizeMake(topLeftRadius.width() + UIWebViewMinimumHighlightRadius, topLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
     352    [borderRadii addObject:[NSValue valueWithCGSize:CGSizeMake(topRightRadius.width() + UIWebViewMinimumHighlightRadius, topRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
     353    [borderRadii addObject:[NSValue valueWithCGSize:CGSizeMake(bottomLeftRadius.width() + UIWebViewMinimumHighlightRadius, bottomLeftRadius.height() + UIWebViewMinimumHighlightRadius)]];
     354    [borderRadii addObject:[NSValue valueWithCGSize:CGSizeMake(bottomRightRadius.width() + UIWebViewMinimumHighlightRadius, bottomRightRadius.height() + UIWebViewMinimumHighlightRadius)]];
     355    [_highlightView setCornerRadii:borderRadii.get()];
    356356}
    357357
    358358- (void)_cancelLongPressGestureRecognizer
    359359{
    360     [_highlightLongPressGestureRecognizer.get() cancel];
     360    [_highlightLongPressGestureRecognizer cancel];
    361361}
    362362
     
    500500{
    501501    _isTapHighlightIDValid = NO;
    502     [_highlightView.get() removeFromSuperview];
     502    [_highlightView removeFromSuperview];
    503503}
    504504
  • trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm

    r156860 r162505  
    151151                                                                  defer:NO]);
    152152
    153     [m_findIndicatorWindow.get() setBackgroundColor:[NSColor clearColor]];
    154     [m_findIndicatorWindow.get() setOpaque:NO];
    155     [m_findIndicatorWindow.get() setIgnoresMouseEvents:YES];
     153    [m_findIndicatorWindow setBackgroundColor:[NSColor clearColor]];
     154    [m_findIndicatorWindow setOpaque:NO];
     155    [m_findIndicatorWindow setIgnoresMouseEvents:YES];
    156156
    157157    RetainPtr<WKFindIndicatorView> findIndicatorView = adoptNS([[WKFindIndicatorView alloc] _initWithFindIndicator:m_findIndicator]);
    158     [m_findIndicatorWindow.get() setContentView:findIndicatorView.get()];
     158    [m_findIndicatorWindow setContentView:findIndicatorView.get()];
    159159
    160160    [[m_wkView window] addChildWindow:m_findIndicatorWindow.get() ordered:NSWindowAbove];
    161     [m_findIndicatorWindow.get() setReleasedWhenClosed:NO];
     161    [m_findIndicatorWindow setReleasedWhenClosed:NO];
    162162
    163163    if (animate) {
     
    168168                                                                            animationProgressCallback:&FindIndicatorWindow::bounceAnimationCallback
    169169                                                                              animationDidEndCallback:&FindIndicatorWindow::bounceAnimationDidEnd]);
    170         [m_bounceAnimation.get() startAnimation];
     170        [m_bounceAnimation startAnimation];
    171171    }
    172172
     
    183183
    184184    if (m_fadeOutAnimation) {
    185         [m_fadeOutAnimation.get() stopAnimation];
     185        [m_fadeOutAnimation stopAnimation];
    186186        m_fadeOutAnimation = nullptr;
    187187    }
    188188
    189189    if (m_bounceAnimation) {
    190         [m_bounceAnimation.get() stopAnimation];
     190        [m_bounceAnimation stopAnimation];
    191191        m_bounceAnimation = nullptr;
    192192    }
     
    195195        WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext);
    196196   
    197     [[m_findIndicatorWindow.get() parentWindow] removeChildWindow:m_findIndicatorWindow.get()];
    198     [m_findIndicatorWindow.get() close];
     197    [[m_findIndicatorWindow parentWindow] removeChildWindow:m_findIndicatorWindow.get()];
     198    [m_findIndicatorWindow close];
    199199    m_findIndicatorWindow = nullptr;
    200200}
     
    208208                                                                           animationProgressCallback:&FindIndicatorWindow::fadeOutAnimationCallback
    209209                                                                             animationDidEndCallback:&FindIndicatorWindow::fadeOutAnimationDidEnd]);
    210     [m_fadeOutAnimation.get() startAnimation];
     210    [m_fadeOutAnimation startAnimation];
    211211}
    212212                       
     
    215215    ASSERT(m_fadeOutAnimation);
    216216
    217     [m_findIndicatorWindow.get() setAlphaValue:1.0 - progress];
     217    [m_findIndicatorWindow setAlphaValue:1.0 - progress];
    218218}
    219219
  • trunk/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm

    r161002 r162505  
    7777- (void)_setAutodisplay:(BOOL)newState
    7878{
    79     if (!newState && [[_wkView.get() window] isAutodisplay])
    80         [_wkView.get() displayIfNeeded];
     79    if (!newState && [[_wkView window] isAutodisplay])
     80        [_wkView displayIfNeeded];
    8181   
    82     [[_wkView.get() window] setAutodisplay:newState];
     82    [[_wkView window] setAutodisplay:newState];
    8383
    8484    // For some reason, painting doesn't happen for a long time without this call, <rdar://problem/8975229>.
    8585    if (newState)
    86         [_wkView.get() displayIfNeeded];
     86        [_wkView displayIfNeeded];
    8787}
    8888
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r162454 r162505  
    16061606    if (actualRange) {
    16071607        *actualRange = nsRange;
    1608         actualRange->length = [result.string.get() length];
    1609     }
    1610 
    1611     LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> \"%@\"", nsRange.location, nsRange.length, [result.string.get() string]);
    1612     return [[result.string.get() retain] autorelease];
     1608        actualRange->length = [result.string length];
     1609    }
     1610
     1611    LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> \"%@\"", nsRange.location, nsRange.length, [result.string string]);
     1612    return [[result.string retain] autorelease];
    16131613}
    16141614
     
    22032203       
    22042204    ColorSpaceData colorSpaceData;
    2205     colorSpaceData.cgColorSpace = [_data->_colorSpace.get() CGColorSpace];
     2205    colorSpaceData.cgColorSpace = [_data->_colorSpace CGColorSpace];
    22062206
    22072207    return colorSpaceData;   
     
    25862586    RetainPtr<NSMutableArray> types = adoptNS([[NSMutableArray alloc] initWithObjects:NSFilesPromisePboardType, nil]);
    25872587   
    2588     [types.get() addObjectsFromArray:archiveBuffer ? PasteboardTypes::forImagesWithArchive() : PasteboardTypes::forImages()];
     2588    [types addObjectsFromArray:archiveBuffer ? PasteboardTypes::forImagesWithArchive() : PasteboardTypes::forImages()];
    25892589    [pasteboard declareTypes:types.get() owner:self];
    25902590    if (!matchesExtensionOrEquivalent(filename, extension))
     
    26772677   
    26782678    // FIXME: Report an error if we fail to create a file.
    2679     NSString *path = [[dropDestination path] stringByAppendingPathComponent:[wrapper.get() preferredFilename]];
     2679    NSString *path = [[dropDestination path] stringByAppendingPathComponent:[wrapper preferredFilename]];
    26802680    path = pathWithUniqueFilenameForPath(path);
    26812681    if (![wrapper writeToURL:[NSURL fileURLWithPath:path] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr])
     
    27662766    RetainPtr<WKResponderChainSink> sink = adoptNS([[WKResponderChainSink alloc] initWithResponderChain:self]);
    27672767    [super doCommandBySelector:selector];
    2768     [sink.get() detach];
    2769     return ![sink.get() didReceiveUnhandledCommand];
     2768    [sink detach];
     2769    return ![sink didReceiveUnhandledCommand];
    27702770}
    27712771
  • trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm

    r161148 r162505  
    272272   
    273273    m_placeholderWindow = adoptNS([[WKPlaceholderModalWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
    274     [m_placeholderWindow.get() setReleasedWhenClosed:NO];
     274    [m_placeholderWindow setReleasedWhenClosed:NO];
    275275   
    276276    m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationWillBecomeActiveNotification object:NSApp queue:nil
     
    283283    [NSApp runModalForWindow:m_placeholderWindow.get()];
    284284   
    285     [m_placeholderWindow.get() orderOut:nil];
     285    [m_placeholderWindow orderOut:nil];
    286286    m_placeholderWindow = nullptr;
    287287}
  • trunk/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm

    r149255 r162505  
    119119
    120120    NSSpellChecker* spellChecker = [NSSpellChecker sharedSpellChecker];
    121     NSInteger documentTag = [m_view.get() spellCheckerDocumentTag];
     121    NSInteger documentTag = [m_view spellCheckerDocumentTag];
    122122   
    123123    switch (correctionIndicatorType) {
     
    142142    }
    143143
    144     [m_view.get() handleAcceptedAlternativeText:acceptedReplacement];
     144    [m_view handleAcceptedAlternativeText:acceptedReplacement];
    145145    m_view.clear();
    146146    if (acceptedReplacement)
  • trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm

    r149476 r162505  
    419419    for (size_t i = 0; i < grammarDetail.guesses.size(); ++i) {
    420420        NSString *guess = grammarDetail.guesses[i];
    421         [corrections.get() addObject:guess];
     421        [corrections addObject:guess];
    422422    }
    423423
  • trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

    r160296 r162505  
    168168    NSRect screenFrame = [[window screen] frame];
    169169    [window setFrame:screenFrame display:YES];
    170     [_backgroundWindow.get() setFrame:screenFrame display:YES];
     170    [_backgroundWindow setFrame:screenFrame display:YES];
    171171}
    172172
     
    236236    if (!_webViewPlaceholder) {
    237237        _webViewPlaceholder = adoptNS([[WebCoreFullScreenPlaceholderView alloc] initWithFrame:[_webView frame]]);
    238         [_webViewPlaceholder.get() setAction:@selector(cancelOperation:)];
    239     }
    240     [_webViewPlaceholder.get() setTarget:nil];
    241     [_webViewPlaceholder.get() setContents:(id)webViewContents.get()];
     238        [_webViewPlaceholder setAction:@selector(cancelOperation:)];
     239    }
     240    [_webViewPlaceholder setTarget:nil];
     241    [_webViewPlaceholder setContents:(id)webViewContents.get()];
    242242    [self _replaceView:_webView with:_webViewPlaceholder.get()];
    243243   
     
    287287        WKWindowSetClipRect([self window], windowBounds);
    288288
    289         [_fadeAnimation.get() stopAnimation];
    290         [_fadeAnimation.get() setWindow:nil];
     289        [_fadeAnimation stopAnimation];
     290        [_fadeAnimation setWindow:nil];
    291291        _fadeAnimation = nullptr;
    292292       
    293         [_backgroundWindow.get() orderOut:self];
    294         [_backgroundWindow.get() setFrame:NSZeroRect display:YES];
    295 
    296         [_webViewPlaceholder.get() setExitWarningVisible:YES];
    297         [_webViewPlaceholder.get() setTarget:self];
     293        [_backgroundWindow orderOut:self];
     294        [_backgroundWindow setFrame:NSZeroRect display:YES];
     295
     296        [_webViewPlaceholder setExitWarningVisible:YES];
     297        [_webViewPlaceholder setTarget:self];
    298298    } else {
    299299        // Transition to fullscreen failed. Clean up.
    300300        _fullScreenState = NotInFullScreen;
    301301
    302         [_scaleAnimation.get() stopAnimation];
    303 
    304         [_backgroundWindow.get() orderOut:self];
    305         [_backgroundWindow.get() setFrame:NSZeroRect display:YES];
     302        [_scaleAnimation stopAnimation];
     303
     304        [_backgroundWindow orderOut:self];
     305        [_backgroundWindow setFrame:NSZeroRect display:YES];
    306306
    307307        [[self window] setAutodisplay:YES];
     
    325325{
    326326    if (_watchdogTimer) {
    327         [_watchdogTimer.get() invalidate];
     327        [_watchdogTimer invalidate];
    328328        _watchdogTimer.clear();
    329329    }
     
    333333    _fullScreenState = WaitingToExitFullScreen;
    334334
    335     [_webViewPlaceholder.get() setExitWarningVisible:NO];
     335    [_webViewPlaceholder setExitWarningVisible:NO];
    336336
    337337    // Screen updates to be re-enabled in _startExitFullScreenAnimationWithDuration: or beganExitFullScreenWithInitialFrame:finalFrame:
     
    342342    // We will resume the normal behavior in _startExitFullScreenAnimationWithDuration:
    343343    [_webView _setSuppressVisibilityUpdates:YES];
    344     [_webViewPlaceholder.get() setTarget:nil];
     344    [_webViewPlaceholder setTarget:nil];
    345345
    346346    [self _manager]->setAnimatingFullScreen(true);
     
    378378    // Screen updates to be re-enabled in completeFinishExitFullScreenAnimationAfterRepaint.
    379379    NSDisableScreenUpdates();
    380     [[_webViewPlaceholder.get() window] setAutodisplay:NO];
     380    [[_webViewPlaceholder window] setAutodisplay:NO];
    381381
    382382    NSResponder *firstResponder = [[self window] firstResponder];
     
    391391    [[self window] setFrame:NSZeroRect display:YES];
    392392
    393     [_fadeAnimation.get() stopAnimation];
    394     [_fadeAnimation.get() setWindow:nil];
     393    [_fadeAnimation stopAnimation];
     394    [_fadeAnimation setWindow:nil];
    395395    _fadeAnimation = nullptr;
    396396
    397     [_backgroundWindow.get() orderOut:self];
    398     [_backgroundWindow.get() setFrame:NSZeroRect display:YES];
     397    [_backgroundWindow orderOut:self];
     398    [_backgroundWindow setFrame:NSZeroRect display:YES];
    399399
    400400    [[_webView window] makeKeyAndOrderFront:self];
     
    556556    _scaleAnimation = adoptNS([[WebWindowScaleAnimation alloc] initWithHintedDuration:duration window:[self window] initalFrame:initialWindowFrame finalFrame:screenFrame]);
    557557   
    558     [_scaleAnimation.get() setAnimationBlockingMode:NSAnimationNonblocking];
    559     [_scaleAnimation.get() setCurrentProgress:0];
    560     [_scaleAnimation.get() startAnimation];
     558    [_scaleAnimation setAnimationBlockingMode:NSAnimationNonblocking];
     559    [_scaleAnimation setCurrentProgress:0];
     560    [_scaleAnimation startAnimation];
    561561
    562562    // WKWindowSetClipRect takes window coordinates, so convert from screen coordinates here:
     
    578578        _backgroundWindow = createBackgroundFullscreenWindow(screenFrame);
    579579    else
    580         [_backgroundWindow.get() setFrame:screenFrame display:NO];
     580        [_backgroundWindow setFrame:screenFrame display:NO];
    581581
    582582    CGFloat currentAlpha = 0;
    583583    if (_fadeAnimation) {
    584         currentAlpha = [_fadeAnimation.get() currentAlpha];
    585         [_fadeAnimation.get() stopAnimation];
    586         [_fadeAnimation.get() setWindow:nil];
     584        currentAlpha = [_fadeAnimation currentAlpha];
     585        [_fadeAnimation stopAnimation];
     586        [_fadeAnimation setWindow:nil];
    587587    }
    588588
     
    591591                                                               initialAlpha:currentAlpha
    592592                                                                 finalAlpha:1]);
    593     [_fadeAnimation.get() setAnimationBlockingMode:NSAnimationNonblocking];
    594     [_fadeAnimation.get() setCurrentProgress:0];
    595     [_fadeAnimation.get() startAnimation];
    596 
    597     [_backgroundWindow.get() orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
     593    [_fadeAnimation setAnimationBlockingMode:NSAnimationNonblocking];
     594    [_fadeAnimation setCurrentProgress:0];
     595    [_fadeAnimation startAnimation];
     596
     597    [_backgroundWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
    598598
    599599    [_webView _setSuppressVisibilityUpdates:NO];
     
    616616    NSRect initialWindowFrame = windowFrameFromApparentFrames(screenFrame, _initialFrame, _finalFrame);
    617617
    618     NSRect currentFrame = _scaleAnimation ? [_scaleAnimation.get() currentFrame] : [[self window] frame];
     618    NSRect currentFrame = _scaleAnimation ? [_scaleAnimation currentFrame] : [[self window] frame];
    619619    _scaleAnimation = adoptNS([[WebWindowScaleAnimation alloc] initWithHintedDuration:duration window:[self window] initalFrame:currentFrame finalFrame:initialWindowFrame]);
    620620
    621     [_scaleAnimation.get() setAnimationBlockingMode:NSAnimationNonblocking];
    622     [_scaleAnimation.get() setCurrentProgress:0];
    623     [_scaleAnimation.get() startAnimation];
     621    [_scaleAnimation setAnimationBlockingMode:NSAnimationNonblocking];
     622    [_scaleAnimation setCurrentProgress:0];
     623    [_scaleAnimation startAnimation];
    624624
    625625    if (!_backgroundWindow)
    626626        _backgroundWindow = createBackgroundFullscreenWindow(screenFrame);
    627627    else
    628         [_backgroundWindow.get() setFrame:screenFrame display:NO];
     628        [_backgroundWindow setFrame:screenFrame display:NO];
    629629
    630630    CGFloat currentAlpha = 1;
    631631    if (_fadeAnimation) {
    632         currentAlpha = [_fadeAnimation.get() currentAlpha];
    633         [_fadeAnimation.get() stopAnimation];
    634         [_fadeAnimation.get() setWindow:nil];
     632        currentAlpha = [_fadeAnimation currentAlpha];
     633        [_fadeAnimation stopAnimation];
     634        [_fadeAnimation setWindow:nil];
    635635    }
    636636    _fadeAnimation = adoptNS([[WebWindowFadeAnimation alloc] initWithDuration:duration
     
    638638                                                               initialAlpha:currentAlpha
    639639                                                                 finalAlpha:0]);
    640     [_fadeAnimation.get() setAnimationBlockingMode:NSAnimationNonblocking];
    641     [_fadeAnimation.get() setCurrentProgress:0];
    642     [_fadeAnimation.get() startAnimation];
    643 
    644     [_backgroundWindow.get() orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
     640    [_fadeAnimation setAnimationBlockingMode:NSAnimationNonblocking];
     641    [_fadeAnimation setCurrentProgress:0];
     642    [_fadeAnimation startAnimation];
     643
     644    [_backgroundWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];
    645645
    646646    // WKWindowSetClipRect takes window coordinates, so convert from screen coordinates here:
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm

    r161301 r162505  
    212212        cachePath = @"~/Library/Caches/com.apple.WebKit2.WebProcess";
    213213
    214     return [cachePath.get() stringByStandardizingPath];
     214    return [cachePath stringByStandardizingPath];
    215215}
    216216
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm

    r159760 r162505  
    114114{
    115115    if (m_popup)
    116         [m_popup.get() setControlView:nil];
     116        [m_popup setControlView:nil];
    117117}
    118118
     
    187187{
    188188    if (m_popup)
    189         [m_popup.get() removeAllItems];
     189        [m_popup removeAllItems];
    190190    else {
    191191        m_popup = adoptNS([[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]);
    192         [m_popup.get() setUsesItemFromMenu:NO];
    193         [m_popup.get() setAutoenablesItems:NO];
    194     }
    195 
    196     NSMenu* menu = [m_popup.get() menu];
     192        [m_popup setUsesItemFromMenu:NO];
     193        [m_popup setAutoenablesItems:NO];
     194    }
     195
     196    NSMenu* menu = [m_popup menu];
    197197    populateNSMenu(menu, nsMenuItemVector(items));
    198198}
     
    208208    NSRect menuRect = NSMakeRect(menuLocation.x(), menuLocation.y(), 0, 0);
    209209   
    210     [m_popup.get() attachPopUpWithFrame:menuRect inView:m_webView];
    211 
    212     NSMenu* menu = [m_popup.get() menu];
     210    [m_popup attachPopUpWithFrame:menuRect inView:m_webView];
     211
     212    NSMenu* menu = [m_popup menu];
    213213
    214214    // These values were borrowed from AppKit to match their placement of the menu.
    215     NSRect titleFrame = [m_popup.get()  titleRectForBounds:menuRect];
     215    NSRect titleFrame = [m_popup  titleRectForBounds:menuRect];
    216216    if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0)
    217217        titleFrame = menuRect;
     
    227227    WKPopupContextMenu(menu, location);
    228228
    229     [m_popup.get() dismissPopUp];
     229    [m_popup dismissPopUp];
    230230}
    231231
    232232void WebContextMenuProxyMac::hideContextMenu()
    233233{
    234     [m_popup.get() dismissPopUp];
     234    [m_popup dismissPopUp];
    235235}
    236236
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r162007 r162505  
    345345    m_dockRightButton.get().hidden = !canAttach();
    346346
    347     [m_inspectorView.get() setFrame:[contentView bounds]];
    348     [m_inspectorView.get() setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
     347    [m_inspectorView setFrame:[contentView bounds]];
     348    [m_inspectorView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
    349349    [contentView addSubview:m_inspectorView.get()];
    350350
     
    362362
    363363    NSString *title = [NSString stringWithFormat:WEB_UI_STRING("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_urlString];
    364     [m_inspectorWindow.get() setTitle:title];
     364    [m_inspectorWindow setTitle:title];
    365365}
    366366
     
    394394    ASSERT(m_inspectorView);
    395395
    396     [m_inspectorView.get() setDrawsBackground:NO];
     396    [m_inspectorView setDrawsBackground:NO];
    397397
    398398    m_inspectorProxyObjCAdapter = adoptNS([[WKWebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]);
     
    468468{
    469469    if (m_inspectorWindow) {
    470         [m_inspectorWindow.get() setDelegate:nil];
    471         [m_inspectorWindow.get() orderOut:nil];
     470        [m_inspectorWindow setDelegate:nil];
     471        [m_inspectorWindow orderOut:nil];
    472472        m_inspectorWindow = 0;
    473473    }
     
    475475    m_inspectorView = 0;
    476476
    477     [m_inspectorProxyObjCAdapter.get() close];
     477    [m_inspectorProxyObjCAdapter close];
    478478    m_inspectorProxyObjCAdapter = 0;
    479479}
     
    487487
    488488    if (m_inspectorWindow) {
    489         [m_inspectorWindow.get() setDelegate:nil];
    490         [m_inspectorWindow.get() orderOut:nil];
     489        [m_inspectorWindow setDelegate:nil];
     490        [m_inspectorWindow orderOut:nil];
    491491        m_inspectorWindow = 0;
    492492    }
     
    624624        case AttachmentSideBottom: {
    625625            if (!currentDimension)
    626                 currentDimension = NSHeight([m_inspectorView.get() frame]);
     626                currentDimension = NSHeight([m_inspectorView frame]);
    627627
    628628            CGFloat parentHeight = NSHeight(parentBounds);
     
    637637        case AttachmentSideRight: {
    638638            if (!currentDimension)
    639                 currentDimension = NSWidth([m_inspectorView.get() frame]);
     639                currentDimension = NSWidth([m_inspectorView frame]);
    640640
    641641            CGFloat parentWidth = NSWidth(parentBounds);
     
    677677
    678678    if (m_inspectorWindow) {
    679         [m_inspectorWindow.get() setDelegate:nil];
    680         [m_inspectorWindow.get() orderOut:nil];
     679        [m_inspectorWindow setDelegate:nil];
     680        [m_inspectorWindow orderOut:nil];
    681681        m_inspectorWindow = 0;
    682682    }
    683683
    684     [m_inspectorView.get() removeFromSuperview];
    685 
    686     [m_inspectorView.get() setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];
     684    [m_inspectorView removeFromSuperview];
     685
     686    [m_inspectorView setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];
    687687
    688688    CGFloat currentDimension;
     
    709709    [[NSNotificationCenter defaultCenter] removeObserver:m_inspectorProxyObjCAdapter.get() name:NSViewFrameDidChangeNotification object:inspectedView];
    710710
    711     [m_inspectorView.get() removeFromSuperview];
     711    [m_inspectorView removeFromSuperview];
    712712
    713713    // Make sure that we size the inspected view's frame after detaching so that it takes up the space that the
  • trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm

    r156860 r162505  
    5050{
    5151    if (m_popup)
    52         [m_popup.get() setControlView:nil];
     52        [m_popup setControlView:nil];
    5353}
    5454
     
    5656{
    5757    if (m_popup)
    58         [m_popup.get() removeAllItems];
     58        [m_popup removeAllItems];
    5959    else {
    6060        m_popup = adoptNS([[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO]);
    61         [m_popup.get() setUsesItemFromMenu:NO];
    62         [m_popup.get() setAutoenablesItems:NO];
     61        [m_popup setUsesItemFromMenu:NO];
     62        [m_popup setAutoenablesItems:NO];
    6363    }
    6464
     
    6767    for (int i = 0; i < size; i++) {
    6868        if (items[i].m_type == WebPopupItem::Separator)
    69             [[m_popup.get() menu] addItem:[NSMenuItem separatorItem]];
     69            [[m_popup menu] addItem:[NSMenuItem separatorItem]];
    7070        else {
    71             [m_popup.get() addItemWithTitle:@""];
    72             NSMenuItem *menuItem = [m_popup.get() lastItem];
     71            [m_popup addItemWithTitle:@""];
     72            NSMenuItem *menuItem = [m_popup lastItem];
    7373
    7474            RetainPtr<NSMutableParagraphStyle> paragraphStyle = adoptNS([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
    7575            NSWritingDirection writingDirection = items[i].m_textDirection == LTR ? NSWritingDirectionLeftToRight : NSWritingDirectionRightToLeft;
    76             [paragraphStyle.get() setBaseWritingDirection:writingDirection];
    77             [paragraphStyle.get() setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
     76            [paragraphStyle setBaseWritingDirection:writingDirection];
     77            [paragraphStyle setAlignment:menuTextDirection == LTR ? NSLeftTextAlignment : NSRightTextAlignment];
    7878            RetainPtr<NSMutableDictionary> attributes = adoptNS([[NSMutableDictionary alloc] initWithObjectsAndKeys:
    7979                paragraphStyle.get(), NSParagraphStyleAttributeName,
     
    8383                RetainPtr<NSNumber> writingDirectionValue = adoptNS([[NSNumber alloc] initWithInteger:writingDirection + NSTextWritingDirectionOverride]);
    8484                RetainPtr<NSArray> writingDirectionArray = adoptNS([[NSArray alloc] initWithObjects:writingDirectionValue.get(), nil]);
    85                 [attributes.get() setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
     85                [attributes setObject:writingDirectionArray.get() forKey:NSWritingDirectionAttributeName];
    8686            }
    8787            RetainPtr<NSAttributedString> string = adoptNS([[NSAttributedString alloc] initWithString:nsStringFromWebCoreString(items[i].m_text) attributes:attributes.get()]);
     
    9090            // We set the title as well as the attributed title here. The attributed title will be displayed in the menu,
    9191            // but typeahead will use the non-attributed string that doesn't contain any leading or trailing whitespace.
    92             [menuItem setTitle:[[string.get() string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
     92            [menuItem setTitle:[[string string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
    9393            [menuItem setEnabled:items[i].m_isEnabled];
    9494            [menuItem setToolTip:nsStringFromWebCoreString(items[i].m_toolTip)];
     
    108108    populate(items, font, textDirection);
    109109
    110     [m_popup.get() attachPopUpWithFrame:rect inView:m_webView];
    111     [m_popup.get() selectItemAtIndex:selectedIndex];
    112     [m_popup.get() setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
     110    [m_popup attachPopUpWithFrame:rect inView:m_webView];
     111    [m_popup selectItemAtIndex:selectedIndex];
     112    [m_popup setUserInterfaceLayoutDirection:textDirection == LTR ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft];
    113113
    114     NSMenu *menu = [m_popup.get() menu];
     114    NSMenu *menu = [m_popup menu];
    115115
    116116    // These values were borrowed from AppKit to match their placement of the menu.
     
    123123    NSPoint location;
    124124    if (data.shouldPopOver) {
    125         NSRect titleFrame = [m_popup.get()  titleRectForBounds:rect];
     125        NSRect titleFrame = [m_popup  titleRectForBounds:rect];
    126126        if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0)
    127127            titleFrame = rect;
     
    133133    RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:rect]);
    134134    [m_webView addSubview:dummyView.get()];
    135     location = [dummyView.get() convertPoint:location fromView:m_webView];
     135    location = [dummyView convertPoint:location fromView:m_webView];
    136136
    137137    WKPopupMenu(menu, location, roundf(NSWidth(rect)), dummyView.get(), selectedIndex, font);
    138138
    139     [m_popup.get() dismissPopUp];
    140     [dummyView.get() removeFromSuperview];
     139    [m_popup dismissPopUp];
     140    [dummyView removeFromSuperview];
    141141   
    142142    if (!m_client)
    143143        return;
    144144   
    145     m_client->valueChangedForPopupMenu(this, [m_popup.get() indexOfSelectedItem]);
     145    m_client->valueChangedForPopupMenu(this, [m_popup indexOfSelectedItem]);
    146146   
    147147    // <https://bugs.webkit.org/show_bug.cgi?id=57904> This code is adopted from EventHandler::sendFakeEventsAfterWidgetTracking().
     
    181181void WebPopupMenuProxyMac::hidePopupMenu()
    182182{
    183     [m_popup.get() dismissPopUp];
     183    [m_popup dismissPopUp];
    184184}
    185185
  • trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm

    r162139 r162505  
    155155        RetainPtr<CFURLRef> clientBundleURL = adoptCF(WKCopyBundleURLForExecutableURL((CFURLRef)clientExecutableURL.get()));
    156156        RetainPtr<NSBundle> clientBundle = adoptNS([[NSBundle alloc] initWithURL:(NSURL *)clientBundleURL.get()]);
    157         clientIdentifier = [clientBundle.get() bundleIdentifier];
     157        clientIdentifier = [clientBundle bundleIdentifier];
    158158        if (clientIdentifier.isEmpty())
    159159            return false;
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm

    r156069 r162505  
    5353        // so the coordinate system will match the event coordinate system.
    5454        m_pluginLayer = adoptNS([[CALayer alloc] init]);
    55         [m_pluginLayer.get() setGeometryFlipped:YES];
     55        [m_pluginLayer setGeometryFlipped:YES];
    5656
    5757        if (m_isRestartedProcess) {
     
    6161            fadeInAnimation.duration = fadeInDuration;
    6262            fadeInAnimation.removedOnCompletion = NO;
    63             [m_pluginLayer.get() addAnimation:fadeInAnimation forKey:@"restarted-plugin-fade-in"];
     63            [m_pluginLayer addAnimation:fadeInAnimation forKey:@"restarted-plugin-fade-in"];
    6464        }
    6565
  • trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm

    r160801 r162505  
    525525    m_accessibilityObject.get().parent = webFrame()->page()->accessibilityRemoteObject();
    526526
    527     [m_containerLayer.get() addSublayer:m_contentLayer.get()];
    528     [m_containerLayer.get() addSublayer:m_scrollCornerLayer.get()];
     527    [m_containerLayer addSublayer:m_contentLayer.get()];
     528    [m_containerLayer addSublayer:m_scrollCornerLayer.get()];
    529529}
    530530
     
    614614    if (m_verticalScrollbarLayer) {
    615615        m_verticalScrollbarLayer.get().frame = verticalScrollbar()->frameRect();
    616         [m_verticalScrollbarLayer.get() setNeedsDisplay];
     616        [m_verticalScrollbarLayer setNeedsDisplay];
    617617    }
    618618   
    619619    if (m_horizontalScrollbarLayer) {
    620620        m_horizontalScrollbarLayer.get().frame = horizontalScrollbar()->frameRect();
    621         [m_horizontalScrollbarLayer.get() setNeedsDisplay];
     621        [m_horizontalScrollbarLayer setNeedsDisplay];
    622622    }
    623623   
    624624    if (m_scrollCornerLayer) {
    625625        m_scrollCornerLayer.get().frame = scrollCornerRect();
    626         [m_scrollCornerLayer.get() setNeedsDisplay];
     626        [m_scrollCornerLayer setNeedsDisplay];
    627627    }
    628628}
     
    643643    if (orientation == HorizontalScrollbar) {
    644644        m_horizontalScrollbarLayer = adoptNS([[WKPDFPluginScrollbarLayer alloc] initWithPDFPlugin:this]);
    645         [m_containerLayer.get() addSublayer:m_horizontalScrollbarLayer.get()];
     645        [m_containerLayer addSublayer:m_horizontalScrollbarLayer.get()];
    646646    } else {
    647647        m_verticalScrollbarLayer = adoptNS([[WKPDFPluginScrollbarLayer alloc] initWithPDFPlugin:this]);
    648         [m_containerLayer.get() addSublayer:m_verticalScrollbarLayer.get()];
     648        [m_containerLayer addSublayer:m_verticalScrollbarLayer.get()];
    649649    }
    650650    didAddScrollbar(widget.get(), orientation);
     
    665665
    666666    if (orientation == HorizontalScrollbar) {
    667         [m_horizontalScrollbarLayer.get() removeFromSuperlayer];
     667        [m_horizontalScrollbarLayer removeFromSuperlayer];
    668668        m_horizontalScrollbarLayer = 0;
    669669    } else {
    670         [m_verticalScrollbarLayer.get() removeFromSuperlayer];
     670        [m_verticalScrollbarLayer removeFromSuperlayer];
    671671        m_verticalScrollbarLayer = 0;
    672672    }
     
    897897    updatePageAndDeviceScaleFactors();
    898898
    899     [m_pdfLayerController.get() setFrameSize:size()];
     899    [m_pdfLayerController setFrameSize:size()];
    900900    m_pdfLayerController.get().document = document.get();
    901901
    902902    if (handlesPageScaleFactor())
    903         pluginView()->setPageScaleFactor([m_pdfLayerController.get() contentScaleFactor], IntPoint());
    904 
    905     notifyScrollPositionChanged(IntPoint([m_pdfLayerController.get() scrollPosition]));
     903        pluginView()->setPageScaleFactor([m_pdfLayerController contentScaleFactor], IntPoint());
     904
     905    notifyScrollPositionChanged(IntPoint([m_pdfLayerController scrollPosition]));
    906906
    907907    calculateSizes();
     
    910910    runScriptsInPDFDocument();
    911911
    912     if ([document.get() isLocked])
     912    if ([document isLocked])
    913913        createPasswordEntryForm();
    914914}
     
    979979{
    980980    Vector<RetainPtr<CFStringRef>> scripts;
    981     getAllScriptsInPDFDocument([m_pdfDocument.get() documentRef], scripts);
     981    getAllScriptsInPDFDocument([m_pdfDocument documentRef], scripts);
    982982
    983983    size_t scriptCount = scripts.size();
     
    10211021        newScaleFactor *= webFrame()->page()->pageScaleFactor();
    10221022
    1023     [m_pdfLayerController.get() setDeviceScaleFactor:newScaleFactor];
     1023    [m_pdfLayerController setDeviceScaleFactor:newScaleFactor];
    10241024}
    10251025
     
    10311031void PDFPlugin::computePageBoxes()
    10321032{
    1033     size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument.get() documentRef]);
     1033    size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument documentRef]);
    10341034    for (size_t i = 0; i < pageCount; ++i) {
    1035         CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument.get() documentRef], i + 1);
     1035        CGPDFPageRef pdfPage = CGPDFDocumentGetPage([m_pdfDocument documentRef], i + 1);
    10361036        ASSERT(pdfPage);
    10371037
     
    10531053    computePageBoxes();
    10541054
    1055     setPDFDocumentSize(IntSize([m_pdfLayerController.get() contentSizeRespectingZoom]));
     1055    setPDFDocumentSize(IntSize([m_pdfLayerController contentSizeRespectingZoom]));
    10561056}
    10571057
     
    10811081    destroyScrollbar(VerticalScrollbar);
    10821082   
    1083     [m_scrollCornerLayer.get() removeFromSuperlayer];
    1084     [m_contentLayer.get() removeFromSuperlayer];
     1083    [m_scrollCornerLayer removeFromSuperlayer];
     1084    [m_contentLayer removeFromSuperlayer];
    10851085}
    10861086
     
    11391139    context->translate(0, -size().height());
    11401140
    1141     [m_pdfLayerController.get() snapshotInContext:context->platformContext()];
     1141    [m_pdfLayerController snapshotInContext:context->platformContext()];
    11421142
    11431143    return bitmap.release();
     
    11921192void PDFPlugin::geometryDidChange(const IntSize& pluginSize, const IntRect&, const AffineTransform& pluginToRootViewTransform)
    11931193{
    1194     if (size() == pluginSize && pluginView()->pageScaleFactor() == [m_pdfLayerController.get() contentScaleFactor])
     1194    if (size() == pluginSize && pluginView()->pageScaleFactor() == [m_pdfLayerController contentScaleFactor])
    11951195        return;
    11961196
    11971197    m_size = pluginSize;
    11981198    m_rootViewToPluginTransform = pluginToRootViewTransform.inverse();
    1199     [m_pdfLayerController.get() setFrameSize:pluginSize];
     1199    [m_pdfLayerController setFrameSize:pluginSize];
    12001200
    12011201    [CATransaction begin];
     
    12051205   
    12061206    if (handlesPageScaleFactor()) {
    1207         CGFloat magnification = pluginView()->pageScaleFactor() - [m_pdfLayerController.get() contentScaleFactor];
     1207        CGFloat magnification = pluginView()->pageScaleFactor() - [m_pdfLayerController contentScaleFactor];
    12081208
    12091209        // FIXME: Instead of m_lastMousePositionInPluginCoordinates, we should use the zoom origin from PluginView::setPageScaleFactor.
    12101210        if (magnification)
    1211             [m_pdfLayerController.get() magnifyWithMagnification:magnification atPoint:convertFromPluginToPDFView(m_lastMousePositionInPluginCoordinates) immediately:NO];
     1211            [m_pdfLayerController magnifyWithMagnification:magnification atPoint:convertFromPluginToPDFView(m_lastMousePositionInPluginCoordinates) immediately:NO];
    12121212    } else {
    12131213        // If we don't handle page scale ourselves, we need to respect our parent page's
     
    12221222        m_activeAnnotation->updateGeometry();
    12231223
    1224     [m_contentLayer.get() setSublayerTransform:transform];
     1224    [m_contentLayer setSublayerTransform:transform];
    12251225    [CATransaction commit];
    12261226}
     
    13201320    HitTestResult hitTestResult = None;
    13211321
    1322     PDFSelection *selectionUnderMouse = [m_pdfLayerController.get() getSelectionForWordAtPoint:convertFromPluginToPDFView(event.position())];
     1322    PDFSelection *selectionUnderMouse = [m_pdfLayerController getSelectionForWordAtPoint:convertFromPluginToPDFView(event.position())];
    13231323    if (selectionUnderMouse && [[selectionUnderMouse string] length])
    13241324        hitTestResult = Text;
     
    13871387        switch (event.button()) {
    13881388        case WebMouseEvent::LeftButton:
    1389             [m_pdfLayerController.get() mouseDragged:nsEvent];
     1389            [m_pdfLayerController mouseDragged:nsEvent];
    13901390            return true;
    13911391        case WebMouseEvent::RightButton:
     
    13931393            return false;
    13941394        case WebMouseEvent::NoButton:
    1395             [m_pdfLayerController.get() mouseMoved:nsEvent];
     1395            [m_pdfLayerController mouseMoved:nsEvent];
    13961396            return true;
    13971397        }
     
    14021402                return targetScrollbar->mouseDown(platformEvent);
    14031403
    1404             [m_pdfLayerController.get() mouseDown:nsEvent];
     1404            [m_pdfLayerController mouseDown:nsEvent];
    14051405            return true;
    14061406        case WebMouseEvent::RightButton:
    1407             [m_pdfLayerController.get() rightMouseDown:nsEvent];
     1407            [m_pdfLayerController rightMouseDown:nsEvent];
    14081408            return true;
    14091409        case WebMouseEvent::MiddleButton:
     
    14171417                return targetScrollbar->mouseUp(platformEvent);
    14181418
    1419             [m_pdfLayerController.get() mouseUp:nsEvent];
     1419            [m_pdfLayerController mouseUp:nsEvent];
    14201420            return true;
    14211421        case WebMouseEvent::RightButton:
     
    14571457    IntPoint point = frameView->contentsToScreen(IntRect(frameView->windowToContents(event.position()), IntSize())).location();
    14581458   
    1459     if (NSMenu *nsMenu = [m_pdfLayerController.get() menuForEvent:nsEventForWebMouseEvent(event)]) {
     1459    if (NSMenu *nsMenu = [m_pdfLayerController menuForEvent:nsEventForWebMouseEvent(event)]) {
    14601460        WKPopupContextMenu(nsMenu, point);
    14611461        return true;
     
    14781478    switch (event.type()) {
    14791479    case WebEvent::KeyDown:
    1480         return [m_pdfLayerController.get() keyDown:fakeEvent];
     1480        return [m_pdfLayerController keyDown:fakeEvent];
    14811481    default:
    14821482        return false;
     
    15171517
    15181518    [CATransaction begin];
    1519     [m_pdfLayerController.get() setScrollPosition:offset];
     1519    [m_pdfLayerController setScrollPosition:offset];
    15201520
    15211521    if (m_activeAnnotation)
     
    15281528{
    15291529    if (scrollbar == horizontalScrollbar())
    1530         [m_horizontalScrollbarLayer.get() setNeedsDisplay];
     1530        [m_horizontalScrollbarLayer setNeedsDisplay];
    15311531    else if (scrollbar == verticalScrollbar())
    1532         [m_verticalScrollbarLayer.get() setNeedsDisplay];
     1532        [m_verticalScrollbarLayer setNeedsDisplay];
    15331533}
    15341534
    15351535void PDFPlugin::invalidateScrollCornerRect(const IntRect& rect)
    15361536{
    1537     [m_scrollCornerLayer.get() setNeedsDisplay];
     1537    [m_scrollCornerLayer setNeedsDisplay];
    15381538}
    15391539
     
    17031703    int nsOptions = (options & FindOptionsCaseInsensitive) ? NSCaseInsensitiveSearch : 0;
    17041704
    1705     return [[pdfDocument().get() findString:target withOptions:nsOptions] count];
     1705    return [[pdfDocument() findString:target withOptions:nsOptions] count];
    17061706}
    17071707
     
    17651765
    17661766    if (target.isEmpty()) {
    1767         PDFSelection* searchSelection = [m_pdfLayerController.get() searchSelection];
    1768         [m_pdfLayerController.get() findString:target caseSensitive:caseSensitive highlightMatches:YES];
    1769         [m_pdfLayerController.get() setSearchSelection:searchSelection];
     1767        PDFSelection* searchSelection = [m_pdfLayerController searchSelection];
     1768        [m_pdfLayerController findString:target caseSensitive:caseSensitive highlightMatches:YES];
     1769        [m_pdfLayerController setSearchSelection:searchSelection];
    17701770        m_lastFoundString = emptyString();
    17711771        return false;
     
    17731773
    17741774    if (m_lastFoundString == target) {
    1775         PDFSelection *selection = nextMatchForString(target, searchForward, caseSensitive, wrapSearch, [m_pdfLayerController.get() searchSelection], NO);
     1775        PDFSelection *selection = nextMatchForString(target, searchForward, caseSensitive, wrapSearch, [m_pdfLayerController searchSelection], NO);
    17761776        if (!selection)
    17771777            return false;
    17781778
    1779         [m_pdfLayerController.get() setSearchSelection:selection];
    1780         [m_pdfLayerController.get() gotoSelection:selection];
     1779        [m_pdfLayerController setSearchSelection:selection];
     1780        [m_pdfLayerController gotoSelection:selection];
    17811781    } else {
    1782         [m_pdfLayerController.get() findString:target caseSensitive:caseSensitive highlightMatches:YES];
     1782        [m_pdfLayerController findString:target caseSensitive:caseSensitive highlightMatches:YES];
    17831783        m_lastFoundString = target;
    17841784    }
     
    17891789bool PDFPlugin::performDictionaryLookupAtLocation(const WebCore::FloatPoint& point)
    17901790{
    1791     PDFSelection* lookupSelection = [m_pdfLayerController.get() getSelectionForWordAtPoint:convertFromPluginToPDFView(roundedIntPoint(point))];
     1791    PDFSelection* lookupSelection = [m_pdfLayerController getSelectionForWordAtPoint:convertFromPluginToPDFView(roundedIntPoint(point))];
    17921792
    17931793    if ([[lookupSelection string] length])
    1794         [m_pdfLayerController.get() searchInDictionaryWithSelection:lookupSelection];
     1794        [m_pdfLayerController searchInDictionaryWithSelection:lookupSelection];
    17951795
    17961796    return true;
     
    17991799void PDFPlugin::focusNextAnnotation()
    18001800{
    1801     [m_pdfLayerController.get() activateNextAnnotation:false];
     1801    [m_pdfLayerController activateNextAnnotation:false];
    18021802}
    18031803
    18041804void PDFPlugin::focusPreviousAnnotation()
    18051805{
    1806     [m_pdfLayerController.get() activateNextAnnotation:true];
     1806    [m_pdfLayerController activateNextAnnotation:true];
    18071807}
    18081808
     
    18141814String PDFPlugin::getSelectionString() const
    18151815{
    1816     return [[m_pdfLayerController.get() currentSelection] string];
     1816    return [[m_pdfLayerController currentSelection] string];
    18171817}
    18181818
     
    18291829bool PDFPlugin::handleWheelEvent(const WebWheelEvent& event)
    18301830{
    1831     PDFDisplayMode displayMode = [m_pdfLayerController.get() displayMode];
     1831    PDFDisplayMode displayMode = [m_pdfLayerController displayMode];
    18321832
    18331833    if (displayMode == kPDFDisplaySinglePageContinuous || displayMode == kPDFDisplayTwoUpContinuous)
    18341834        return ScrollableArea::handleWheelEvent(platform(event));
    18351835
    1836     NSUInteger currentPageIndex = [m_pdfLayerController.get() currentPageIndex];
     1836    NSUInteger currentPageIndex = [m_pdfLayerController currentPageIndex];
    18371837    bool inFirstPage = currentPageIndex == 0;
    1838     bool inLastPage = [m_pdfLayerController.get() lastPageIndex] == currentPageIndex;
     1838    bool inLastPage = [m_pdfLayerController lastPageIndex] == currentPageIndex;
    18391839
    18401840    bool atScrollTop = scrollPosition().y() == 0;
     
    18511851    if (atScrollBottom && !inLastPage && event.delta().height() < 0) {
    18521852        if (event.delta().height() <= -scrollMagnitudeThresholdForPageFlip && !inMomentumScroll)
    1853             [m_pdfLayerController.get() gotoNextPage];
     1853            [m_pdfLayerController gotoNextPage];
    18541854        return true;
    18551855    } else if (atScrollTop && !inFirstPage && event.delta().height() > 0) {
    18561856        if (event.delta().height() >= scrollMagnitudeThresholdForPageFlip && !inMomentumScroll) {
    18571857            [CATransaction begin];
    1858             [m_pdfLayerController.get() gotoPreviousPage];
     1858            [m_pdfLayerController gotoPreviousPage];
    18591859            scrollToOffsetWithoutAnimation(maximumScrollPosition());
    18601860            [CATransaction commit];
     
    18741874    // untouched by the user, so that PDFs which PDFKit can't display will still be downloadable.
    18751875    if (m_pdfDocumentWasMutated)
    1876         return [m_pdfDocument.get() dataRepresentation];
     1876        return [m_pdfDocument dataRepresentation];
    18771877    else
    18781878        return rawData();
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm

    r161577 r162505  
    7979void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, Clipboard&, Frame& frame, bool linkDrag)
    8080{
    81     IntSize bitmapSize([image.get() size]);
     81    IntSize bitmapSize([image size]);
    8282    RefPtr<ShareableBitmap> bitmap = convertImageToBitmap(image.get(), bitmapSize);
    8383    ShareableBitmap::Handle handle;
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/PageBannerMac.mm

    r152316 r162505  
    124124{
    125125    m_layer.get().contentsScale = scaleFactor;
    126     [m_layer.get() setNeedsDisplay];
     126    [m_layer setNeedsDisplay];
    127127}
    128128
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r162276 r162505  
    403403    m_isPaintingSuspended = true;
    404404
    405     [m_rootLayer.get() setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"];
     405    [m_rootLayer setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"];
    406406    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidPauseNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]];
    407407}
     
    416416    m_isPaintingSuspended = false;
    417417
    418     [m_rootLayer.get() setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];
     418    [m_rootLayer setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];
    419419    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]];
    420420}
     
    571571
    572572    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
    573         [m_rootLayer.get() addSublayer:it->value->platformLayer()];
     573        [m_rootLayer addSublayer:it->value->platformLayer()];
    574574
    575575    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
     
    597597    [CATransaction setDisableActions:YES];
    598598
    599     [m_rootLayer.get() addSublayer:layer->platformLayer()];
     599    [m_rootLayer addSublayer:layer->platformLayer()];
    600600
    601601    [CATransaction commit];
     
    632632    [CATransaction setDisableActions:YES];
    633633
    634     [m_rootLayer.get() insertSublayer:layer->platformLayer() above:oldPlatformLayer.get()];
    635     [oldPlatformLayer.get() removeFromSuperlayer];
     634    [m_rootLayer insertSublayer:layer->platformLayer() above:oldPlatformLayer.get()];
     635    [oldPlatformLayer removeFromSuperlayer];
    636636
    637637    [CATransaction commit];
     
    656656        if (m_debugInfoLayer) {
    657657#ifndef NDEBUG
    658             [m_debugInfoLayer.get() setName:@"Debug Info"];
     658            [m_debugInfoLayer setName:@"Debug Info"];
    659659#endif
    660             [m_rootLayer.get() addSublayer:m_debugInfoLayer.get()];
     660            [m_rootLayer addSublayer:m_debugInfoLayer.get()];
    661661        }
    662662    } else if (m_debugInfoLayer) {
    663         [m_debugInfoLayer.get() removeFromSuperlayer];
     663        [m_debugInfoLayer removeFromSuperlayer];
    664664        m_debugInfoLayer = nullptr;
    665665    }
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

    r161148 r162505  
    597597        }
    598598
    599         [scaledNSAttributedString.get() addAttributes:scaledAttributes.get() range:range];
     599        [scaledNSAttributedString addAttributes:scaledAttributes.get() range:range];
    600600    }];
    601601
     
    733733{
    734734    RetainPtr<NSMutableURLRequest> request = adoptNS([[NSMutableURLRequest alloc] initWithURL:url]);
    735     [request.get() setValue:(NSString *)webPage->userAgent() forHTTPHeaderField:@"User-Agent"];
     735    [request setValue:(NSString *)webPage->userAgent() forHTTPHeaderField:@"User-Agent"];
    736736
    737737    if (CFURLStorageSessionRef storageSession = webPage->corePage()->mainFrame().loader().networkingContext()->storageSession().platformSession())
     
    840840    Frame* coreFrame = frame ? frame->coreFrame() : 0;
    841841    RetainPtr<PDFDocument> pdfDocument = coreFrame ? pdfDocumentForPrintingFrame(coreFrame) : 0;
    842     if ([pdfDocument.get() allowsPrinting]) {
    843         NSUInteger pageCount = [pdfDocument.get() pageCount];
     842    if ([pdfDocument allowsPrinting]) {
     843        NSUInteger pageCount = [pdfDocument pageCount];
    844844        IntRect pageRect(0, 0, ceilf(printInfo.availablePaperWidth), ceilf(printInfo.availablePaperHeight));
    845845        for (NSUInteger i = 1; i <= pageCount; ++i) {
Note: See TracChangeset for help on using the changeset viewer.