Changeset 184047 in webkit
- Timestamp:
- May 10, 2015, 11:29:59 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 10 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Configurations/WebCore.xcconfig (modified) (2 diffs)
-
WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
WebCore/editing/mac/DataDetection.mm (modified) (1 diff)
-
WebCore/page/mac/ServicesOverlayController.h (modified) (1 diff)
-
WebCore/page/mac/ServicesOverlayController.mm (modified) (1 diff)
-
WebCore/platform/spi/cocoa/DataDetectorsCoreSPI.h (added)
-
WebCore/platform/spi/mac/DataDetectorsSPI.h (modified) (4 diffs)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/Platform/mac/MenuUtilities.mm (modified) (1 diff)
-
WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r184046 r184047 1 2015-05-10 Darin Adler <darin@apple.com> 2 3 [Cocoa] Don't soft link DataDetectorsCore 4 https://bugs.webkit.org/show_bug.cgi?id=144837 5 6 Reviewed by Dan Bernstein. 7 8 Linking this in the normal way should slightly speed up the web process 9 startup time. We don't need to soft link it: It's present in the 10 OS X base system and there is no reference cycle with WebKit. 11 12 * Configurations/WebCore.xcconfig: Added PrivateFrameworks to 13 FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to 14 OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too. 15 16 * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h. 17 18 * editing/mac/DataDetection.mm: 19 (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see 20 if DataDetectorsCore is available. 21 22 * page/mac/ServicesOverlayController.h: Simplified a forward declaration to 23 only declare what we actually use. 24 * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the 25 DataDetectorsSPI.h header. 26 27 * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level 28 DataDetectorsCore framework, which has no reference cycle with WebKit, and 29 which we can link to normally. Moved the content here from DataDetectorsSPI.h, 30 added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed 31 the incorrect return type on DDScannerScanQuery, which was detected when 32 using the system headers in conjunction with this file. 33 34 * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that 35 was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK) 36 path that uses the system headers and moved a few stray DataDetectors SPI 37 definitions from elsewhere into this header. 38 1 39 2015-05-10 Chris Fleizach <cfleizach@apple.com> 2 40 -
trunk/Source/WebCore/Configurations/WebCore.xcconfig
r183929 r184047 31 31 FRAMEWORK_SEARCH_PATHS_ios_Release = $(FRAMEWORK_SEARCH_PATHS_ios_Debug); 32 32 FRAMEWORK_SEARCH_PATHS_ios_Production = $(PRODUCTION_FRAMEWORKS_DIR); 33 FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(STAGED_FRAMEWORKS_SEARCH_PATH) $(FRAMEWORK_SEARCH_PATHS) ;33 FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(STAGED_FRAMEWORKS_SEARCH_PATH) $(FRAMEWORK_SEARCH_PATHS) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; 34 34 35 35 OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; … … 58 58 OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface; 59 59 OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios); 60 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework IOSurface -framework OpenGL;60 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework DataDetectorsCore -framework IOSurface -framework OpenGL; 61 61 62 62 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION)); -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r184042 r184047 3381 3381 935C477009AC4D7300A6AAB4 /* KeyEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */; }; 3382 3382 935C477509AC4D8E00A6AAB4 /* GapRects.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C477409AC4D8D00A6AAB4 /* GapRects.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3383 935E2B4E1AFF06CA00976F9F /* DataDetectorsCoreSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 935E2B4D1AFF06CA00976F9F /* DataDetectorsCoreSPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3383 3384 935F45420F7C3B5F00D7C1FB /* JSLazyEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 935F45400F7C3B5F00D7C1FB /* JSLazyEventListener.cpp */; }; 3384 3385 935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 935F45410F7C3B5F00D7C1FB /* JSLazyEventListener.h */; }; … … 10650 10651 935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KeyEventMac.mm; sourceTree = "<group>"; }; 10651 10652 935C477409AC4D8D00A6AAB4 /* GapRects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GapRects.h; sourceTree = "<group>"; }; 10653 935E2B4D1AFF06CA00976F9F /* DataDetectorsCoreSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetectorsCoreSPI.h; sourceTree = "<group>"; }; 10652 10654 935F45400F7C3B5F00D7C1FB /* JSLazyEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSLazyEventListener.cpp; sourceTree = "<group>"; }; 10653 10655 935F45410F7C3B5F00D7C1FB /* JSLazyEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSLazyEventListener.h; sourceTree = "<group>"; }; … … 16537 16539 CD4097FF1A8C855F004C65E9 /* CFNSURLConnectionSPI.h */, 16538 16540 1C5E980F1A02CEFA002DB55F /* CoreTextSPI.h */, 16541 935E2B4D1AFF06CA00976F9F /* DataDetectorsCoreSPI.h */, 16539 16542 CE12524A1A16C79B00864480 /* DispatchSPI.h */, 16540 16543 CE1252441A16C22500864480 /* DynamicLinkerSPI.h */, … … 24229 24232 E47E276516036ED200EE2AFB /* DocumentStyleSheetCollection.h in Headers */, 24230 24233 0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */, 24234 935E2B4E1AFF06CA00976F9F /* DataDetectorsCoreSPI.h in Headers */, 24231 24235 86D982F7125C154000AD9E3D /* DocumentTiming.h in Headers */, 24232 24236 A8185F3909765766005826D9 /* DocumentType.h in Headers */, -
trunk/Source/WebCore/editing/mac/DataDetection.mm
r183286 r184047 44 44 RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange) 45 45 { 46 if (!DataDetectorsLibrary() || !DataDetectorsCoreLibrary())46 if (!DataDetectorsLibrary()) 47 47 return nullptr; 48 48 -
trunk/Source/WebCore/page/mac/ServicesOverlayController.h
r182068 r184047 35 35 #include <wtf/RefCounted.h> 36 36 37 typedef struct __DDHighlight DDHighlight,*DDHighlightRef;37 typedef struct __DDHighlight *DDHighlightRef; 38 38 39 39 namespace WebCore { -
trunk/Source/WebCore/page/mac/ServicesOverlayController.mm
r182088 r184047 54 54 const float highlightFadeAnimationDuration = 0.3; 55 55 56 // FIXME: Move more of this to DataDetectorsSPI.h.57 SOFT_LINK(DataDetectors, DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection, DDHighlightRef, (CFAllocatorRef allocator, CGRect* rects, CFIndex count, CGRect globalVisibleRect, DDHighlightStyle style, Boolean withArrow, NSWritingDirection writingDirection, Boolean endsWithEOL, Boolean flipped), (allocator, rects, count, globalVisibleRect, style, withArrow, writingDirection, endsWithEOL, flipped))58 SOFT_LINK(DataDetectors, DDHighlightGetLayerWithContext, CGLayerRef, (DDHighlightRef highlight, CGContextRef context), (highlight, context))59 SOFT_LINK(DataDetectors, DDHighlightGetBoundingRect, CGRect, (DDHighlightRef highlight), (highlight))60 SOFT_LINK(DataDetectors, DDHighlightPointIsOnHighlight, Boolean, (DDHighlightRef highlight, CGPoint point, Boolean* onButton), (highlight, point, onButton))61 62 56 namespace WebCore { 63 57 -
trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
r177303 r184047 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import "SoftLinking.h"27 #import < objc/runtime.h>26 #import <WebCore/DataDetectorsCoreSPI.h> 27 #import <WebCore/SoftLinking.h> 28 28 29 // FIXME: This header should include various DataDetectors SPI headers if using the internal SDK. 29 #if USE(APPLE_INTERNAL_SDK) 30 30 31 typedef struct __DDScanner DDScanner, *DDScannerRef; 32 typedef struct __DDScanQuery *DDScanQueryRef; 33 typedef struct __DDResult *DDResultRef; 34 typedef struct __DDHighlight DDHighlight, *DDHighlightRef; 31 // Can't include DDAction.h because as of this writing it is a private header that includes a non-private header with an "" include. 32 #import <DataDetectors/DDActionContext.h> 33 #import <DataDetectors/DDActionsManager.h> 34 #import <DataDetectors/DDHighlightDrawing.h> 35 35 36 typedef enum { 37 DDScannerTypeStandard = 0, 38 } DDScannerType; 39 40 enum { 41 DDScannerOptionStopAtFirstMatch = 1, 42 }; 43 typedef CFIndex DDScannerOptions; 44 45 enum { 46 DDScannerCopyResultsOptionsNone = 0, 47 DDScannerCopyResultsOptionsNoOverlap = 1 << 0, 48 }; 49 typedef CFIndex DDScannerCopyResultsOptions; 50 51 SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectors) 52 SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectorsCore) 53 54 extern "C" { 55 56 SOFT_LINK(DataDetectorsCore, DDScannerCreate, DDScannerRef, (DDScannerType type, DDScannerOptions options, CFErrorRef* errorRef), (type, options, errorRef)) 57 SOFT_LINK(DataDetectorsCore, DDScanQueryCreateFromString, DDScanQueryRef, (CFAllocatorRef allocator, CFStringRef string, CFRange range), (allocator, string, range)) 58 SOFT_LINK(DataDetectorsCore, DDScannerScanQuery, DDScanQueryRef, (DDScannerRef scanner, DDScanQueryRef query), (scanner, query)) 59 SOFT_LINK(DataDetectorsCore, DDScannerCopyResultsWithOptions, CFArrayRef, (DDScannerRef scanner, DDScannerCopyResultsOptions options), (scanner, options)) 60 SOFT_LINK(DataDetectorsCore, DDResultGetRange, CFRange, (DDResultRef result), (result)) 61 SOFT_LINK(DataDetectorsCore, DDResultGetType, CFStringRef, (DDResultRef result), (result)) 62 63 } 64 65 #if PLATFORM(MAC) 66 SOFT_LINK_CLASS(DataDetectors, DDActionContext) 36 #else // !USE(APPLE_INTERNAL_SDK) 67 37 68 38 @interface DDActionContext : NSObject <NSCopying, NSSecureCoding> … … 75 45 76 46 - (DDActionContext *)contextForView:(NSView *)view altMode:(BOOL)altMode interactionStartedHandler:(void (^)(void))interactionStartedHandler interactionChangedHandler:(void (^)(void))interactionChangedHandler interactionStoppedHandler:(void (^)(void))interactionStoppedHandler; 47 48 @end 49 50 @interface DDActionsManager : NSObject 51 52 + (DDActionsManager *)sharedManager; 53 - (NSArray *)menuItemsForResult:(DDResultRef)result actionContext:(DDActionContext *)context; 54 - (NSArray *)menuItemsForTargetURL:(NSString *)targetURL actionContext:(DDActionContext *)context; 55 - (void)requestBubbleClosureUnanchorOnFailure:(BOOL)unanchorOnFailure; 56 57 + (BOOL)shouldUseActionsWithContext:(DDActionContext *)context; 58 + (void)didUseActions; 59 60 - (BOOL)hasActionsForResult:(DDResultRef)result actionContext:(DDActionContext *)actionContext; 61 62 - (NSArray *)menuItemsForValue:(NSString *)value type:(CFStringRef)type service:(NSString *)service context:(DDActionContext *)context; 77 63 78 64 @end … … 89 75 90 76 enum { 91 DDHighlightStyleButtonShowAlways = (1 << 24),77 DDHighlightStyleButtonShowAlways = (1 << 24), 92 78 }; 93 79 80 #endif // !USE(APPLE_INTERNAL_SDK) 81 82 typedef struct __DDHighlight *DDHighlightRef; 94 83 typedef NSUInteger DDHighlightStyle; 95 #endif96 84 85 @interface DDAction : NSObject 86 87 @property (readonly) NSString *actionUTI; 88 89 @end 90 91 SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectors) 92 93 SOFT_LINK_CLASS(DataDetectors, DDAction) 94 SOFT_LINK_CLASS(DataDetectors, DDActionContext) 97 95 SOFT_LINK_CLASS(DataDetectors, DDActionsManager) 98 96 99 @interface DDActionsManager : NSObject 97 SOFT_LINK_CONSTANT(DataDetectors, DDBinderPhoneNumberKey, CFStringRef) 100 98 101 + (DDActionsManager *)sharedManager; 102 - (NSArray *)menuItemsForResult:(DDResultRef)result actionContext:(DDActionContext *)context; 103 - (NSArray *)menuItemsForTargetURL:(NSString *)targetURL actionContext:(DDActionContext *)context; 104 - (void)requestBubbleClosureUnanchorOnFailure:(BOOL)unanchorOnFailure; 105 106 + (BOOL)shouldUseActionsWithContext:(DDActionContext *)context; 107 + (void)didUseActions; 108 109 - (BOOL)hasActionsForResult:(DDResultRef)result actionContext:(DDActionContext *)actionContext; 110 111 @end 99 SOFT_LINK(DataDetectors, DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection, DDHighlightRef, (CFAllocatorRef allocator, CGRect* rects, CFIndex count, CGRect globalVisibleRect, DDHighlightStyle style, Boolean withArrow, NSWritingDirection writingDirection, Boolean endsWithEOL, Boolean flipped), (allocator, rects, count, globalVisibleRect, style, withArrow, writingDirection, endsWithEOL, flipped)) 100 SOFT_LINK(DataDetectors, DDHighlightGetLayerWithContext, CGLayerRef, (DDHighlightRef highlight, CGContextRef context), (highlight, context)) 101 SOFT_LINK(DataDetectors, DDHighlightGetBoundingRect, CGRect, (DDHighlightRef highlight), (highlight)) 102 SOFT_LINK(DataDetectors, DDHighlightPointIsOnHighlight, Boolean, (DDHighlightRef highlight, CGPoint point, Boolean* onButton), (highlight, point, onButton)) -
trunk/Source/WebKit2/ChangeLog
r184043 r184047 1 2015-05-10 Darin Adler <darin@apple.com> 2 3 [Cocoa] Don't soft link DataDetectorsCore 4 https://bugs.webkit.org/show_bug.cgi?id=144837 5 6 Reviewed by Dan Bernstein. 7 8 * Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here. 9 10 * WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header, 11 DataDetectorsSPI.h. 12 1 13 2015-05-09 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Source/WebKit2/Platform/mac/MenuUtilities.mm
r176914 r184047 33 33 34 34 #if ENABLE(TELEPHONE_NUMBER_DETECTION) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 35 36 35 #import <WebCore/TUCallSPI.h> 37 38 SOFT_LINK_PRIVATE_FRAMEWORK(DataDetectors)39 SOFT_LINK_CLASS(DataDetectors, DDAction)40 SOFT_LINK_CLASS(DataDetectors, DDActionsManager)41 SOFT_LINK_CONSTANT(DataDetectors, DDBinderPhoneNumberKey, CFStringRef)42 43 @interface DDAction : NSObject44 @property (readonly) NSString *actionUTI;45 @end46 47 typedef void* DDActionContext;48 49 @interface DDActionsManager : NSObject50 + (DDActionsManager *)sharedManager;51 - (NSArray *)menuItemsForValue:(NSString *)value type:(CFStringRef)type service:(NSString *)service context:(DDActionContext *)context;52 @end53 36 #endif 54 37 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r183976 r184047 59 59 #import <WebCore/BackForwardController.h> 60 60 #import <WebCore/DataDetection.h> 61 #import <WebCore/DataDetectorsSPI.h>62 61 #import <WebCore/DictionaryLookup.h> 63 62 #import <WebCore/EventHandler.h>
Note:
See TracChangeset
for help on using the changeset viewer.