Changeset 162505 in webkit
- Timestamp:
- Jan 21, 2014 10:18:19 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r162501 r162505 1 2014-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 1 13 2014-01-21 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm
r161148 r162505 64 64 65 65 // FIXME: Allow this to be changed by the client. 66 [m_nsURLDownload .get()setDeletesFileUponFailure:NO];66 [m_nsURLDownload setDeletesFileUponFailure:NO]; 67 67 } 68 68 … … 80 80 81 81 // FIXME: Allow this to be changed by the client. 82 [m_nsURLDownload .get()setDeletesFileUponFailure:NO];82 [m_nsURLDownload setDeletesFileUponFailure:NO]; 83 83 } 84 84 85 85 void Download::cancel() 86 86 { 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])); 91 91 } 92 92 … … 96 96 ASSERT(m_delegate); 97 97 98 [m_delegate .get()invalidate];98 [m_delegate invalidate]; 99 99 m_delegate = nullptr; 100 100 m_nsURLDownload = nullptr; … … 264 264 265 265 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]); 267 267 268 268 _download->didFail(error, dataReference); -
trunk/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm
r161148 r162505 217 217 218 218 dispatchOnResourceLoaderRunLoop(^ { 219 [[protocol .get()client] URLProtocol:protocol.get() didFailWithError:nsError.get()];219 [[protocol client] URLProtocol:protocol.get() didFailWithError:nsError.get()]; 220 220 }); 221 221 … … 232 232 233 233 dispatchOnResourceLoaderRunLoop(^ { 234 [[protocol .get()client] URLProtocol:protocol.get() didLoadData:nsData.get()];234 [[protocol client] URLProtocol:protocol.get() didLoadData:nsData.get()]; 235 235 }); 236 236 } … … 245 245 246 246 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)]; 248 248 }); 249 249 } … … 256 256 257 257 dispatchOnResourceLoaderRunLoop(^ { 258 [[protocol .get()client] URLProtocolDidFinishLoading:protocol.get()];258 [[protocol client] URLProtocolDidFinishLoading:protocol.get()]; 259 259 }); 260 260 -
trunk/Source/WebKit2/Shared/mac/ArgumentCodersMac.mm
r161309 r162505 250 250 return false; 251 251 252 NSUInteger stringLength = [plainString .get()length];252 NSUInteger stringLength = [plainString length]; 253 253 254 254 RetainPtr<NSMutableAttributedString> resultString = adoptNS([[NSMutableAttributedString alloc] initWithString:plainString.get()]); … … 274 274 if (!IPC::decode(decoder, attributes)) 275 275 return false; 276 [resultString .get()addAttributes:attributes.get() range:NSMakeRange(rangeLocation, rangeLength)];276 [resultString addAttributes:attributes.get() range:NSMakeRange(rangeLocation, rangeLength)]; 277 277 } 278 278 … … 341 341 return false; 342 342 343 [dictionary .get()setObject:value.get() forKey:key.get()];343 [dictionary setObject:value.get() forKey:key.get()]; 344 344 } 345 345 … … 426 426 return false; 427 427 428 [array .get()addObject:value.get()];428 [array addObject:value.get()]; 429 429 } 430 430 -
trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm
r161148 r162505 194 194 return false; 195 195 196 [array .get()addObject:value.get()];196 [array addObject:value.get()]; 197 197 } 198 198 … … 218 218 return false; 219 219 220 [dictionary .get()setObject:value.get() forKey:key.get()];220 [dictionary setObject:value.get() forKey:key.get()]; 221 221 } 222 222 -
trunk/Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm
r161950 r162505 110 110 111 111 if (_requestsWaitingForCoreLocationStart.isEmpty() && _requestsInWarmUp.isEmpty()) { 112 [_coreLocationProvider .get()stop];112 [_coreLocationProvider stop]; 113 113 _lastActivePosition.clear(); 114 114 } … … 119 119 { 120 120 _isWebCoreGeolocationActive = YES; 121 [_coreLocationProvider .get()start];121 [_coreLocationProvider start]; 122 122 123 123 // If we have the last position, it is from the initialization or warm up. It is the last known … … 135 135 -(void)_setEnableHighAccuracy:(BOOL)enableHighAccuracy 136 136 { 137 [_coreLocationProvider .get()setEnableHighAccuracy:enableHighAccuracy];137 [_coreLocationProvider setEnableHighAccuracy:enableHighAccuracy]; 138 138 } 139 139 … … 173 173 geolocationRequestData.window = window; 174 174 _requestsWaitingForCoreLocationStart.append(geolocationRequestData); 175 [_coreLocationProvider .get()start];175 [_coreLocationProvider start]; 176 176 } 177 177 @end … … 264 264 - (void)deny 265 265 { 266 [_provider .get()permissionDenied:_permissionRequestProxy.get()];266 [_provider permissionDenied:_permissionRequestProxy.get()]; 267 267 _permissionRequestProxy->deny(); 268 268 } -
trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm
r162175 r162505 308 308 if (!_highlightView) { 309 309 _highlightView = adoptNS([[_UIHighlightView alloc] initWithFrame:CGRectZero]); 310 [_highlightView .get()setOpaque:NO];311 [_highlightView .get()setCornerRadius:UIWebViewMinimumHighlightRadius];310 [_highlightView setOpaque:NO]; 311 [_highlightView setCornerRadius:UIWebViewMinimumHighlightRadius]; 312 312 } 313 313 [self addSubview:_highlightView.get()]; 314 314 315 315 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()]; 317 317 318 318 bool allHighlightRectsAreRectilinear = true; … … 334 334 CGRect boundaryRect = [self frame]; 335 335 if (allHighlightRectsAreRectilinear) 336 [_highlightView .get()setFrames:rects.get() boundaryRect:boundaryRect];336 [_highlightView setFrames:rects.get() boundaryRect:boundaryRect]; 337 337 else { 338 338 RetainPtr<NSMutableArray> quads = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]); … … 340 340 const FloatQuad& quad = highlightedQuads[i]; 341 341 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()]]; 346 346 } 347 [_highlightView .get()setQuads:quads.get() boundaryRect:boundaryRect];347 [_highlightView setQuads:quads.get() boundaryRect:boundaryRect]; 348 348 } 349 349 350 350 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()]; 356 356 } 357 357 358 358 - (void)_cancelLongPressGestureRecognizer 359 359 { 360 [_highlightLongPressGestureRecognizer .get()cancel];360 [_highlightLongPressGestureRecognizer cancel]; 361 361 } 362 362 … … 500 500 { 501 501 _isTapHighlightIDValid = NO; 502 [_highlightView .get()removeFromSuperview];502 [_highlightView removeFromSuperview]; 503 503 } 504 504 -
trunk/Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm
r156860 r162505 151 151 defer:NO]); 152 152 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]; 156 156 157 157 RetainPtr<WKFindIndicatorView> findIndicatorView = adoptNS([[WKFindIndicatorView alloc] _initWithFindIndicator:m_findIndicator]); 158 [m_findIndicatorWindow .get()setContentView:findIndicatorView.get()];158 [m_findIndicatorWindow setContentView:findIndicatorView.get()]; 159 159 160 160 [[m_wkView window] addChildWindow:m_findIndicatorWindow.get() ordered:NSWindowAbove]; 161 [m_findIndicatorWindow .get()setReleasedWhenClosed:NO];161 [m_findIndicatorWindow setReleasedWhenClosed:NO]; 162 162 163 163 if (animate) { … … 168 168 animationProgressCallback:&FindIndicatorWindow::bounceAnimationCallback 169 169 animationDidEndCallback:&FindIndicatorWindow::bounceAnimationDidEnd]); 170 [m_bounceAnimation .get()startAnimation];170 [m_bounceAnimation startAnimation]; 171 171 } 172 172 … … 183 183 184 184 if (m_fadeOutAnimation) { 185 [m_fadeOutAnimation .get()stopAnimation];185 [m_fadeOutAnimation stopAnimation]; 186 186 m_fadeOutAnimation = nullptr; 187 187 } 188 188 189 189 if (m_bounceAnimation) { 190 [m_bounceAnimation .get()stopAnimation];190 [m_bounceAnimation stopAnimation]; 191 191 m_bounceAnimation = nullptr; 192 192 } … … 195 195 WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext); 196 196 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]; 199 199 m_findIndicatorWindow = nullptr; 200 200 } … … 208 208 animationProgressCallback:&FindIndicatorWindow::fadeOutAnimationCallback 209 209 animationDidEndCallback:&FindIndicatorWindow::fadeOutAnimationDidEnd]); 210 [m_fadeOutAnimation .get()startAnimation];210 [m_fadeOutAnimation startAnimation]; 211 211 } 212 212 … … 215 215 ASSERT(m_fadeOutAnimation); 216 216 217 [m_findIndicatorWindow .get()setAlphaValue:1.0 - progress];217 [m_findIndicatorWindow setAlphaValue:1.0 - progress]; 218 218 } 219 219 -
trunk/Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm
r161002 r162505 77 77 - (void)_setAutodisplay:(BOOL)newState 78 78 { 79 if (!newState && [[_wkView .get()window] isAutodisplay])80 [_wkView .get()displayIfNeeded];79 if (!newState && [[_wkView window] isAutodisplay]) 80 [_wkView displayIfNeeded]; 81 81 82 [[_wkView .get()window] setAutodisplay:newState];82 [[_wkView window] setAutodisplay:newState]; 83 83 84 84 // For some reason, painting doesn't happen for a long time without this call, <rdar://problem/8975229>. 85 85 if (newState) 86 [_wkView .get()displayIfNeeded];86 [_wkView displayIfNeeded]; 87 87 } 88 88 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r162454 r162505 1606 1606 if (actualRange) { 1607 1607 *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]; 1613 1613 } 1614 1614 … … 2203 2203 2204 2204 ColorSpaceData colorSpaceData; 2205 colorSpaceData.cgColorSpace = [_data->_colorSpace .get()CGColorSpace];2205 colorSpaceData.cgColorSpace = [_data->_colorSpace CGColorSpace]; 2206 2206 2207 2207 return colorSpaceData; … … 2586 2586 RetainPtr<NSMutableArray> types = adoptNS([[NSMutableArray alloc] initWithObjects:NSFilesPromisePboardType, nil]); 2587 2587 2588 [types .get()addObjectsFromArray:archiveBuffer ? PasteboardTypes::forImagesWithArchive() : PasteboardTypes::forImages()];2588 [types addObjectsFromArray:archiveBuffer ? PasteboardTypes::forImagesWithArchive() : PasteboardTypes::forImages()]; 2589 2589 [pasteboard declareTypes:types.get() owner:self]; 2590 2590 if (!matchesExtensionOrEquivalent(filename, extension)) … … 2677 2677 2678 2678 // 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]]; 2680 2680 path = pathWithUniqueFilenameForPath(path); 2681 2681 if (![wrapper writeToURL:[NSURL fileURLWithPath:path] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr]) … … 2766 2766 RetainPtr<WKResponderChainSink> sink = adoptNS([[WKResponderChainSink alloc] initWithResponderChain:self]); 2767 2767 [super doCommandBySelector:selector]; 2768 [sink .get()detach];2769 return ![sink .get()didReceiveUnhandledCommand];2768 [sink detach]; 2769 return ![sink didReceiveUnhandledCommand]; 2770 2770 } 2771 2771 -
trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
r161148 r162505 272 272 273 273 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]; 275 275 276 276 m_activationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationWillBecomeActiveNotification object:NSApp queue:nil … … 283 283 [NSApp runModalForWindow:m_placeholderWindow.get()]; 284 284 285 [m_placeholderWindow .get()orderOut:nil];285 [m_placeholderWindow orderOut:nil]; 286 286 m_placeholderWindow = nullptr; 287 287 } -
trunk/Source/WebKit2/UIProcess/mac/CorrectionPanel.mm
r149255 r162505 119 119 120 120 NSSpellChecker* spellChecker = [NSSpellChecker sharedSpellChecker]; 121 NSInteger documentTag = [m_view .get()spellCheckerDocumentTag];121 NSInteger documentTag = [m_view spellCheckerDocumentTag]; 122 122 123 123 switch (correctionIndicatorType) { … … 142 142 } 143 143 144 [m_view .get()handleAcceptedAlternativeText:acceptedReplacement];144 [m_view handleAcceptedAlternativeText:acceptedReplacement]; 145 145 m_view.clear(); 146 146 if (acceptedReplacement) -
trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm
r149476 r162505 419 419 for (size_t i = 0; i < grammarDetail.guesses.size(); ++i) { 420 420 NSString *guess = grammarDetail.guesses[i]; 421 [corrections .get()addObject:guess];421 [corrections addObject:guess]; 422 422 } 423 423 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r160296 r162505 168 168 NSRect screenFrame = [[window screen] frame]; 169 169 [window setFrame:screenFrame display:YES]; 170 [_backgroundWindow .get()setFrame:screenFrame display:YES];170 [_backgroundWindow setFrame:screenFrame display:YES]; 171 171 } 172 172 … … 236 236 if (!_webViewPlaceholder) { 237 237 _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()]; 242 242 [self _replaceView:_webView with:_webViewPlaceholder.get()]; 243 243 … … 287 287 WKWindowSetClipRect([self window], windowBounds); 288 288 289 [_fadeAnimation .get()stopAnimation];290 [_fadeAnimation .get()setWindow:nil];289 [_fadeAnimation stopAnimation]; 290 [_fadeAnimation setWindow:nil]; 291 291 _fadeAnimation = nullptr; 292 292 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]; 298 298 } else { 299 299 // Transition to fullscreen failed. Clean up. 300 300 _fullScreenState = NotInFullScreen; 301 301 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]; 306 306 307 307 [[self window] setAutodisplay:YES]; … … 325 325 { 326 326 if (_watchdogTimer) { 327 [_watchdogTimer .get()invalidate];327 [_watchdogTimer invalidate]; 328 328 _watchdogTimer.clear(); 329 329 } … … 333 333 _fullScreenState = WaitingToExitFullScreen; 334 334 335 [_webViewPlaceholder .get()setExitWarningVisible:NO];335 [_webViewPlaceholder setExitWarningVisible:NO]; 336 336 337 337 // Screen updates to be re-enabled in _startExitFullScreenAnimationWithDuration: or beganExitFullScreenWithInitialFrame:finalFrame: … … 342 342 // We will resume the normal behavior in _startExitFullScreenAnimationWithDuration: 343 343 [_webView _setSuppressVisibilityUpdates:YES]; 344 [_webViewPlaceholder .get()setTarget:nil];344 [_webViewPlaceholder setTarget:nil]; 345 345 346 346 [self _manager]->setAnimatingFullScreen(true); … … 378 378 // Screen updates to be re-enabled in completeFinishExitFullScreenAnimationAfterRepaint. 379 379 NSDisableScreenUpdates(); 380 [[_webViewPlaceholder .get()window] setAutodisplay:NO];380 [[_webViewPlaceholder window] setAutodisplay:NO]; 381 381 382 382 NSResponder *firstResponder = [[self window] firstResponder]; … … 391 391 [[self window] setFrame:NSZeroRect display:YES]; 392 392 393 [_fadeAnimation .get()stopAnimation];394 [_fadeAnimation .get()setWindow:nil];393 [_fadeAnimation stopAnimation]; 394 [_fadeAnimation setWindow:nil]; 395 395 _fadeAnimation = nullptr; 396 396 397 [_backgroundWindow .get()orderOut:self];398 [_backgroundWindow .get()setFrame:NSZeroRect display:YES];397 [_backgroundWindow orderOut:self]; 398 [_backgroundWindow setFrame:NSZeroRect display:YES]; 399 399 400 400 [[_webView window] makeKeyAndOrderFront:self]; … … 556 556 _scaleAnimation = adoptNS([[WebWindowScaleAnimation alloc] initWithHintedDuration:duration window:[self window] initalFrame:initialWindowFrame finalFrame:screenFrame]); 557 557 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]; 561 561 562 562 // WKWindowSetClipRect takes window coordinates, so convert from screen coordinates here: … … 578 578 _backgroundWindow = createBackgroundFullscreenWindow(screenFrame); 579 579 else 580 [_backgroundWindow .get()setFrame:screenFrame display:NO];580 [_backgroundWindow setFrame:screenFrame display:NO]; 581 581 582 582 CGFloat currentAlpha = 0; 583 583 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]; 587 587 } 588 588 … … 591 591 initialAlpha:currentAlpha 592 592 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]]; 598 598 599 599 [_webView _setSuppressVisibilityUpdates:NO]; … … 616 616 NSRect initialWindowFrame = windowFrameFromApparentFrames(screenFrame, _initialFrame, _finalFrame); 617 617 618 NSRect currentFrame = _scaleAnimation ? [_scaleAnimation .get()currentFrame] : [[self window] frame];618 NSRect currentFrame = _scaleAnimation ? [_scaleAnimation currentFrame] : [[self window] frame]; 619 619 _scaleAnimation = adoptNS([[WebWindowScaleAnimation alloc] initWithHintedDuration:duration window:[self window] initalFrame:currentFrame finalFrame:initialWindowFrame]); 620 620 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]; 624 624 625 625 if (!_backgroundWindow) 626 626 _backgroundWindow = createBackgroundFullscreenWindow(screenFrame); 627 627 else 628 [_backgroundWindow .get()setFrame:screenFrame display:NO];628 [_backgroundWindow setFrame:screenFrame display:NO]; 629 629 630 630 CGFloat currentAlpha = 1; 631 631 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]; 635 635 } 636 636 _fadeAnimation = adoptNS([[WebWindowFadeAnimation alloc] initWithDuration:duration … … 638 638 initialAlpha:currentAlpha 639 639 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]]; 645 645 646 646 // WKWindowSetClipRect takes window coordinates, so convert from screen coordinates here: -
trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm
r161301 r162505 212 212 cachePath = @"~/Library/Caches/com.apple.WebKit2.WebProcess"; 213 213 214 return [cachePath .get()stringByStandardizingPath];214 return [cachePath stringByStandardizingPath]; 215 215 } 216 216 -
trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
r159760 r162505 114 114 { 115 115 if (m_popup) 116 [m_popup .get()setControlView:nil];116 [m_popup setControlView:nil]; 117 117 } 118 118 … … 187 187 { 188 188 if (m_popup) 189 [m_popup .get()removeAllItems];189 [m_popup removeAllItems]; 190 190 else { 191 191 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]; 197 197 populateNSMenu(menu, nsMenuItemVector(items)); 198 198 } … … 208 208 NSRect menuRect = NSMakeRect(menuLocation.x(), menuLocation.y(), 0, 0); 209 209 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]; 213 213 214 214 // 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]; 216 216 if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0) 217 217 titleFrame = menuRect; … … 227 227 WKPopupContextMenu(menu, location); 228 228 229 [m_popup .get()dismissPopUp];229 [m_popup dismissPopUp]; 230 230 } 231 231 232 232 void WebContextMenuProxyMac::hideContextMenu() 233 233 { 234 [m_popup .get()dismissPopUp];234 [m_popup dismissPopUp]; 235 235 } 236 236 -
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
r162007 r162505 345 345 m_dockRightButton.get().hidden = !canAttach(); 346 346 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]; 349 349 [contentView addSubview:m_inspectorView.get()]; 350 350 … … 362 362 363 363 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]; 365 365 } 366 366 … … 394 394 ASSERT(m_inspectorView); 395 395 396 [m_inspectorView .get()setDrawsBackground:NO];396 [m_inspectorView setDrawsBackground:NO]; 397 397 398 398 m_inspectorProxyObjCAdapter = adoptNS([[WKWebInspectorProxyObjCAdapter alloc] initWithWebInspectorProxy:this]); … … 468 468 { 469 469 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]; 472 472 m_inspectorWindow = 0; 473 473 } … … 475 475 m_inspectorView = 0; 476 476 477 [m_inspectorProxyObjCAdapter .get()close];477 [m_inspectorProxyObjCAdapter close]; 478 478 m_inspectorProxyObjCAdapter = 0; 479 479 } … … 487 487 488 488 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]; 491 491 m_inspectorWindow = 0; 492 492 } … … 624 624 case AttachmentSideBottom: { 625 625 if (!currentDimension) 626 currentDimension = NSHeight([m_inspectorView .get()frame]);626 currentDimension = NSHeight([m_inspectorView frame]); 627 627 628 628 CGFloat parentHeight = NSHeight(parentBounds); … … 637 637 case AttachmentSideRight: { 638 638 if (!currentDimension) 639 currentDimension = NSWidth([m_inspectorView .get()frame]);639 currentDimension = NSWidth([m_inspectorView frame]); 640 640 641 641 CGFloat parentWidth = NSWidth(parentBounds); … … 677 677 678 678 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]; 681 681 m_inspectorWindow = 0; 682 682 } 683 683 684 [m_inspectorView .get()removeFromSuperview];685 686 [m_inspectorView .get()setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin];684 [m_inspectorView removeFromSuperview]; 685 686 [m_inspectorView setAutoresizingMask:NSViewWidthSizable | NSViewMaxYMargin]; 687 687 688 688 CGFloat currentDimension; … … 709 709 [[NSNotificationCenter defaultCenter] removeObserver:m_inspectorProxyObjCAdapter.get() name:NSViewFrameDidChangeNotification object:inspectedView]; 710 710 711 [m_inspectorView .get()removeFromSuperview];711 [m_inspectorView removeFromSuperview]; 712 712 713 713 // 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 50 50 { 51 51 if (m_popup) 52 [m_popup .get()setControlView:nil];52 [m_popup setControlView:nil]; 53 53 } 54 54 … … 56 56 { 57 57 if (m_popup) 58 [m_popup .get()removeAllItems];58 [m_popup removeAllItems]; 59 59 else { 60 60 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]; 63 63 } 64 64 … … 67 67 for (int i = 0; i < size; i++) { 68 68 if (items[i].m_type == WebPopupItem::Separator) 69 [[m_popup .get()menu] addItem:[NSMenuItem separatorItem]];69 [[m_popup menu] addItem:[NSMenuItem separatorItem]]; 70 70 else { 71 [m_popup .get()addItemWithTitle:@""];72 NSMenuItem *menuItem = [m_popup .get()lastItem];71 [m_popup addItemWithTitle:@""]; 72 NSMenuItem *menuItem = [m_popup lastItem]; 73 73 74 74 RetainPtr<NSMutableParagraphStyle> paragraphStyle = adoptNS([[NSParagraphStyle defaultParagraphStyle] mutableCopy]); 75 75 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]; 78 78 RetainPtr<NSMutableDictionary> attributes = adoptNS([[NSMutableDictionary alloc] initWithObjectsAndKeys: 79 79 paragraphStyle.get(), NSParagraphStyleAttributeName, … … 83 83 RetainPtr<NSNumber> writingDirectionValue = adoptNS([[NSNumber alloc] initWithInteger:writingDirection + NSTextWritingDirectionOverride]); 84 84 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]; 86 86 } 87 87 RetainPtr<NSAttributedString> string = adoptNS([[NSAttributedString alloc] initWithString:nsStringFromWebCoreString(items[i].m_text) attributes:attributes.get()]); … … 90 90 // We set the title as well as the attributed title here. The attributed title will be displayed in the menu, 91 91 // 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]]]; 93 93 [menuItem setEnabled:items[i].m_isEnabled]; 94 94 [menuItem setToolTip:nsStringFromWebCoreString(items[i].m_toolTip)]; … … 108 108 populate(items, font, textDirection); 109 109 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]; 113 113 114 NSMenu *menu = [m_popup .get()menu];114 NSMenu *menu = [m_popup menu]; 115 115 116 116 // These values were borrowed from AppKit to match their placement of the menu. … … 123 123 NSPoint location; 124 124 if (data.shouldPopOver) { 125 NSRect titleFrame = [m_popup .get()titleRectForBounds:rect];125 NSRect titleFrame = [m_popup titleRectForBounds:rect]; 126 126 if (titleFrame.size.width <= 0 || titleFrame.size.height <= 0) 127 127 titleFrame = rect; … … 133 133 RetainPtr<NSView> dummyView = adoptNS([[NSView alloc] initWithFrame:rect]); 134 134 [m_webView addSubview:dummyView.get()]; 135 location = [dummyView .get()convertPoint:location fromView:m_webView];135 location = [dummyView convertPoint:location fromView:m_webView]; 136 136 137 137 WKPopupMenu(menu, location, roundf(NSWidth(rect)), dummyView.get(), selectedIndex, font); 138 138 139 [m_popup .get()dismissPopUp];140 [dummyView .get()removeFromSuperview];139 [m_popup dismissPopUp]; 140 [dummyView removeFromSuperview]; 141 141 142 142 if (!m_client) 143 143 return; 144 144 145 m_client->valueChangedForPopupMenu(this, [m_popup .get()indexOfSelectedItem]);145 m_client->valueChangedForPopupMenu(this, [m_popup indexOfSelectedItem]); 146 146 147 147 // <https://bugs.webkit.org/show_bug.cgi?id=57904> This code is adopted from EventHandler::sendFakeEventsAfterWidgetTracking(). … … 181 181 void WebPopupMenuProxyMac::hidePopupMenu() 182 182 { 183 [m_popup .get()dismissPopUp];183 [m_popup dismissPopUp]; 184 184 } 185 185 -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm
r162139 r162505 155 155 RetainPtr<CFURLRef> clientBundleURL = adoptCF(WKCopyBundleURLForExecutableURL((CFURLRef)clientExecutableURL.get())); 156 156 RetainPtr<NSBundle> clientBundle = adoptNS([[NSBundle alloc] initWithURL:(NSURL *)clientBundleURL.get()]); 157 clientIdentifier = [clientBundle .get()bundleIdentifier];157 clientIdentifier = [clientBundle bundleIdentifier]; 158 158 if (clientIdentifier.isEmpty()) 159 159 return false; -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm
r156069 r162505 53 53 // so the coordinate system will match the event coordinate system. 54 54 m_pluginLayer = adoptNS([[CALayer alloc] init]); 55 [m_pluginLayer .get()setGeometryFlipped:YES];55 [m_pluginLayer setGeometryFlipped:YES]; 56 56 57 57 if (m_isRestartedProcess) { … … 61 61 fadeInAnimation.duration = fadeInDuration; 62 62 fadeInAnimation.removedOnCompletion = NO; 63 [m_pluginLayer .get()addAnimation:fadeInAnimation forKey:@"restarted-plugin-fade-in"];63 [m_pluginLayer addAnimation:fadeInAnimation forKey:@"restarted-plugin-fade-in"]; 64 64 } 65 65 -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
r160801 r162505 525 525 m_accessibilityObject.get().parent = webFrame()->page()->accessibilityRemoteObject(); 526 526 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()]; 529 529 } 530 530 … … 614 614 if (m_verticalScrollbarLayer) { 615 615 m_verticalScrollbarLayer.get().frame = verticalScrollbar()->frameRect(); 616 [m_verticalScrollbarLayer .get()setNeedsDisplay];616 [m_verticalScrollbarLayer setNeedsDisplay]; 617 617 } 618 618 619 619 if (m_horizontalScrollbarLayer) { 620 620 m_horizontalScrollbarLayer.get().frame = horizontalScrollbar()->frameRect(); 621 [m_horizontalScrollbarLayer .get()setNeedsDisplay];621 [m_horizontalScrollbarLayer setNeedsDisplay]; 622 622 } 623 623 624 624 if (m_scrollCornerLayer) { 625 625 m_scrollCornerLayer.get().frame = scrollCornerRect(); 626 [m_scrollCornerLayer .get()setNeedsDisplay];626 [m_scrollCornerLayer setNeedsDisplay]; 627 627 } 628 628 } … … 643 643 if (orientation == HorizontalScrollbar) { 644 644 m_horizontalScrollbarLayer = adoptNS([[WKPDFPluginScrollbarLayer alloc] initWithPDFPlugin:this]); 645 [m_containerLayer .get()addSublayer:m_horizontalScrollbarLayer.get()];645 [m_containerLayer addSublayer:m_horizontalScrollbarLayer.get()]; 646 646 } else { 647 647 m_verticalScrollbarLayer = adoptNS([[WKPDFPluginScrollbarLayer alloc] initWithPDFPlugin:this]); 648 [m_containerLayer .get()addSublayer:m_verticalScrollbarLayer.get()];648 [m_containerLayer addSublayer:m_verticalScrollbarLayer.get()]; 649 649 } 650 650 didAddScrollbar(widget.get(), orientation); … … 665 665 666 666 if (orientation == HorizontalScrollbar) { 667 [m_horizontalScrollbarLayer .get()removeFromSuperlayer];667 [m_horizontalScrollbarLayer removeFromSuperlayer]; 668 668 m_horizontalScrollbarLayer = 0; 669 669 } else { 670 [m_verticalScrollbarLayer .get()removeFromSuperlayer];670 [m_verticalScrollbarLayer removeFromSuperlayer]; 671 671 m_verticalScrollbarLayer = 0; 672 672 } … … 897 897 updatePageAndDeviceScaleFactors(); 898 898 899 [m_pdfLayerController .get()setFrameSize:size()];899 [m_pdfLayerController setFrameSize:size()]; 900 900 m_pdfLayerController.get().document = document.get(); 901 901 902 902 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])); 906 906 907 907 calculateSizes(); … … 910 910 runScriptsInPDFDocument(); 911 911 912 if ([document .get()isLocked])912 if ([document isLocked]) 913 913 createPasswordEntryForm(); 914 914 } … … 979 979 { 980 980 Vector<RetainPtr<CFStringRef>> scripts; 981 getAllScriptsInPDFDocument([m_pdfDocument .get()documentRef], scripts);981 getAllScriptsInPDFDocument([m_pdfDocument documentRef], scripts); 982 982 983 983 size_t scriptCount = scripts.size(); … … 1021 1021 newScaleFactor *= webFrame()->page()->pageScaleFactor(); 1022 1022 1023 [m_pdfLayerController .get()setDeviceScaleFactor:newScaleFactor];1023 [m_pdfLayerController setDeviceScaleFactor:newScaleFactor]; 1024 1024 } 1025 1025 … … 1031 1031 void PDFPlugin::computePageBoxes() 1032 1032 { 1033 size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument .get()documentRef]);1033 size_t pageCount = CGPDFDocumentGetNumberOfPages([m_pdfDocument documentRef]); 1034 1034 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); 1036 1036 ASSERT(pdfPage); 1037 1037 … … 1053 1053 computePageBoxes(); 1054 1054 1055 setPDFDocumentSize(IntSize([m_pdfLayerController .get()contentSizeRespectingZoom]));1055 setPDFDocumentSize(IntSize([m_pdfLayerController contentSizeRespectingZoom])); 1056 1056 } 1057 1057 … … 1081 1081 destroyScrollbar(VerticalScrollbar); 1082 1082 1083 [m_scrollCornerLayer .get()removeFromSuperlayer];1084 [m_contentLayer .get()removeFromSuperlayer];1083 [m_scrollCornerLayer removeFromSuperlayer]; 1084 [m_contentLayer removeFromSuperlayer]; 1085 1085 } 1086 1086 … … 1139 1139 context->translate(0, -size().height()); 1140 1140 1141 [m_pdfLayerController .get()snapshotInContext:context->platformContext()];1141 [m_pdfLayerController snapshotInContext:context->platformContext()]; 1142 1142 1143 1143 return bitmap.release(); … … 1192 1192 void PDFPlugin::geometryDidChange(const IntSize& pluginSize, const IntRect&, const AffineTransform& pluginToRootViewTransform) 1193 1193 { 1194 if (size() == pluginSize && pluginView()->pageScaleFactor() == [m_pdfLayerController .get()contentScaleFactor])1194 if (size() == pluginSize && pluginView()->pageScaleFactor() == [m_pdfLayerController contentScaleFactor]) 1195 1195 return; 1196 1196 1197 1197 m_size = pluginSize; 1198 1198 m_rootViewToPluginTransform = pluginToRootViewTransform.inverse(); 1199 [m_pdfLayerController .get()setFrameSize:pluginSize];1199 [m_pdfLayerController setFrameSize:pluginSize]; 1200 1200 1201 1201 [CATransaction begin]; … … 1205 1205 1206 1206 if (handlesPageScaleFactor()) { 1207 CGFloat magnification = pluginView()->pageScaleFactor() - [m_pdfLayerController .get()contentScaleFactor];1207 CGFloat magnification = pluginView()->pageScaleFactor() - [m_pdfLayerController contentScaleFactor]; 1208 1208 1209 1209 // FIXME: Instead of m_lastMousePositionInPluginCoordinates, we should use the zoom origin from PluginView::setPageScaleFactor. 1210 1210 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]; 1212 1212 } else { 1213 1213 // If we don't handle page scale ourselves, we need to respect our parent page's … … 1222 1222 m_activeAnnotation->updateGeometry(); 1223 1223 1224 [m_contentLayer .get()setSublayerTransform:transform];1224 [m_contentLayer setSublayerTransform:transform]; 1225 1225 [CATransaction commit]; 1226 1226 } … … 1320 1320 HitTestResult hitTestResult = None; 1321 1321 1322 PDFSelection *selectionUnderMouse = [m_pdfLayerController .get()getSelectionForWordAtPoint:convertFromPluginToPDFView(event.position())];1322 PDFSelection *selectionUnderMouse = [m_pdfLayerController getSelectionForWordAtPoint:convertFromPluginToPDFView(event.position())]; 1323 1323 if (selectionUnderMouse && [[selectionUnderMouse string] length]) 1324 1324 hitTestResult = Text; … … 1387 1387 switch (event.button()) { 1388 1388 case WebMouseEvent::LeftButton: 1389 [m_pdfLayerController .get()mouseDragged:nsEvent];1389 [m_pdfLayerController mouseDragged:nsEvent]; 1390 1390 return true; 1391 1391 case WebMouseEvent::RightButton: … … 1393 1393 return false; 1394 1394 case WebMouseEvent::NoButton: 1395 [m_pdfLayerController .get()mouseMoved:nsEvent];1395 [m_pdfLayerController mouseMoved:nsEvent]; 1396 1396 return true; 1397 1397 } … … 1402 1402 return targetScrollbar->mouseDown(platformEvent); 1403 1403 1404 [m_pdfLayerController .get()mouseDown:nsEvent];1404 [m_pdfLayerController mouseDown:nsEvent]; 1405 1405 return true; 1406 1406 case WebMouseEvent::RightButton: 1407 [m_pdfLayerController .get()rightMouseDown:nsEvent];1407 [m_pdfLayerController rightMouseDown:nsEvent]; 1408 1408 return true; 1409 1409 case WebMouseEvent::MiddleButton: … … 1417 1417 return targetScrollbar->mouseUp(platformEvent); 1418 1418 1419 [m_pdfLayerController .get()mouseUp:nsEvent];1419 [m_pdfLayerController mouseUp:nsEvent]; 1420 1420 return true; 1421 1421 case WebMouseEvent::RightButton: … … 1457 1457 IntPoint point = frameView->contentsToScreen(IntRect(frameView->windowToContents(event.position()), IntSize())).location(); 1458 1458 1459 if (NSMenu *nsMenu = [m_pdfLayerController .get()menuForEvent:nsEventForWebMouseEvent(event)]) {1459 if (NSMenu *nsMenu = [m_pdfLayerController menuForEvent:nsEventForWebMouseEvent(event)]) { 1460 1460 WKPopupContextMenu(nsMenu, point); 1461 1461 return true; … … 1478 1478 switch (event.type()) { 1479 1479 case WebEvent::KeyDown: 1480 return [m_pdfLayerController .get()keyDown:fakeEvent];1480 return [m_pdfLayerController keyDown:fakeEvent]; 1481 1481 default: 1482 1482 return false; … … 1517 1517 1518 1518 [CATransaction begin]; 1519 [m_pdfLayerController .get()setScrollPosition:offset];1519 [m_pdfLayerController setScrollPosition:offset]; 1520 1520 1521 1521 if (m_activeAnnotation) … … 1528 1528 { 1529 1529 if (scrollbar == horizontalScrollbar()) 1530 [m_horizontalScrollbarLayer .get()setNeedsDisplay];1530 [m_horizontalScrollbarLayer setNeedsDisplay]; 1531 1531 else if (scrollbar == verticalScrollbar()) 1532 [m_verticalScrollbarLayer .get()setNeedsDisplay];1532 [m_verticalScrollbarLayer setNeedsDisplay]; 1533 1533 } 1534 1534 1535 1535 void PDFPlugin::invalidateScrollCornerRect(const IntRect& rect) 1536 1536 { 1537 [m_scrollCornerLayer .get()setNeedsDisplay];1537 [m_scrollCornerLayer setNeedsDisplay]; 1538 1538 } 1539 1539 … … 1703 1703 int nsOptions = (options & FindOptionsCaseInsensitive) ? NSCaseInsensitiveSearch : 0; 1704 1704 1705 return [[pdfDocument() .get()findString:target withOptions:nsOptions] count];1705 return [[pdfDocument() findString:target withOptions:nsOptions] count]; 1706 1706 } 1707 1707 … … 1765 1765 1766 1766 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]; 1770 1770 m_lastFoundString = emptyString(); 1771 1771 return false; … … 1773 1773 1774 1774 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); 1776 1776 if (!selection) 1777 1777 return false; 1778 1778 1779 [m_pdfLayerController .get()setSearchSelection:selection];1780 [m_pdfLayerController .get()gotoSelection:selection];1779 [m_pdfLayerController setSearchSelection:selection]; 1780 [m_pdfLayerController gotoSelection:selection]; 1781 1781 } else { 1782 [m_pdfLayerController .get()findString:target caseSensitive:caseSensitive highlightMatches:YES];1782 [m_pdfLayerController findString:target caseSensitive:caseSensitive highlightMatches:YES]; 1783 1783 m_lastFoundString = target; 1784 1784 } … … 1789 1789 bool PDFPlugin::performDictionaryLookupAtLocation(const WebCore::FloatPoint& point) 1790 1790 { 1791 PDFSelection* lookupSelection = [m_pdfLayerController .get()getSelectionForWordAtPoint:convertFromPluginToPDFView(roundedIntPoint(point))];1791 PDFSelection* lookupSelection = [m_pdfLayerController getSelectionForWordAtPoint:convertFromPluginToPDFView(roundedIntPoint(point))]; 1792 1792 1793 1793 if ([[lookupSelection string] length]) 1794 [m_pdfLayerController .get()searchInDictionaryWithSelection:lookupSelection];1794 [m_pdfLayerController searchInDictionaryWithSelection:lookupSelection]; 1795 1795 1796 1796 return true; … … 1799 1799 void PDFPlugin::focusNextAnnotation() 1800 1800 { 1801 [m_pdfLayerController .get()activateNextAnnotation:false];1801 [m_pdfLayerController activateNextAnnotation:false]; 1802 1802 } 1803 1803 1804 1804 void PDFPlugin::focusPreviousAnnotation() 1805 1805 { 1806 [m_pdfLayerController .get()activateNextAnnotation:true];1806 [m_pdfLayerController activateNextAnnotation:true]; 1807 1807 } 1808 1808 … … 1814 1814 String PDFPlugin::getSelectionString() const 1815 1815 { 1816 return [[m_pdfLayerController .get()currentSelection] string];1816 return [[m_pdfLayerController currentSelection] string]; 1817 1817 } 1818 1818 … … 1829 1829 bool PDFPlugin::handleWheelEvent(const WebWheelEvent& event) 1830 1830 { 1831 PDFDisplayMode displayMode = [m_pdfLayerController .get()displayMode];1831 PDFDisplayMode displayMode = [m_pdfLayerController displayMode]; 1832 1832 1833 1833 if (displayMode == kPDFDisplaySinglePageContinuous || displayMode == kPDFDisplayTwoUpContinuous) 1834 1834 return ScrollableArea::handleWheelEvent(platform(event)); 1835 1835 1836 NSUInteger currentPageIndex = [m_pdfLayerController .get()currentPageIndex];1836 NSUInteger currentPageIndex = [m_pdfLayerController currentPageIndex]; 1837 1837 bool inFirstPage = currentPageIndex == 0; 1838 bool inLastPage = [m_pdfLayerController .get()lastPageIndex] == currentPageIndex;1838 bool inLastPage = [m_pdfLayerController lastPageIndex] == currentPageIndex; 1839 1839 1840 1840 bool atScrollTop = scrollPosition().y() == 0; … … 1851 1851 if (atScrollBottom && !inLastPage && event.delta().height() < 0) { 1852 1852 if (event.delta().height() <= -scrollMagnitudeThresholdForPageFlip && !inMomentumScroll) 1853 [m_pdfLayerController .get()gotoNextPage];1853 [m_pdfLayerController gotoNextPage]; 1854 1854 return true; 1855 1855 } else if (atScrollTop && !inFirstPage && event.delta().height() > 0) { 1856 1856 if (event.delta().height() >= scrollMagnitudeThresholdForPageFlip && !inMomentumScroll) { 1857 1857 [CATransaction begin]; 1858 [m_pdfLayerController .get()gotoPreviousPage];1858 [m_pdfLayerController gotoPreviousPage]; 1859 1859 scrollToOffsetWithoutAnimation(maximumScrollPosition()); 1860 1860 [CATransaction commit]; … … 1874 1874 // untouched by the user, so that PDFs which PDFKit can't display will still be downloadable. 1875 1875 if (m_pdfDocumentWasMutated) 1876 return [m_pdfDocument .get()dataRepresentation];1876 return [m_pdfDocument dataRepresentation]; 1877 1877 else 1878 1878 return rawData(); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
r161577 r162505 79 79 void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, Clipboard&, Frame& frame, bool linkDrag) 80 80 { 81 IntSize bitmapSize([image .get()size]);81 IntSize bitmapSize([image size]); 82 82 RefPtr<ShareableBitmap> bitmap = convertImageToBitmap(image.get(), bitmapSize); 83 83 ShareableBitmap::Handle handle; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PageBannerMac.mm
r152316 r162505 124 124 { 125 125 m_layer.get().contentsScale = scaleFactor; 126 [m_layer .get()setNeedsDisplay];126 [m_layer setNeedsDisplay]; 127 127 } 128 128 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r162276 r162505 403 403 m_isPaintingSuspended = true; 404 404 405 [m_rootLayer .get()setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"];405 [m_rootLayer setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"]; 406 406 [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidPauseNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]]; 407 407 } … … 416 416 m_isPaintingSuspended = false; 417 417 418 [m_rootLayer .get()setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];418 [m_rootLayer setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"]; 419 419 [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_rootLayer.get() forKey:@"layer"]]; 420 420 } … … 571 571 572 572 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()]; 574 574 575 575 if (TiledBacking* tiledBacking = mainFrameTiledBacking()) … … 597 597 [CATransaction setDisableActions:YES]; 598 598 599 [m_rootLayer .get()addSublayer:layer->platformLayer()];599 [m_rootLayer addSublayer:layer->platformLayer()]; 600 600 601 601 [CATransaction commit]; … … 632 632 [CATransaction setDisableActions:YES]; 633 633 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]; 636 636 637 637 [CATransaction commit]; … … 656 656 if (m_debugInfoLayer) { 657 657 #ifndef NDEBUG 658 [m_debugInfoLayer .get()setName:@"Debug Info"];658 [m_debugInfoLayer setName:@"Debug Info"]; 659 659 #endif 660 [m_rootLayer .get()addSublayer:m_debugInfoLayer.get()];660 [m_rootLayer addSublayer:m_debugInfoLayer.get()]; 661 661 } 662 662 } else if (m_debugInfoLayer) { 663 [m_debugInfoLayer .get()removeFromSuperlayer];663 [m_debugInfoLayer removeFromSuperlayer]; 664 664 m_debugInfoLayer = nullptr; 665 665 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r161148 r162505 597 597 } 598 598 599 [scaledNSAttributedString .get()addAttributes:scaledAttributes.get() range:range];599 [scaledNSAttributedString addAttributes:scaledAttributes.get() range:range]; 600 600 }]; 601 601 … … 733 733 { 734 734 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"]; 736 736 737 737 if (CFURLStorageSessionRef storageSession = webPage->corePage()->mainFrame().loader().networkingContext()->storageSession().platformSession()) … … 840 840 Frame* coreFrame = frame ? frame->coreFrame() : 0; 841 841 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]; 844 844 IntRect pageRect(0, 0, ceilf(printInfo.availablePaperWidth), ceilf(printInfo.availablePaperHeight)); 845 845 for (NSUInteger i = 1; i <= pageCount; ++i) {
Note: See TracChangeset
for help on using the changeset viewer.