Changeset 183978 in webkit
- Timestamp:
- May 7, 2015, 9:23:41 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/mac/WKView.mm (modified) (3 diffs)
-
UIProcess/API/mac/WKViewInternal.h (modified) (1 diff)
-
UIProcess/mac/PageClientImpl.mm (modified) (1 diff)
-
UIProcess/mac/WKImmediateActionController.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r183977 r183978 1 2015-05-07 Conrad Shultz <conrad_shultz@apple.com> 2 3 Don't register for Lookup notifications until needed 4 https://bugs.webkit.org/show_bug.cgi?id=144783 5 6 Reviewed by Tim Horton. 7 8 * UIProcess/API/mac/WKView.mm: 9 Add a WKViewData ivar to track whether we've already registered for popover notifications. 10 (-[WKView _prepareForDictionaryLookup]): 11 Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:. 12 (-[WKView initWithFrame:processPool:configuration:webView:]): 13 Move notification registration to -_prepareForDictionaryLookup. 14 15 * UIProcess/API/mac/WKViewInternal.h: 16 Expose -_prepareForDictionaryLookup. 17 18 * UIProcess/mac/PageClientImpl.mm: 19 (WebKit::PageClientImpl::didPerformDictionaryLookup): 20 Send -[WKView _prepareForDictionaryLookup]. 21 22 * UIProcess/mac/WKImmediateActionController.mm: 23 (-[WKImmediateActionController _animationControllerForText]): 24 Ditto. 25 1 26 2015-05-07 Commit Queue <commit-queue@webkit.org> 2 27 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r183976 r183978 280 280 281 281 CGFloat _overrideDeviceScaleFactor; 282 283 BOOL _didRegisterForLookupPopoverCloseNotifications; 282 284 283 285 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 … … 2889 2891 } 2890 2892 2893 - (void)_prepareForDictionaryLookup 2894 { 2895 if (_data->_didRegisterForLookupPopoverCloseNotifications) 2896 return; 2897 2898 _data->_didRegisterForLookupPopoverCloseNotifications = YES; 2899 2900 if (canLoadLUNotificationPopoverWillClose()) 2901 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil]; 2902 } 2903 2891 2904 - (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification 2892 2905 { … … 3833 3846 [workspaceNotificationCenter addObserver:self selector:@selector(_activeSpaceDidChange:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil]; 3834 3847 3835 if (canLoadLUNotificationPopoverWillClose())3836 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];3837 3838 3848 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 3839 3849 if ([self respondsToSelector:@selector(_setActionMenu:)]) { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r183841 r183978 141 141 - (void)_closeFullScreenWindowController; 142 142 143 - (void)_prepareForDictionaryLookup; 144 143 145 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 144 146 - (void)_didPerformActionMenuHitTest:(const WebKit::WebHitTestResult::Data&)hitTestResult forImmediateAction:(BOOL)forImmediateAction contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData; -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r183517 r183978 594 594 RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([(NSDictionary *)dictionaryPopupInfo.options.get() mutableCopy]); 595 595 596 [m_wkView _prepareForDictionaryLookup]; 597 596 598 if (canLoadLUTermOptionDisableSearchTermIndicator() && dictionaryPopupInfo.textIndicator.contentImage) { 597 599 [m_wkView _setTextIndicator:*TextIndicator::create(dictionaryPopupInfo.textIndicator) withLifetime:TextIndicatorLifetime::Permanent]; -
trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm
r183517 r183978 468 468 return nil; 469 469 470 [_wkView _prepareForDictionaryLookup]; 471 470 472 // Convert baseline to screen coordinates. 471 473 NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
Note:
See TracChangeset
for help on using the changeset viewer.