Diff
Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1,35 +1,5 @@
2014-11-17 Dana Burkart <[email protected]>
- Merge r176164. <rdar://problem/18953982>
-
- 2014-11-16 Tim Horton <[email protected]>
-
- Use TextIndicator instead of the built in Lookup highlight
- https://bugs.webkit.org/show_bug.cgi?id=138775
- <rdar://problem/18953982>
-
- Reviewed by Anders Carlsson.
-
- * WebCore.exp.in:
- * platform/mac/WebCoreSystemInterface.h:
- * platform/mac/WebCoreSystemInterface.mm:
- Remove a WKSI import/export that we don't need anymore.
-
- * platform/spi/mac/LookupSPI.h: Added.
- (WebCore::canDisableLookupIndicator):
- Add Lookup SPI header.
- Add a 'canDisableLookupIndicator', which must be called in any translation
- unit that wants to use either of the soft-linked constants related to
- that functionality, before calling the get* function.
-
- * WebCore.xcodeproj/project.pbxproj:
- * editing/mac/DictionaryLookup.mm:
- (WebCore::rangeForDictionaryLookupForSelection):
- (WebCore::rangeForDictionaryLookupAtHitTestResult):
- Adopt the Lookup SPI header.
-
-2014-11-17 Dana Burkart <[email protected]>
-
Merge r175492. <rdar://problem/18978410>
2014-11-03 Simon Fraser <[email protected]>
Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in 2014-11-18 04:13:01 UTC (rev 176249)
@@ -2420,6 +2420,7 @@
_wkDrawMediaUIPart
_wkDrawTextFieldCellFocusRing
_wkExecutableWasLinkedOnOrBeforeSnowLeopard
+_wkExtractWordDefinitionTokenRangeFromContextualString
_wkGetAXTextMarkerRangeTypeID
_wkGetAXTextMarkerTypeID
_wkGetBytesFromAXTextMarker
Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1083,7 +1083,6 @@
2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D3EF4451917915C00034184 /* WebActionDisablingCALayerDelegate.mm */; };
2D3EF44A1917915C00034184 /* WebCoreCALayerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
2D3EF44B1917915C00034184 /* WebCoreCALayerExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */; };
- 2D413F611A187A3F0041A521 /* LookupSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D413F601A187A3F0041A521 /* LookupSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
2D46F04E17B96FBD005647F0 /* IntPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D46F04D17B96FBD005647F0 /* IntPoint.cpp */; };
2D46F05017B96FD2005647F0 /* IntSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D46F04F17B96FD2005647F0 /* IntSize.cpp */; };
2D481F00146B5C4C00AA7834 /* CrossfadeGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FC0541460CD6F00263633 /* CrossfadeGeneratedImage.cpp */; };
@@ -8107,7 +8106,6 @@
2D3EF4451917915C00034184 /* WebActionDisablingCALayerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebActionDisablingCALayerDelegate.mm; sourceTree = "<group>"; };
2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreCALayerExtras.h; sourceTree = "<group>"; };
2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreCALayerExtras.mm; sourceTree = "<group>"; };
- 2D413F601A187A3F0041A521 /* LookupSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookupSPI.h; sourceTree = "<group>"; };
2D46F04D17B96FBD005647F0 /* IntPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntPoint.cpp; sourceTree = "<group>"; };
2D46F04F17B96FD2005647F0 /* IntSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntSize.cpp; sourceTree = "<group>"; };
2D58D8531A15F65F00A5F726 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = "<group>"; };
@@ -17631,7 +17629,6 @@
isa = PBXGroup;
children = (
2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */,
- 2D413F601A187A3F0041A521 /* LookupSPI.h */,
2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */,
2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */,
9348428119F1A9190009D5AE /* NSViewSPI.h */,
@@ -23628,7 +23625,7 @@
A584FE351864D5AF00843B10 /* CommandLineAPIHost.h in Headers */,
A584FE2C1863870F00843B10 /* CommandLineAPIModule.h in Headers */,
A584FE2618637DAB00843B10 /* CommandLineAPIModuleSource.h in Headers */,
- 2D413F611A187A3F0041A521 /* LookupSPI.h in Headers */,
+ 2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
6550B6A2099DF0270090D781 /* Comment.h in Headers */,
E1FE137518402A6700892F13 /* CommonCryptoUtilities.h in Headers */,
37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */,
Modified: branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -34,7 +34,6 @@
#import "FrameSelection.h"
#import "HTMLConverter.h"
#import "HitTestResult.h"
-#import "LookupSPI.h"
#import "Page.h"
#import "Range.h"
#import "RenderObject.h"
@@ -116,9 +115,8 @@
String fullPlainTextString = plainText(makeRange(paragraphStart, paragraphEnd).get());
// Since we already have the range we want, we just need to grab the returned options.
- if (Class luLookupDefinitionModule = getLULookupDefinitionModuleClass())
- [luLookupDefinitionModule tokenRangeForString:fullPlainTextString range:rangeToPass options:options];
-
+ wkExtractWordDefinitionTokenRangeFromContextualString(fullPlainTextString, rangeToPass, options);
+
return selectedRange.release();
}
@@ -157,9 +155,7 @@
String fullPlainTextString = plainText(fullCharacterRange.get());
- NSRange extractedRange = NSMakeRange(rangeToPass.location, 0);
- if (Class luLookupDefinitionModule = getLULookupDefinitionModuleClass())
- extractedRange = [luLookupDefinitionModule tokenRangeForString:fullPlainTextString range:rangeToPass options:options];
+ NSRange extractedRange = wkExtractWordDefinitionTokenRangeFromContextualString(fullPlainTextString, rangeToPass, options);
// This function sometimes returns {NSNotFound, 0} if it was unable to determine a good string.
if (extractedRange.location == NSNotFound)
Modified: branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -288,6 +288,8 @@
extern bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
+extern NSRange (*wkExtractWordDefinitionTokenRangeFromContextualString)(NSString *contextString, NSRange range, NSDictionary **options);
+
extern CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
extern NSCursor *(*wkCursor)(const char*);
Modified: branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -146,6 +146,8 @@
bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
+NSRange (*wkExtractWordDefinitionTokenRangeFromContextualString)(NSString *contextString, NSRange range, NSDictionary **options);
+
CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
void (*wkSetCrashReportApplicationSpecificInformation)(CFStringRef);
Deleted: branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "SoftLinking.h"
-#import <objc/runtime.h>
-
-#if PLATFORM(MAC)
-
-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Lookup)
-SOFT_LINK_CLASS_OPTIONAL(Lookup, LULookupDefinitionModule)
-
-SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUTermOptionDisableSearchTermIndicator, NSString *)
-SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *)
-
-namespace WebCore {
-inline bool canDisableLookupIndicator()
-{
- return canLoadLUTermOptionDisableSearchTermIndicator() && canLoadLUNotificationPopoverWillClose();
-}
-};
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <Lookup/Lookup.h>
-
-#else
-
-@interface LULookupDefinitionModule : NSObject
-
-+ (NSRange)tokenRangeForString:(NSString *)string range:(NSRange)range options:(NSDictionary **)options;
-+ (void)showDefinitionForTerm:(NSAttributedString *)term atLocation:(NSPoint)screenPoint options:(NSDictionary *)options;
-+ (void)hideDefinition;
-
-@end
-
-#endif // !USE(APPLE_INTERNAL_SDK)
-
-#endif // PLATFORM(MAC)
Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1,27 +1,5 @@
2014-11-17 Dana Burkart <[email protected]>
- Merge r176164. <rdar://problem/18953982>
-
- 2014-11-16 Tim Horton <[email protected]>
-
- Use TextIndicator instead of the built in Lookup highlight
- https://bugs.webkit.org/show_bug.cgi?id=138775
- <rdar://problem/18953982>
-
- Reviewed by Anders Carlsson.
-
- * WebCoreSupport/WebSystemInterface.mm:
- (InitWebCoreSystemInterface):
- Remove a WKSI import.
-
- * WebView/WebActionMenuController.mm:
- (-[WebActionMenuController _lookupText:]):
- (-[WebActionMenuController _createActionMenuItemForTag:]):
- Make use of the new Lookup SPI header.
- Disable the Lookup item if lookup is not available.
-
-2014-11-17 Dana Burkart <[email protected]>
-
Merge r176145. <rdar://problem/18989840>
2014-11-14 Timothy Horton <[email protected]>
Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -163,6 +163,7 @@
#if !PLATFORM(IOS)
INIT(RecommendedScrollerStyle);
INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
+ INIT(ExtractWordDefinitionTokenRangeFromContextualString);
INIT(CopyDefaultSearchProviderDisplayName);
INIT(Cursor);
#endif
Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -48,7 +48,6 @@
#import <WebCore/FrameView.h>
#import <WebCore/HTMLConverter.h>
#import <WebCore/LocalizedStrings.h>
-#import <WebCore/LookupSPI.h>
#import <WebCore/NSSharingServicePickerSPI.h>
#import <WebCore/NSSharingServiceSPI.h>
#import <WebCore/NSViewSPI.h>
@@ -565,7 +564,7 @@
// Convert to screen coordinates.
textBaselineOrigin = [_webView.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
- [getLULookupDefinitionModuleClass() showDefinitionForTerm:popupInfo.attributedString.get() atLocation:textBaselineOrigin options:popupInfo.options.get()];
+ WKShowWordDefinitionWindow(popupInfo.attributedString.get(), textBaselineOrigin, popupInfo.options.get());
}
- (void)_paste:(id)sender
@@ -691,7 +690,6 @@
SEL selector = nullptr;
NSString *title = nil;
NSImage *image = nil;
- bool enabled = true;
switch (tag) {
case WebActionMenuItemTagOpenLinkInDefaultBrowser:
@@ -722,7 +720,6 @@
selector = @selector(_lookupText:);
title = WEB_UI_STRING_KEY("Look Up", "Look Up (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuLookup"];
- enabled = getLULookupDefinitionModuleClass();
break;
case WebActionMenuItemTagPaste:
@@ -785,7 +782,6 @@
[item setImage:image];
[item setTarget:self];
[item setTag:tag];
- [item setEnabled:enabled];
return item;
}
Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1,100 +1,5 @@
2014-11-17 Dana Burkart <[email protected]>
- Merge r176164. <rdar://problem/18953982>
-
- 2014-11-16 Tim Horton <[email protected]>
-
- Use TextIndicator instead of the built in Lookup highlight
- https://bugs.webkit.org/show_bug.cgi?id=138775
- <rdar://problem/18953982>
-
- Reviewed by Anders Carlsson.
-
- In order to make the yellow highlight for Lookup more accurately match the
- painted content of the web page (in light of e.g. Web fonts, and interesting
- text features that only WebKit implements and cannot round-trip through
- NSAttributedString), use a TextIndicator instead of the built-in Lookup
- highlight where possible.
-
- * Configurations/BaseTarget.xcconfig:
- Make it possible to include headers from private frameworks. This matches WebCore.
-
- * Shared/DictionaryPopupInfo.cpp:
- (WebKit::DictionaryPopupInfo::encode):
- (WebKit::DictionaryPopupInfo::decode):
- * Shared/DictionaryPopupInfo.h:
- Include the attributed string inside the DictionaryPopupInfo, instead of
- as a secondary argument to DidPerformDictionaryLookup.
- Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
- the text in the UI process.
-
- * UIProcess/API/mac/WKView.mm:
- (-[WKView dealloc]):
- (-[WKView viewDidMoveToWindow]):
- (-[WKView _dictionaryLookupPopoverWillClose:]):
- (-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
- (-[WKView _setTextIndicator:fadeOut:animate:]):
- (-[WKView initWithFrame:context:configuration:webView:]):
- (+[WKView hideWordDefinitionWindow]):
- * UIProcess/API/mac/WKViewInternal.h:
- Adopt the Lookup SPI header.
- If we have the requisite API, register the notification that Lookup sends
- when the popover closes, and hook that up to hide the text indicator.
- Add a version of _setTextIndicator: that takes an animation completion handler.
-
- * UIProcess/PageClient.h:
- * UIProcess/WebPageProxy.h:
- * UIProcess/WebPageProxy.messages.in:
- * UIProcess/ios/WebPageProxyIOS.mm:
- (WebKit::WebPageProxy::didPerformDictionaryLookup):
- * UIProcess/mac/WebPageProxyMac.mm:
- (WebKit::WebPageProxy::didPerformDictionaryLookup):
- Adjust to the new didPerformDictionaryLookup signature.
-
- * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
- (InitWebCoreSystemInterface):
- Remove a WKSI import.
-
- * UIProcess/mac/PageClientImpl.h:
- * UIProcess/mac/PageClientImpl.mm:
- (WebKit::PageClientImpl::didPerformDictionaryLookup):
- If we have the requisite API, disable Lookup's built-in highlight and
- present a TextIndicator instead.
- We currently have to run the animations serially (first bounce the TextIndicator,
- then animate in the Lookup popover) because the act of adding the Lookup popover
- blocks us from getting any animation events for the TextIndicator, and breaks
- the bounce. We could also fix this by using a threaded animation for the TextIndicator,
- but it's not clear that it's safe to do so.
-
- (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
- When explicitly dismissing the Lookup panel, also hide the text indicator.
-
- * UIProcess/mac/TextIndicatorWindow.h:
- * UIProcess/mac/TextIndicatorWindow.mm:
- (WebKit::TextIndicatorWindow::setTextIndicator):
- Store the completion handler.
-
- (WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
- Call the completion handler when the animation completes.
-
- * UIProcess/mac/WKActionMenuController.mm:
- (-[WKActionMenuController _createActionMenuItemForTag:]):
- Disable the Lookup item if lookup is not available.
-
- * WebProcess/Plugins/PDF/PDFPlugin.mm:
- (WebKit::PDFPlugin::showDefinitionForAttributedString):
- Adjust to the new didPerformDictionaryLookup signature.
- Since PDFPlugin can't trivially repaint the required part of the PDF,
- we don't build a TextIndicator. This will result in PDFPlugin continuing
- to use Lookup's built-in highlight.
-
- * WebProcess/WebPage/mac/WebPageMac.mm:
- (WebKit::WebPage::performDictionaryLookupForRange):
- Build a TextIndicator from the Lookup range and pass it along with
- the DictionaryPopupInfo.
-
-2014-11-17 Dana Burkart <[email protected]>
-
Merge r176150. <rdar://problem/18982046>
2014-11-14 Tim Horton <[email protected]>
Modified: branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig 2014-11-18 04:13:01 UTC (rev 176249)
@@ -29,7 +29,7 @@
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit
HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2 $(HEADER_SEARCH_PATHS);
-OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
+OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks;
OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
NORMAL_WEBKIT_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/Frameworks;
Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp 2014-11-18 04:13:01 UTC (rev 176249)
@@ -37,15 +37,12 @@
void DictionaryPopupInfo::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << origin;
- encoder << textIndicator;
#if PLATFORM(COCOA)
bool hadOptions = options;
encoder << hadOptions;
if (hadOptions)
IPC::encode(encoder, options.get());
-
- encoder << attributedString;
#endif
}
@@ -53,10 +50,6 @@
{
if (!decoder.decode(result.origin))
return false;
-
- if (!decoder.decode(result.textIndicator))
- return false;
-
#if PLATFORM(COCOA)
bool hadOptions;
if (!decoder.decode(hadOptions))
@@ -65,9 +58,6 @@
if (!IPC::decode(decoder, result.options))
return false;
}
-
- if (!decoder.decode(result.attributedString))
- return false;
#endif
return true;
}
Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -26,17 +26,15 @@
#ifndef DictionaryPopupInfo_h
#define DictionaryPopupInfo_h
-#include "TextIndicator.h"
#include <WebCore/FloatPoint.h>
#if PLATFORM(COCOA)
-#include "AttributedString.h"
#include <wtf/RetainPtr.h>
#endif
namespace IPC {
-class ArgumentDecoder;
-class ArgumentEncoder;
+ class ArgumentDecoder;
+ class ArgumentEncoder;
}
namespace WebKit {
@@ -46,10 +44,8 @@
static bool decode(IPC::ArgumentDecoder&, DictionaryPopupInfo&);
WebCore::FloatPoint origin;
- TextIndicator::Data textIndicator;
#if PLATFORM(COCOA)
RetainPtr<CFDictionaryRef> options;
- AttributedString attributedString;
#endif
};
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -88,7 +88,6 @@
#import <WebCore/FileSystem.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/LocalizedStrings.h>
-#import <WebCore/LookupSPI.h>
#import <WebCore/NSViewSPI.h>
#import <WebCore/PlatformEventFactoryMac.h>
#import <WebCore/PlatformScreen.h>
@@ -326,9 +325,6 @@
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationWillTerminateNotification object:NSApp];
- if (canDisableLookupIndicator())
- [[NSNotificationCenter defaultCenter] removeObserver:self name:getLUNotificationPopoverWillClose() object:nil];
-
WebContext::statistics().wkViewCount--;
[super dealloc];
@@ -2557,8 +2553,7 @@
[NSEvent removeMonitor:_data->_flagsChangedEventMonitor];
_data->_flagsChangedEventMonitor = nil;
- if (getLULookupDefinitionModuleClass())
- [getLULookupDefinitionModuleClass() hideDefinition];
+ WKHideWordDefinitionWindow();
[self _dismissActionMenuPopovers];
}
@@ -2694,11 +2689,6 @@
_data->_page->process().context().applicationWillTerminate();
}
-- (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
-{
- [self _setTextIndicator:nil fadeOut:NO animate:NO];
-}
-
- (void)_accessibilityRegisterUIProcessTokens
{
// Initialize remote accessibility when the window connection has been established.
@@ -3067,7 +3057,7 @@
}
}
-- (void)_setTextIndicator:(PassRefPtr<TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate animationCompletionHandler:(std::function<void ()>)completionHandler
+- (void)_setTextIndicator:(PassRefPtr<TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
{
if (!textIndicator) {
_data->_textIndicatorWindow = nullptr;
@@ -3077,14 +3067,9 @@
if (!_data->_textIndicatorWindow)
_data->_textIndicatorWindow = std::make_unique<TextIndicatorWindow>(self);
- _data->_textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, animate, WTF::move(completionHandler));
+ _data->_textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, animate);
}
-- (void)_setTextIndicator:(PassRefPtr<TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
-{
- [self _setTextIndicator:textIndicator fadeOut:fadeOut animate:animate animationCompletionHandler:[] {}];
-}
-
- (CALayer *)_rootLayer
{
return [_data->_layerHostingView layer];
@@ -3574,9 +3559,6 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:NSApp];
- if (canDisableLookupIndicator())
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
-
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
if ([self respondsToSelector:@selector(setActionMenu:)]) {
RetainPtr<NSMenu> menu = adoptNS([[NSMenu alloc] init]);
@@ -3819,9 +3801,7 @@
+ (void)hideWordDefinitionWindow
{
- if (!getLULookupDefinitionModuleClass())
- return;
- [getLULookupDefinitionModuleClass() hideDefinition];
+ WKHideWordDefinitionWindow();
}
- (CGFloat)minimumLayoutWidth
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -81,7 +81,6 @@
- (NSRect)_convertToDeviceSpace:(NSRect)rect;
- (NSRect)_convertToUserSpace:(NSRect)rect;
- (void)_setTextIndicator:(PassRefPtr<WebKit::TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
-- (void)_setTextIndicator:(PassRefPtr<WebKit::TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate animationCompletionHandler:(std::function<void ()>)completionHandler;
- (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer;
- (CALayer *)_acceleratedCompositingModeRootLayer;
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -223,7 +223,7 @@
#if PLATFORM(MAC)
virtual void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) = 0;
virtual void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState) = 0;
- virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&) = 0;
+ virtual void didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&) = 0;
virtual void dismissDictionaryLookupPanel() = 0;
virtual void dismissActionMenuPopovers() = 0;
virtual void showCorrectionPanel(WebCore::AlternativeTextType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) = 0;
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1148,7 +1148,7 @@
void searchTheWeb(const String&);
// Dictionary.
- void didPerformDictionaryLookup(const DictionaryPopupInfo&);
+ void didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&);
#endif
// Spelling and grammar.
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2014-11-18 04:13:01 UTC (rev 176249)
@@ -287,7 +287,7 @@
#if PLATFORM(COCOA)
# Dictionary support.
- DidPerformDictionaryLookup(WebKit::DictionaryPopupInfo dictionaryPopupInfo)
+ DidPerformDictionaryLookup(WebKit::AttributedString text, WebKit::DictionaryPopupInfo dictionaryPopupInfo)
# Keyboard input support messages
ExecuteSavedCommandBySelector(String selector) -> (bool handled)
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -750,7 +750,7 @@
process().send(Messages::WebPage::SetAssistedNodeSelectedIndex(index, allowMultipleSelection), m_pageID);
}
-void WebPageProxy::didPerformDictionaryLookup(const DictionaryPopupInfo&)
+void WebPageProxy::didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&)
{
notImplemented();
}
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -136,7 +136,7 @@
virtual void makeFirstResponder();
- virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&);
+ virtual void didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&);
virtual void dismissDictionaryLookupPanel();
virtual void dismissActionMenuPopovers();
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -58,7 +58,6 @@
#import <WebCore/GraphicsContext.h>
#import <WebCore/Image.h>
#import <WebCore/KeyboardEvent.h>
-#import <WebCore/LookupSPI.h>
#import <WebCore/NotImplemented.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/TextUndoInsertionMarkupMac.h>
@@ -530,39 +529,22 @@
[m_wkView _setPluginComplexTextInputState:pluginComplexTextInputState pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
}
-void PageClientImpl::didPerformDictionaryLookup(const DictionaryPopupInfo& dictionaryPopupInfo)
+void PageClientImpl::didPerformDictionaryLookup(const AttributedString& text, const DictionaryPopupInfo& dictionaryPopupInfo)
{
- if (!getLULookupDefinitionModuleClass())
- return;
-
+ RetainPtr<NSAttributedString> attributedString = text.string;
NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
// Convert to screen coordinates.
textBaselineOrigin = [m_wkView convertPoint:textBaselineOrigin toView:nil];
textBaselineOrigin = [m_wkView.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
- RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([(NSDictionary *)dictionaryPopupInfo.options.get() mutableCopy]);
-
- if (canDisableLookupIndicator() && dictionaryPopupInfo.textIndicator.contentImage) {
- // Run the animations serially because attaching another subwindow breaks the bounce animation.
- // We could consider making the bounce NSAnimationNonblockingThreaded instead, which seems
- // to work, but need to consider all of the implications.
- [m_wkView _setTextIndicator:TextIndicator::create(dictionaryPopupInfo.textIndicator) fadeOut:NO animate:YES animationCompletionHandler:[dictionaryPopupInfo, textBaselineOrigin, mutableOptions] {
- [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()];
- [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
- }];
- } else
- [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
+ WKShowWordDefinitionWindow(attributedString.get(), textBaselineOrigin, (NSDictionary *)dictionaryPopupInfo.options.get());
}
void PageClientImpl::dismissDictionaryLookupPanel()
{
- if (!getLULookupDefinitionModuleClass())
- return;
-
// FIXME: We don't know which panel we are dismissing, it may not even be in the current page (see <rdar://problem/13875766>).
- [getLULookupDefinitionModuleClass() hideDefinition];
- setTextIndicator(nil, false, true);
+ WKHideWordDefinitionWindow();
}
void PageClientImpl::dismissActionMenuPopovers()
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h 2014-11-18 04:13:01 UTC (rev 176249)
@@ -29,7 +29,6 @@
#if PLATFORM(MAC)
#import "WebKitSystemInterface.h"
-#import <functional>
#import <wtf/Noncopyable.h>
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
@@ -49,7 +48,7 @@
explicit TextIndicatorWindow(WKView *);
~TextIndicatorWindow();
- void setTextIndicator(PassRefPtr<TextIndicator>, bool fadeOut, bool animate, std::function<void ()> animationCompletionHandler);
+ void setTextIndicator(PassRefPtr<TextIndicator>, bool fadeOut, bool animate);
private:
void closeWindow();
@@ -71,8 +70,6 @@
RunLoop::Timer<TextIndicatorWindow> m_startFadeOutTimer;
RetainPtr<WKTextIndicatorWindowAnimation> m_fadeOutAnimation;
-
- std::function<void ()> m_bounceAnimationCompletionHandler;
};
} // namespace WebKit
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -120,7 +120,7 @@
closeWindow();
}
-void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, bool fadeOut, bool animate, std::function<void ()> animationCompletionHandler)
+void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, bool fadeOut, bool animate)
{
if (m_textIndicator == textIndicator)
return;
@@ -154,7 +154,6 @@
[m_textIndicatorWindow setReleasedWhenClosed:NO];
if (animate) {
- m_bounceAnimationCompletionHandler = WTF::move(animationCompletionHandler);
// Start the bounce animation.
m_bounceAnimationContext = WKWindowBounceAnimationContextCreate(m_textIndicatorWindow.get());
m_bounceAnimation = adoptNS([[WKTextIndicatorWindowAnimation alloc] _initWithTextIndicatorWindow:this animationDuration:bounceAnimationDuration
@@ -231,7 +230,6 @@
WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext);
m_bounceAnimationContext = 0;
- m_bounceAnimationCompletionHandler();
}
} // namespace WebKit
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -45,7 +45,6 @@
#import <WebCore/DataDetectorsSPI.h>
#import <WebCore/GeometryUtilities.h>
#import <WebCore/LocalizedStrings.h>
-#import <WebCore/LookupSPI.h>
#import <WebCore/NSSharingServiceSPI.h>
#import <WebCore/NSSharingServicePickerSPI.h>
#import <WebCore/NSViewSPI.h>
@@ -757,7 +756,6 @@
SEL selector = nullptr;
NSString *title = nil;
NSImage *image = nil;
- bool enabled = true;
switch (tag) {
case kWKContextActionItemTagOpenLinkInDefaultBrowser:
@@ -813,7 +811,6 @@
selector = @selector(_lookupText:);
title = WEB_UI_STRING_KEY("Look Up", "Look Up (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuLookup"];
- enabled = getLULookupDefinitionModuleClass();
break;
case kWKContextActionItemTagPaste:
@@ -853,7 +850,6 @@
[item setImage:image];
[item setTarget:self];
[item setTag:tag];
- [item setEnabled:enabled];
return item;
}
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -450,9 +450,9 @@
process().send(Messages::WebPage::SetSmartInsertDeleteEnabled(isSmartInsertDeleteEnabled), m_pageID);
}
-void WebPageProxy::didPerformDictionaryLookup(const DictionaryPopupInfo& dictionaryPopupInfo)
+void WebPageProxy::didPerformDictionaryLookup(const AttributedString& text, const DictionaryPopupInfo& dictionaryPopupInfo)
{
- m_pageClient.didPerformDictionaryLookup(dictionaryPopupInfo);
+ m_pageClient.didPerformDictionaryLookup(text, dictionaryPopupInfo);
}
void WebPageProxy::registerWebProcessAccessibilityToken(const IPC::DataReference& data)
Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -1700,9 +1700,11 @@
{
DictionaryPopupInfo dictionaryPopupInfo;
dictionaryPopupInfo.origin = convertFromPDFViewToRootView(IntPoint(point));
- dictionaryPopupInfo.attributedString.string = string;
- webFrame()->page()->send(Messages::WebPageProxy::DidPerformDictionaryLookup(dictionaryPopupInfo));
+ AttributedString attributedString;
+ attributedString.string = string;
+
+ webFrame()->page()->send(Messages::WebPageProxy::DidPerformDictionaryLookup(attributedString, dictionaryPopupInfo));
}
unsigned PDFPlugin::countFindMatches(const String& target, WebCore::FindOptions options, unsigned maxMatchCount)
Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -153,6 +153,7 @@
#if !PLATFORM(IOS)
INIT(RecommendedScrollerStyle);
INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
+ INIT(ExtractWordDefinitionTokenRangeFromContextualString);
INIT(CopyDefaultSearchProviderDisplayName);
INIT(Cursor);
INIT(WindowSetScaledFrame);
Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (176248 => 176249)
--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-11-18 03:45:33 UTC (rev 176248)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-11-18 04:13:01 UTC (rev 176249)
@@ -543,14 +543,10 @@
[scaledNSAttributedString addAttributes:scaledAttributes.get() range:range];
}];
- RefPtr<TextIndicator> textIndicator = TextIndicator::createWithRange(range);
- if (!textIndicator)
- return;
+ AttributedString attributedString;
+ attributedString.string = scaledNSAttributedString;
- dictionaryPopupInfo.textIndicator = textIndicator->data();
- dictionaryPopupInfo.attributedString.string = scaledNSAttributedString;
-
- send(Messages::WebPageProxy::DidPerformDictionaryLookup(dictionaryPopupInfo));
+ send(Messages::WebPageProxy::DidPerformDictionaryLookup(attributedString, dictionaryPopupInfo));
}
bool WebPage::performNonEditingBehaviorForSelector(const String& selector, KeyboardEvent* event)