Don't register for Lookup notifications until needed
[WebKit-https.git] / Source / WebKit2 / UIProcess / mac / WKImmediateActionController.mm
index ca715d1..77ab69c 100644 (file)
@@ -467,6 +467,8 @@ using namespace WebKit;
     if (!dictionaryPopupInfo.attributedString.string)
         return nil;
 
+    [_wkView _prepareForDictionaryLookup];
+
     // Convert baseline to screen coordinates.
     NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
     textBaselineOrigin = [_wkView convertPoint:textBaselineOrigin toView:nil];