Don't register for Lookup notifications until needed
authorconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 04:23:41 +0000 (04:23 +0000)
committerconrad_shultz@apple.com <conrad_shultz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 04:23:41 +0000 (04:23 +0000)
commita917f499ddc0034fc5f3b20666f397030aed6809
tree749603c8e5432565213fdf60e60a8bc164c50f7d
parent9bc38b4cc3bc19ce3f5481829c5577e1d65f8dab
Don't register for Lookup notifications until needed
https://bugs.webkit.org/show_bug.cgi?id=144783

Reviewed by Tim Horton.

* UIProcess/API/mac/WKView.mm:
Add a WKViewData ivar to track whether we've already registered for popover notifications.
(-[WKView _prepareForDictionaryLookup]):
Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
(-[WKView initWithFrame:processPool:configuration:webView:]):
Move notification registration to -_prepareForDictionaryLookup.

* UIProcess/API/mac/WKViewInternal.h:
Expose -_prepareForDictionaryLookup.

* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
Send -[WKView _prepareForDictionaryLookup].

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm