Speculative build fix.
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Dec 2014 01:30:07 +0000 (01:30 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Dec 2014 01:30:07 +0000 (01:30 +0000)
Source/WebCore:

* platform/spi/mac/LookupSPI.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
* WebView/WebViewInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/spi/mac/LookupSPI.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewInternal.h

index 34e36d9..24c18b3 100644 (file)
@@ -4,6 +4,12 @@
 
         * platform/spi/mac/LookupSPI.h:
 
+2014-12-15  Beth Dakin  <bdakin@apple.com>
+
+        Speculative build fix.
+
+        * platform/spi/mac/LookupSPI.h:
+
 2014-12-15  Jer Noble  <jer.noble@apple.com>
 
         Switching src of <video> with clipping layer results in empty black square.
index f8e867a..a45ce7f 100644 (file)
@@ -48,10 +48,14 @@ SOFT_LINK_CLASS_OPTIONAL(Lookup, LULookupDefinitionModule)
 
 #endif // !USE(APPLE_INTERNAL_SDK)
 
+#if  __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 @interface LULookupDefinitionModule (AnimationController)
 
 + (id<NSImmediateActionAnimationController>)lookupAnimationControllerForTerm:(NSAttributedString *)term atLocation:(NSPoint)screenPoint options:(NSDictionary *)options;
 
 @end
 
+#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+
 #endif // PLATFORM(MAC)
index 157f079..6e9b664 100644 (file)
@@ -1,5 +1,13 @@
 2014-12-15  Beth Dakin  <bdakin@apple.com>
 
+        Speculative build fix.
+
+        * WebView/WebView.mm:
+        (-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
+        * WebView/WebViewInternal.h:
+
+2014-12-15  Beth Dakin  <bdakin@apple.com>
+
         Make lookup an immediate action instead of an action menu item
         https://bugs.webkit.org/show_bug.cgi?id=139661
         -and corresponding-
index 61555e0..b1f277c 100644 (file)
@@ -8611,6 +8611,33 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
 {
     return _private->immediateActionController;
 }
+
+- (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo
+{
+    if (!dictionaryPopupInfo.attributedString)
+        return nil;
+
+    NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
+
+    // Convert to screen coordinates.
+    textBaselineOrigin = [self.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
+
+    if (canLoadLUTermOptionDisableSearchTermIndicator() && canLoadLUNotificationPopoverWillClose()) {
+        if (!_private->hasInitializedLookupObserver) {
+            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
+            _private->hasInitializedLookupObserver = YES;
+        }
+
+        RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([dictionaryPopupInfo.options mutableCopy]);
+        if (!mutableOptions)
+            mutableOptions = adoptNS([[NSMutableDictionary alloc] init]);
+        [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()];
+        [self _setTextIndicator:dictionaryPopupInfo.textIndicator.get() fadeOut:NO animationCompletionHandler:[] { }];
+        return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
+    }
+
+    return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:dictionaryPopupInfo.options.get()];
+}
 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
 
 - (void)_setTextIndicator:(TextIndicator *)textIndicator fadeOut:(BOOL)fadeOut animationCompletionHandler:(std::function<void ()>)completionHandler
@@ -8659,33 +8686,6 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
         [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:dictionaryPopupInfo.options.get()];
 }
 
-- (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo
-{
-    if (!dictionaryPopupInfo.attributedString)
-        return nil;
-
-    NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
-
-    // Convert to screen coordinates.
-    textBaselineOrigin = [self.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
-
-    if (canLoadLUTermOptionDisableSearchTermIndicator() && canLoadLUNotificationPopoverWillClose()) {
-        if (!_private->hasInitializedLookupObserver) {
-            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
-            _private->hasInitializedLookupObserver = YES;
-        }
-
-        RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([dictionaryPopupInfo.options mutableCopy]);
-        if (!mutableOptions)
-            mutableOptions = adoptNS([[NSMutableDictionary alloc] init]);
-        [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()];
-        [self _setTextIndicator:dictionaryPopupInfo.textIndicator.get() fadeOut:NO animationCompletionHandler:[] { }];
-        return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
-    }
-
-    return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:dictionaryPopupInfo.options.get()];
-}
-
 - (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
 {
     [self _setTextIndicator:nullptr fadeOut:NO animationCompletionHandler:[] { }];
index 03d4049..88dd3cd 100644 (file)
@@ -262,8 +262,8 @@ OBJC_CLASS NSTextAlternatives;
 - (void)_setTextIndicator:(WebCore::TextIndicator*)textIndicator fadeOut:(BOOL)fadeOut animationCompletionHandler:(std::function<void ()>)completionHandler;
 - (void)_clearTextIndicator;
 - (void)_showDictionaryLookupPopup:(const DictionaryPopupInfo&)dictionaryPopupInfo;
-- (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo;
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+- (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo;
 - (WebActionMenuController *)_actionMenuController;
 - (WebImmediateActionController *)_immediateActionController;
 #endif