Diff
Modified: trunk/Source/WebCore/ChangeLog (222149 => 222150)
--- trunk/Source/WebCore/ChangeLog 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/ChangeLog 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,3 +1,32 @@
+2017-09-18 Andy Estes <[email protected]>
+
+ [Mac] Upstream miscellaneous WebKitSystemInterface functions
+ https://bugs.webkit.org/show_bug.cgi?id=177029
+
+ Reviewed by Alex Christensen.
+
+ * Configurations/WebCore.xcconfig: Used -force_load of libPAL instead of -ObjC. This forces
+ the linker to load both Objective-C and C PAL symbols in WebCore. This change is needed for
+ PAL::popUpMenu(), which is used by WebKit and WebKitLegacy but not WebCore.
+ * platform/cocoa/LocalizedStringsCocoa.mm:
+ (WebCore::contextMenuItemTagSearchWeb):
+ * platform/cocoa/ScrollController.mm:
+ (WebCore::elasticDeltaForTimeDelta):
+ (WebCore::elasticDeltaForReboundDelta):
+ (WebCore::reboundDeltaForElasticDelta):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
+ * platform/mac/CursorMac.mm:
+ (WebCore::WKCoreCursor_coreCursorType):
+ (WebCore::createCoreCursorClass):
+ (WebCore::coreCursorClass):
+ (WebCore::cursor):
+ (WebCore::Cursor::ensurePlatformCursor const):
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/mac/WebCoreSystemInterface.mm:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintTextArea):
+
2017-09-18 Yoshiaki Jitsukawa <[email protected]>
[Win][PAL] Move WebCoreHeaderDetection.h to PAL
Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (222149 => 222150)
--- trunk/Source/WebCore/Configurations/WebCore.xcconfig 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig 2017-09-18 16:21:29 UTC (rev 222150)
@@ -77,7 +77,7 @@
LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
-OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -framework CoreAudio -framework Metal -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -ObjC;
+OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -framework CoreAudio -framework Metal -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a;
// FIXME: Reduce the number of allowable_client <rdar://problem/31823969>
OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS) -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI;
OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface -framework GraphicsServices $(LIBWEBRTC_LDFLAGS);
Modified: trunk/Source/WebCore/PAL/ChangeLog (222149 => 222150)
--- trunk/Source/WebCore/PAL/ChangeLog 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/ChangeLog 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,3 +1,26 @@
+2017-09-18 Andy Estes <[email protected]>
+
+ [Mac] Upstream miscellaneous WebKitSystemInterface functions
+ https://bugs.webkit.org/show_bug.cgi?id=177029
+
+ Reviewed by Alex Christensen.
+
+ * PAL.xcodeproj/project.pbxproj:
+ * pal/PlatformMac.cmake:
+ * pal/spi/cf/CFUtilitiesSPI.h:
+ * pal/spi/cocoa/LaunchServicesSPI.h: Renamed from Source/WebCore/PAL/pal/spi/ios/LaunchServicesSPI.h.
+ * pal/spi/mac/HIServicesSPI.h:
+ * pal/spi/mac/NSCellSPI.h: Copied from Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h.
+ * pal/spi/mac/NSMenuSPI.h:
+ * pal/spi/mac/NSScrollViewSPI.h: Copied from Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h.
+ * pal/spi/mac/NSScrollerImpSPI.h:
+ * pal/system/cf/DefaultSearchProvider.cpp: Copied from Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h.
+ (PAL::defaultSearchProviderDisplayName):
+ * pal/system/cf/DefaultSearchProvider.h: Copied from Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h.
+ * pal/system/mac/PopupMenu.h: Copied from Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h.
+ * pal/system/mac/PopupMenu.mm: Added.
+ (PAL::popUpMenu):
+
2017-09-18 Yoshiaki Jitsukawa <[email protected]>
[Win][PAL] Move WebCoreHeaderDetection.h to PAL
Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (222149 => 222150)
--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2017-09-18 16:21:29 UTC (rev 222150)
@@ -107,6 +107,12 @@
A10826FA1F576292004772AC /* WebPanel.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10826F81F576292004772AC /* WebPanel.mm */; };
A10826FE1F58A433004772AC /* NSGraphicsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10826FD1F58A433004772AC /* NSGraphicsSPI.h */; };
A1175B491F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B481F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h */; };
+ A1175B4B1F6B2D7E00C4B9F0 /* NSCellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */; };
+ A1175B4E1F6B337300C4B9F0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B4C1F6B337300C4B9F0 /* PopupMenu.h */; };
+ A1175B4F1F6B337300C4B9F0 /* PopupMenu.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1175B4D1F6B337300C4B9F0 /* PopupMenu.mm */; };
+ A1175B571F6B470500C4B9F0 /* DefaultSearchProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B551F6B470500C4B9F0 /* DefaultSearchProvider.h */; };
+ A1175B581F6B470500C4B9F0 /* DefaultSearchProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1175B561F6B470500C4B9F0 /* DefaultSearchProvider.cpp */; };
+ A1175B5A1F6B4A8400C4B9F0 /* NSScrollViewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1175B591F6B4A8400C4B9F0 /* NSScrollViewSPI.h */; };
A1F55DCF1F5528EC00EDB75F /* MetadataSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A1F55DCE1F5528EC00EDB75F /* MetadataSPI.h */; };
A30D41211F0DD0EA00B71954 /* KillRing.h in Headers */ = {isa = PBXBuildFile; fileRef = A30D411E1F0DD0EA00B71954 /* KillRing.h */; };
A30D41221F0DD0EA00B71954 /* KillRing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A30D411F1F0DD0EA00B71954 /* KillRing.cpp */; };
@@ -229,6 +235,12 @@
A10826F81F576292004772AC /* WebPanel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPanel.mm; sourceTree = "<group>"; };
A10826FD1F58A433004772AC /* NSGraphicsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSGraphicsSPI.h; sourceTree = "<group>"; };
A1175B481F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpeechSynthesisSPI.h; sourceTree = "<group>"; };
+ A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSCellSPI.h; sourceTree = "<group>"; };
+ A1175B4C1F6B337300C4B9F0 /* PopupMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopupMenu.h; sourceTree = "<group>"; };
+ A1175B4D1F6B337300C4B9F0 /* PopupMenu.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PopupMenu.mm; sourceTree = "<group>"; };
+ A1175B551F6B470500C4B9F0 /* DefaultSearchProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultSearchProvider.h; sourceTree = "<group>"; };
+ A1175B561F6B470500C4B9F0 /* DefaultSearchProvider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DefaultSearchProvider.cpp; sourceTree = "<group>"; };
+ A1175B591F6B4A8400C4B9F0 /* NSScrollViewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSScrollViewSPI.h; sourceTree = "<group>"; };
A1F55DCE1F5528EC00EDB75F /* MetadataSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MetadataSPI.h; sourceTree = "<group>"; };
A30D411E1F0DD0EA00B71954 /* KillRing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KillRing.h; sourceTree = "<group>"; };
A30D411F1F0DD0EA00B71954 /* KillRing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KillRing.cpp; sourceTree = "<group>"; };
@@ -307,6 +319,7 @@
0C2DA1281F3BEB4900DBC317 /* IOReturnSPI.h */,
0C2DA1291F3BEB4900DBC317 /* IOSurfaceSPI.h */,
0C2DA12A1F3BEB4900DBC317 /* IOTypesSPI.h */,
+ 0C5AF9121F43A4C7002EAC02 /* LaunchServicesSPI.h */,
0C2DA12B1F3BEB4900DBC317 /* LinkPresentationSPI.h */,
0C2DA12C1F3BEB4900DBC317 /* MachVMSPI.h */,
0C2DA12D1F3BEB4900DBC317 /* NEFilterSourceSPI.h */,
@@ -336,7 +349,6 @@
0C5AF90F1F43A4C7002EAC02 /* CoreUISPI.h */,
0C5AF9101F43A4C7002EAC02 /* DataDetectorsUISPI.h */,
0C5AF9111F43A4C7002EAC02 /* GraphicsServicesSPI.h */,
- 0C5AF9121F43A4C7002EAC02 /* LaunchServicesSPI.h */,
0C5AF9131F43A4C7002EAC02 /* MediaPlayerSPI.h */,
0C5AF9141F43A4C7002EAC02 /* MobileGestaltSPI.h */,
0C5AF9151F43A4C7002EAC02 /* OpenGLESSPI.h */,
@@ -359,6 +371,7 @@
A1F55DCE1F5528EC00EDB75F /* MetadataSPI.h */,
0C7785741F45130F00F4EBB6 /* NSAccessibilitySPI.h */,
0C7785751F45130F00F4EBB6 /* NSApplicationSPI.h */,
+ A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */,
0C7785761F45130F00F4EBB6 /* NSEventSPI.h */,
0C7785771F45130F00F4EBB6 /* NSFontSPI.h */,
A10826FD1F58A433004772AC /* NSGraphicsSPI.h */,
@@ -370,6 +383,7 @@
0C77857C1F45130F00F4EBB6 /* NSScrollerImpSPI.h */,
0C77857D1F45130F00F4EBB6 /* NSScrollingInputFilterSPI.h */,
0C77857E1F45130F00F4EBB6 /* NSScrollingMomentumCalculatorSPI.h */,
+ A1175B591F6B4A8400C4B9F0 /* NSScrollViewSPI.h */,
0C77857F1F45130F00F4EBB6 /* NSSharingServicePickerSPI.h */,
0C7785801F45130F00F4EBB6 /* NSSharingServiceSPI.h */,
0C7785811F45130F00F4EBB6 /* NSSpellCheckerSPI.h */,
@@ -486,6 +500,10 @@
A3788EA01F05B7E200679425 /* mac */ = {
isa = PBXGroup;
children = (
+ A1175B561F6B470500C4B9F0 /* DefaultSearchProvider.cpp */,
+ A1175B551F6B470500C4B9F0 /* DefaultSearchProvider.h */,
+ A1175B4C1F6B337300C4B9F0 /* PopupMenu.h */,
+ A1175B4D1F6B337300C4B9F0 /* PopupMenu.mm */,
A3788E9D1F05B78E00679425 /* SoundMac.mm */,
A3AB6E621F3D217F009C14B1 /* SystemSleepListenerMac.h */,
A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */,
@@ -528,6 +546,7 @@
0C2DA1411F3BEB4900DBC317 /* DataDetectorsCoreSPI.h in Headers */,
0C77858A1F45130F00F4EBB6 /* DataDetectorsSPI.h in Headers */,
0C5AF91A1F43A4C7002EAC02 /* DataDetectorsUISPI.h in Headers */,
+ A1175B571F6B470500C4B9F0 /* DefaultSearchProvider.h in Headers */,
0C2D9E731EEF5AF600DBC317 /* ExportMacros.h in Headers */,
A10265871F56746100B4C844 /* FoundationSPI.h in Headers */,
0C5AF91B1F43A4C7002EAC02 /* GraphicsServicesSPI.h in Headers */,
@@ -556,6 +575,7 @@
0C2DA14A1F3BEB4900DBC317 /* NSAttributedStringSPI.h in Headers */,
0C2DA14B1F3BEB4900DBC317 /* NSButtonCellSPI.h in Headers */,
0C2DA14C1F3BEB4900DBC317 /* NSCalendarDateSPI.h in Headers */,
+ A1175B4B1F6B2D7E00C4B9F0 /* NSCellSPI.h in Headers */,
0C2DA14D1F3BEB4900DBC317 /* NSColorSPI.h in Headers */,
0C77858F1F45130F00F4EBB6 /* NSEventSPI.h in Headers */,
0C2DA14E1F3BEB4900DBC317 /* NSExtensionSPI.h in Headers */,
@@ -570,6 +590,7 @@
0C7785951F45130F00F4EBB6 /* NSScrollerImpSPI.h in Headers */,
0C7785961F45130F00F4EBB6 /* NSScrollingInputFilterSPI.h in Headers */,
0C7785971F45130F00F4EBB6 /* NSScrollingMomentumCalculatorSPI.h in Headers */,
+ A1175B5A1F6B4A8400C4B9F0 /* NSScrollViewSPI.h in Headers */,
0C7785981F45130F00F4EBB6 /* NSSharingServicePickerSPI.h in Headers */,
0C7785991F45130F00F4EBB6 /* NSSharingServiceSPI.h in Headers */,
0C77859A1F45130F00F4EBB6 /* NSSpellCheckerSPI.h in Headers */,
@@ -584,6 +605,7 @@
0C5AF91F1F43A4C7002EAC02 /* OpenGLESSPI.h in Headers */,
0C2DA1551F3BEB4900DBC317 /* PassKitSPI.h in Headers */,
0C77859E1F45130F00F4EBB6 /* PIPSPI.h in Headers */,
+ A1175B4E1F6B337300C4B9F0 /* PopupMenu.h in Headers */,
0C2DA1561F3BEB4900DBC317 /* pthreadSPI.h in Headers */,
0C77859F1F45130F00F4EBB6 /* QTKitSPI.h in Headers */,
0C2DA1571F3BEB4900DBC317 /* QuartzCoreSPI.h in Headers */,
@@ -692,8 +714,10 @@
buildActionMask = 2147483647;
files = (
1C09D0561E31C46500725F18 /* CryptoDigestCommonCrypto.cpp in Sources */,
+ A1175B581F6B470500C4B9F0 /* DefaultSearchProvider.cpp in Sources */,
A30D41221F0DD0EA00B71954 /* KillRing.cpp in Sources */,
A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */,
+ A1175B4F1F6B337300C4B9F0 /* PopupMenu.mm in Sources */,
A3C66CDC1F462D6A009E6EE9 /* SessionID.cpp in Sources */,
A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */,
A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */,
Modified: trunk/Source/WebCore/PAL/pal/PlatformMac.cmake (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/PlatformMac.cmake 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/PlatformMac.cmake 2017-09-18 16:21:29 UTC (rev 222150)
@@ -3,6 +3,8 @@
system/cocoa/SleepDisablerCocoa.cpp
+ system/mac/DefaultSearchProvider.cpp
+ system/mac/PopupMenu.mm
system/mac/SoundMac.mm
system/mac/SystemSleepListenerMac.mm
system/mac/WebPanel.mm
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,17 +25,31 @@
#pragma once
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <CoreFoundation/CFPriv.h>
+
+#else
+
#include <CoreFoundation/CoreFoundation.h>
-#if USE(APPLE_INTERNAL_SDK)
-#import <CoreFoundation/CFPriv.h>
+typedef CF_ENUM(CFIndex, CFSystemVersion) {
+ CFSystemVersionLion = 7,
+ CFSystemVersionMountainLion = 8,
+};
+
#endif
WTF_EXTERN_C_BEGIN
-CFDictionaryRef _CFCopySystemVersionDictionary(void);
+extern const CFStringRef kCFWebServicesProviderDefaultDisplayNameKey;
+extern const CFStringRef kCFWebServicesTypeWebSearch;
+extern const CFStringRef _kCFSystemVersionBuildVersionKey;
extern const CFStringRef _kCFSystemVersionProductVersionKey;
-extern const CFStringRef _kCFSystemVersionBuildVersionKey;
+Boolean _CFAppVersionCheckLessThan(CFStringRef bundleID, int linkedOnAnOlderSystemThan, double versionNumberLessThan);
+Boolean _CFExecutableLinkedOnOrAfter(CFSystemVersion);
+CFDictionaryRef _CFCopySystemVersionDictionary();
+CFDictionaryRef _CFWebServicesCopyProviderInfo(CFStringRef serviceType, Boolean* outIsUserSelection);
+
WTF_EXTERN_C_END
-
Copied: trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/ios/LaunchServicesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2015-2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#pragma once
+
+#import <Foundation/Foundation.h>
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#if PLATFORM(MAC)
+#import <LaunchServices/LaunchServicesPriv.h>
+#elif PLATFORM(IOS)
+#import <MobileCoreServices/LSAppLinkPriv.h>
+#endif
+
+#endif
+
+@class LSAppLink;
+typedef void (^LSAppLinkCompletionHandler)(LSAppLink *appLink, NSError *error);
+typedef void (^LSAppLinkOpenCompletionHandler)(BOOL success, NSError *error);
+
+#if !USE(APPLE_INTERNAL_SDK)
+
+@interface LSResourceProxy : NSObject <NSCopying, NSSecureCoding>
+@end
+
+@interface LSBundleProxy : LSResourceProxy <NSSecureCoding>
+@end
+
+@interface LSApplicationProxy : LSBundleProxy <NSSecureCoding>
+- (NSString *)localizedNameForContext:(NSString *)context;
+@end
+
+@interface LSAppLink : NSObject <NSSecureCoding>
+@end
+
+@interface LSAppLink ()
++ (void)getAppLinkWithURL:(NSURL *)aURL completionHandler:(LSAppLinkCompletionHandler)completionHandler;
++ (void)openWithURL:(NSURL *)aURL completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
+- (void)openInWebBrowser:(BOOL)inWebBrowser setAppropriateOpenStrategyAndWebBrowserState:(NSDictionary<NSString *, id> *)state completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
+@property (readonly, strong) LSApplicationProxy *targetApplicationProxy;
+@end
+
+#if PLATFORM(MAC)
+enum LSSessionID {
+ kLSDefaultSessionID = -2,
+};
+#endif
+
+#endif // !USE(APPLE_INTERNAL_SDK)
+
+#if PLATFORM(MAC)
+
+typedef const struct CF_BRIDGED_TYPE(id) __LSASN* LSASNRef;
+typedef enum LSSessionID LSSessionID;
+
+WTF_EXTERN_C_BEGIN
+
+extern const CFStringRef _kLSDisplayNameKey;
+
+LSASNRef _LSGetCurrentApplicationASN();
+OSStatus _LSSetApplicationInformationItem(LSSessionID, LSASNRef, CFStringRef keyToSetRef, CFTypeRef valueToSetRef, CFDictionaryRef* newInformationDictRef);
+
+WTF_EXTERN_C_END
+
+#endif // PLATFORM(MAC)
Deleted: trunk/Source/WebCore/PAL/pal/spi/ios/LaunchServicesSPI.h (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/ios/LaunchServicesSPI.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/LaunchServicesSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2015 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#pragma once
-
-#import <Foundation/Foundation.h>
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <MobileCoreServices/LSAppLinkPriv.h>
-
-#endif
-
-@class LSAppLink;
-typedef void (^LSAppLinkCompletionHandler)(LSAppLink *appLink, NSError *error);
-typedef void (^LSAppLinkOpenCompletionHandler)(BOOL success, NSError *error);
-
-#if !USE(APPLE_INTERNAL_SDK)
-
-@interface LSResourceProxy : NSObject <NSCopying, NSSecureCoding>
-@end
-
-@interface LSBundleProxy : LSResourceProxy <NSSecureCoding>
-@end
-
-@interface LSApplicationProxy : LSBundleProxy <NSSecureCoding>
-- (NSString *)localizedNameForContext:(NSString *)context;
-@end
-
-@interface LSAppLink : NSObject <NSSecureCoding>
-@end
-
-@interface LSAppLink ()
-+ (void)getAppLinkWithURL:(NSURL *)aURL completionHandler:(LSAppLinkCompletionHandler)completionHandler;
-+ (void)openWithURL:(NSURL *)aURL completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
-- (void)openInWebBrowser:(BOOL)inWebBrowser setAppropriateOpenStrategyAndWebBrowserState:(NSDictionary<NSString *, id> *)state completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
-@property (readonly, strong) LSApplicationProxy *targetApplicationProxy;
-@end
-
-#endif
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/HIServicesSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -25,13 +25,64 @@
#pragma once
+#include <pal/spi/cg/CoreGraphicsSPI.h>
+
#if USE(APPLE_INTERNAL_SDK)
#include <HIServices/AXTextMarker.h>
+#include <HIServices/CoreCursor.h>
#include <HIServices/CoreDrag.h>
#else
+typedef CF_ENUM(SInt32, CoreCursorType) {
+ kCoreCursorFirstCursor = 0,
+ kCoreCursorArrow = kCoreCursorFirstCursor,
+ kCoreCursorIBeam,
+ kCoreCursorMakeAlias,
+ kCoreCursorNotAllowed,
+ kCoreCursorBusyButClickable,
+ kCoreCursorCopy,
+ kCoreCursorScreenShotSelection = 7,
+ kCoreCursorScreenShotSelectionToClip,
+ kCoreCursorScreenShotWindow,
+ kCoreCursorScreenShotWindowToClip,
+ kCoreCursorClosedHand,
+ kCoreCursorOpenHand,
+ kCoreCursorPointingHand,
+ kCoreCursorCountingUpHand,
+ kCoreCursorCountingDownHand,
+ kCoreCursorCountingUpAndDownHand,
+ kCoreCursorResizeLeft,
+ kCoreCursorResizeRight,
+ kCoreCursorResizeLeftRight,
+ kCoreCursorCross,
+ kCoreCursorResizeUp,
+ kCoreCursorResizeDown,
+ kCoreCursorResizeUpDown,
+ kCoreCursorContextualMenu,
+ kCoreCursorPoof,
+ kCoreCursorIBeamVertical,
+ kCoreCursorWindowResizeEast,
+ kCoreCursorWindowResizeEastWest,
+ kCoreCursorWindowResizeNorthEast,
+ kCoreCursorWindowResizeNorthEastSouthWest,
+ kCoreCursorWindowResizeNorth,
+ kCoreCursorWindowResizeNorthSouth,
+ kCoreCursorWindowResizeNorthWest,
+ kCoreCursorWindowResizeNorthWestSouthEast,
+ kCoreCursorWindowResizeSouthEast,
+ kCoreCursorWindowResizeSouth,
+ kCoreCursorWindowResizeSouthWest,
+ kCoreCursorWindowResizeWest,
+ kCoreCursorWindowMove,
+ kCoreCursorHelp,
+ kCoreCursorCell,
+ kCoreCursorZoomIn,
+ kCoreCursorZoomOut,
+ kCoreCursorLastCursor = kCoreCursorZoomOut
+};
+
enum {
kCoreDragImageSpecVersionOne = 1,
};
@@ -51,6 +102,7 @@
#endif
+typedef UInt32 MSHCreateOptions;
typedef const struct __AXTextMarker* AXTextMarkerRef;
typedef const struct __AXTextMarkerRange* AXTextMarkerRangeRef;
typedef struct CoreDragImageSpec CoreDragImageSpec;
@@ -63,6 +115,7 @@
AXTextMarkerRef AXTextMarkerRangeCopyStartMarker(AXTextMarkerRangeRef);
AXTextMarkerRef AXTextMarkerRangeCopyEndMarker(AXTextMarkerRangeRef);
CFIndex AXTextMarkerGetLength(AXTextMarkerRef);
+CFRunLoopSourceRef MSHCreateMIGServerSource(CFAllocatorRef, CFIndex order, mig_subsystem_t sub_system, MSHCreateOptions, mach_port_t, void* user_data);
CFTypeID AXTextMarkerGetTypeID();
CFTypeID AXTextMarkerRangeGetTypeID();
CoreDragRef CoreDragGetCurrentDrag();
Copied: trunk/Source/WebCore/PAL/pal/spi/mac/NSCellSPI.h (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSCellSPI.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSCellSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <AppKit/NSCell_Private.h>
+
+#endif
+
+WTF_EXTERN_C_BEGIN
+
+void _NSDrawCarbonThemeListBox(NSRect, BOOL enabled, BOOL flipped, BOOL textured);
+
+WTF_EXTERN_C_END
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSMenuSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,7 +29,9 @@
#if USE(APPLE_INTERNAL_SDK)
+WTF_EXTERN_C_BEGIN
#import <AppKit/NSMenu_Private.h>
+WTF_EXTERN_C_END
#else
@@ -38,6 +40,17 @@
NSMenuTypeContextMenu,
};
+enum {
+ NSPopUpMenuTypeGeneric,
+ NSPopUpMenuTypePopUp,
+ NSPopUpMenuTypePullsDown,
+ NSPopUpMenuTypeMainMenu,
+ NSPopUpMenuTypeContext,
+ NSPopUpMenuDefaultToPopUpControlFont = 0x10,
+ NSPopUpMenuPositionRelativeToRightEdge = 0x20,
+ NSPopUpMenuIsPopupButton = 0x40,
+};
+
@interface NSMenu ()
+ (NSMenuType)menuTypeForEvent:(NSEvent *)event;
@end
@@ -56,4 +69,17 @@
#endif
-#endif
+typedef NSUInteger NSPopUpMenuFlags;
+
+WTF_EXTERN_C_BEGIN
+
+extern NSString * const NSPopUpMenuPopupButtonBounds;
+extern NSString * const NSPopUpMenuPopupButtonLabelOffset;
+extern NSString * const NSPopUpMenuPopupButtonSize;
+extern NSString * const NSPopUpMenuPopupButtonWidget;
+
+void _NSPopUpCarbonMenu3(NSMenu *, NSWindow *, NSView *ownerView, NSPoint screenPoint, NSInteger checkedItem, NSFont *, CGFloat minWidth, NSString *runLoopMode, NSPopUpMenuFlags, NSDictionary *options);
+
+WTF_EXTERN_C_END
+
+#endif // PLATFORM(MAC)
Copied: trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollViewSPI.h (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollViewSPI.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollViewSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <AppKit/NSScrollView_Private.h>
+
+#endif
+
+WTF_EXTERN_C_BEGIN
+
+CGFloat _NSElasticDeltaForReboundDelta(CGFloat delta);
+CGFloat _NSElasticDeltaForTimeDelta(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
+CGFloat _NSReboundDeltaForElasticDelta(CGFloat delta);
+
+WTF_EXTERN_C_END
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h (222149 => 222150)
--- trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -149,4 +149,10 @@
#endif
+WTF_EXTERN_C_BEGIN
+
+NSScrollerStyle _NSRecommendedScrollerStyle();
+
+WTF_EXTERN_C_END
+
#endif // USE(APPKIT)
Copied: trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.cpp (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.cpp (rev 0)
+++ trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.cpp 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#include "config.h"
+#include "DefaultSearchProvider.h"
+
+#if PLATFORM(MAC)
+
+#include "CFUtilitiesSPI.h"
+#include <CoreFoundation/CoreFoundation.h>
+
+namespace PAL {
+
+RetainPtr<CFStringRef> defaultSearchProviderDisplayName()
+{
+ auto providerInfo = adoptCF(_CFWebServicesCopyProviderInfo(kCFWebServicesTypeWebSearch, nullptr));
+ if (!providerInfo)
+ return CFSTR("Google");
+
+ CFTypeRef displayName = CFDictionaryGetValue(providerInfo.get(), kCFWebServicesProviderDefaultDisplayNameKey);
+ if (!displayName)
+ return CFSTR("Google");
+
+ ASSERT(CFGetTypeID(displayName) == CFStringGetTypeID());
+ return adoptCF(CFStringCreateCopy(kCFAllocatorDefault, (CFStringRef)displayName));
+}
+
+} // namespace PAL
+
+#endif // PLATFORM(MAC)
Copied: trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.h (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/system/mac/DefaultSearchProvider.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#pragma once
+
+#include <wtf/RetainPtr.h>
+
+namespace PAL {
+
+PAL_EXPORT RetainPtr<CFStringRef> defaultSearchProviderDisplayName();
+
+}
Copied: trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.h (from rev 222149, trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h) (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#if PLATFORM(MAC)
+
+#import <AppKit/AppKit.h>
+
+namespace PAL {
+
+PAL_EXPORT void popUpMenu(NSMenu *, NSPoint location, float width, NSView *, int selectedItem, NSFont *, NSControlSize, bool usesCustomAppearance);
+
+}
+
+#endif // PLATFORM(MAC)
Added: trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm (0 => 222150)
--- trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm (rev 0)
+++ trunk/Source/WebCore/PAL/pal/system/mac/PopupMenu.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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 "config.h"
+#import "PopupMenu.h"
+
+#if PLATFORM(MAC)
+
+#import "NSMenuSPI.h"
+#import <wtf/RetainPtr.h>
+
+@interface NSMenu (WebPrivate)
+- (id)_menuImpl;
+@end
+
+@interface NSObject (WebPrivate)
+- (void)popUpMenu:(NSMenu*)menu atLocation:(NSPoint)location width:(CGFloat)width forView:(NSView*)view withSelectedItem:(NSInteger)selectedItem withFont:(NSFont*)font withFlags:(NSPopUpMenuFlags)flags withOptions:(NSDictionary *)options;
+@end
+
+namespace PAL {
+
+void popUpMenu(NSMenu *menu, NSPoint location, float width, NSView *view, int selectedItem, NSFont *font, NSControlSize controlSize, bool usesCustomAppearance)
+{
+ NSRect adjustedPopupBounds = [view.window convertRectToScreen:[view convertRect:view.bounds toView:nil]];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if (controlSize != NSMiniControlSize) {
+#pragma clang diagnostic pop
+ adjustedPopupBounds.origin.x -= 3;
+ adjustedPopupBounds.origin.y -= 1;
+ adjustedPopupBounds.size.width += 6;
+ }
+
+ // These numbers were extracted from visual inspection as the menu animates shut.
+ NSSize labelOffset = NSMakeSize(11, 1);
+ if (menu.userInterfaceLayoutDirection == NSUserInterfaceLayoutDirectionRightToLeft)
+ labelOffset = NSMakeSize(24, 1);
+
+ auto options = adoptNS([@{
+ NSPopUpMenuPopupButtonBounds : [NSValue valueWithRect:adjustedPopupBounds],
+ NSPopUpMenuPopupButtonLabelOffset : [NSValue valueWithSize:labelOffset],
+ NSPopUpMenuPopupButtonSize : @(controlSize)
+ } mutableCopy]);
+
+ if (usesCustomAppearance)
+ [options setObject:@"" forKey:NSPopUpMenuPopupButtonWidget];
+
+ [[menu _menuImpl] popUpMenu:menu atLocation:location width:width forView:view withSelectedItem:selectedItem withFont:font withFlags:(usesCustomAppearance ? 0 : NSPopUpMenuIsPopupButton) withOptions:options.get()];
+}
+
+} // namespace PAL
+
+#endif // PLATFORM(MAC)
Modified: trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm (222149 => 222150)
--- trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,15 +23,16 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "LocalizedStrings.h"
+#import "config.h"
+#import "LocalizedStrings.h"
-#include "NotImplemented.h"
-#include "WebCoreSystemInterface.h"
-#include <wtf/Assertions.h>
-#include <wtf/MainThread.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/text/WTFString.h>
+#import "NotImplemented.h"
+#import "WebCoreSystemInterface.h"
+#import <pal/system/mac/DefaultSearchProvider.h>
+#import <wtf/Assertions.h>
+#import <wtf/MainThread.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/text/WTFString.h>
namespace WebCore {
@@ -66,7 +67,7 @@
String contextMenuItemTagSearchWeb()
{
- auto searchProviderName = adoptCF(wkCopyDefaultSearchProviderDisplayName());
+ auto searchProviderName = PAL::defaultSearchProviderDisplayName();
return formatLocalizedString(WEB_UI_STRING("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get());
}
Modified: trunk/Source/WebCore/platform/cocoa/ScrollController.mm (222149 => 222150)
--- trunk/Source/WebCore/platform/cocoa/ScrollController.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/cocoa/ScrollController.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2014-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,22 +23,26 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "ScrollController.h"
+#import "config.h"
+#import "ScrollController.h"
-#include "LayoutSize.h"
-#include "PlatformWheelEvent.h"
-#include "WebCoreSystemInterface.h"
-#include "WheelEventTestTrigger.h"
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <wtf/CurrentTime.h>
+#import "LayoutSize.h"
+#import "PlatformWheelEvent.h"
+#import "WebCoreSystemInterface.h"
+#import "WheelEventTestTrigger.h"
+#import <sys/sysctl.h>
+#import <sys/time.h>
+#import <wtf/CurrentTime.h>
#if ENABLE(CSS_SCROLL_SNAP)
-#include "ScrollSnapAnimatorState.h"
-#include "ScrollableArea.h"
+#import "ScrollSnapAnimatorState.h"
+#import "ScrollableArea.h"
#endif
+#if PLATFORM(MAC)
+#import <pal/spi/mac/NSScrollViewSPI.h>
+#endif
+
#if ENABLE(RUBBER_BANDING) || ENABLE(CSS_SCROLL_SNAP)
namespace WebCore {
@@ -52,17 +56,17 @@
#if PLATFORM(MAC)
static float elasticDeltaForTimeDelta(float initialPosition, float initialVelocity, float elapsedTime)
{
- return wkNSElasticDeltaForTimeDelta(initialPosition, initialVelocity, elapsedTime);
+ return _NSElasticDeltaForTimeDelta(initialPosition, initialVelocity, elapsedTime);
}
static float elasticDeltaForReboundDelta(float delta)
{
- return wkNSElasticDeltaForReboundDelta(delta);
+ return _NSElasticDeltaForReboundDelta(delta);
}
static float reboundDeltaForElasticDelta(float delta)
{
- return wkNSReboundDeltaForElasticDelta(delta);
+ return _NSReboundDeltaForElasticDelta(delta);
}
static float scrollWheelMultiplier()
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (222149 => 222150)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,7 +24,6 @@
*/
#include "config.h"
-
#include "GraphicsLayerCA.h"
#if USE(CA)
@@ -47,6 +46,7 @@
#include "TranslateTransformOperation.h"
#include <QuartzCore/CATransform3D.h>
#include <limits.h>
+#include <pal/spi/cf/CFUtilitiesSPI.h>
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
#include <wtf/NeverDestroyed.h>
@@ -2988,7 +2988,7 @@
// on or before Snow Leopard.
// FIXME: This fix has not been added to QuartzCore on Windows yet (<rdar://problem/9112233>) so we expect the
// reversed animation behavior
- static bool executableWasLinkedOnOrBeforeSnowLeopard = wkExecutableWasLinkedOnOrBeforeSnowLeopard();
+ static bool executableWasLinkedOnOrBeforeSnowLeopard = !_CFExecutableLinkedOnOrAfter(CFSystemVersionLion);
if (!executableWasLinkedOnOrBeforeSnowLeopard)
reverseAnimationList = false;
#endif
Modified: trunk/Source/WebCore/platform/mac/CursorMac.mm (222149 => 222150)
--- trunk/Source/WebCore/platform/mac/CursorMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/mac/CursorMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,6 +27,8 @@
#import "Cursor.h"
#import "WebCoreSystemInterface.h"
+#import <objc/runtime.h>
+#import <pal/spi/mac/HIServicesSPI.h>
#import <wtf/BlockObjCExceptions.h>
#import <wtf/StdLibExtras.h>
@@ -37,7 +39,140 @@
@end
namespace WebCore {
+
+static NSCursor *busyButClickableNSCursor;
+static NSCursor *makeAliasNSCursor;
+static NSCursor *moveNSCursor;
+static NSCursor *resizeEastNSCursor;
+static NSCursor *resizeEastWestNSCursor;
+static NSCursor *resizeNorthNSCursor;
+static NSCursor *resizeNorthSouthNSCursor;
+static NSCursor *resizeNortheastNSCursor;
+static NSCursor *resizeNortheastSouthwestNSCursor;
+static NSCursor *resizeNorthwestNSCursor;
+static NSCursor *resizeNorthwestSoutheastNSCursor;
+static NSCursor *resizeSouthNSCursor;
+static NSCursor *resizeSoutheastNSCursor;
+static NSCursor *resizeSouthwestNSCursor;
+static NSCursor *resizeWestNSCursor;
+static NSCursor *cellNSCursor;
+static NSCursor *helpNSCursor;
+static NSCursor *zoomInNSCursor;
+static NSCursor *zoomOutNSCursor;
+
+static NSInteger WKCoreCursor_coreCursorType(id self, SEL)
+{
+ if (self == busyButClickableNSCursor)
+ return kCoreCursorBusyButClickable;
+ if (self == makeAliasNSCursor)
+ return kCoreCursorMakeAlias;
+ if (self == moveNSCursor)
+ return kCoreCursorWindowMove;
+ if (self == resizeEastNSCursor)
+ return kCoreCursorWindowResizeEast;
+ if (self == resizeEastWestNSCursor)
+ return kCoreCursorWindowResizeEastWest;
+ if (self == resizeNorthNSCursor)
+ return kCoreCursorWindowResizeNorth;
+ if (self == resizeNorthSouthNSCursor)
+ return kCoreCursorWindowResizeNorthSouth;
+ if (self == resizeNortheastNSCursor)
+ return kCoreCursorWindowResizeNorthEast;
+ if (self == resizeNortheastSouthwestNSCursor)
+ return kCoreCursorWindowResizeNorthEastSouthWest;
+ if (self == resizeNorthwestNSCursor)
+ return kCoreCursorWindowResizeNorthWest;
+ if (self == resizeNorthwestSoutheastNSCursor)
+ return kCoreCursorWindowResizeNorthWestSouthEast;
+ if (self == resizeSouthNSCursor)
+ return kCoreCursorWindowResizeSouth;
+ if (self == resizeSoutheastNSCursor)
+ return kCoreCursorWindowResizeSouthEast;
+ if (self == resizeSouthwestNSCursor)
+ return kCoreCursorWindowResizeSouthWest;
+ if (self == resizeWestNSCursor)
+ return kCoreCursorWindowResizeWest;
+ if (self == cellNSCursor)
+ return kCoreCursorCell;
+ if (self == helpNSCursor)
+ return kCoreCursorHelp;
+ if (self == zoomInNSCursor)
+ return kCoreCursorZoomIn;
+ if (self == zoomOutNSCursor)
+ return kCoreCursorZoomOut;
+
+ return NSNotFound;
+}
+
+static Class createCoreCursorClass()
+{
+ Class coreCursorClass = objc_allocateClassPair([NSCursor class], "WKCoreCursor", 0);
+ SEL coreCursorType = NSSelectorFromString(@"_coreCursorType");
+ class_addMethod(coreCursorClass, coreCursorType, (IMP)WKCoreCursor_coreCursorType, method_getTypeEncoding(class_getInstanceMethod([NSCursor class], coreCursorType)));
+ objc_registerClassPair(coreCursorClass);
+ return coreCursorClass;
+}
+
+static Class coreCursorClass()
+{
+ Class coreCursorClass = objc_lookUpClass("WKCoreCursor");
+ if (!coreCursorClass)
+ coreCursorClass = createCoreCursorClass();
+ return coreCursorClass;
+}
+
+static NSCursor *cursor(const char *name)
+{
+ NSCursor **slot = 0;
+
+ if (!strcmp(name, "BusyButClickable"))
+ slot = &busyButClickableNSCursor;
+ else if (!strcmp(name, "MakeAlias"))
+ slot = &makeAliasNSCursor;
+ else if (!strcmp(name, "Move"))
+ slot = &moveNSCursor;
+ else if (!strcmp(name, "ResizeEast"))
+ slot = &resizeEastNSCursor;
+ else if (!strcmp(name, "ResizeEastWest"))
+ slot = &resizeEastWestNSCursor;
+ else if (!strcmp(name, "ResizeNorth"))
+ slot = &resizeNorthNSCursor;
+ else if (!strcmp(name, "ResizeNorthSouth"))
+ slot = &resizeNorthSouthNSCursor;
+ else if (!strcmp(name, "ResizeNortheast"))
+ slot = &resizeNortheastNSCursor;
+ else if (!strcmp(name, "ResizeNortheastSouthwest"))
+ slot = &resizeNortheastSouthwestNSCursor;
+ else if (!strcmp(name, "ResizeNorthwest"))
+ slot = &resizeNorthwestNSCursor;
+ else if (!strcmp(name, "ResizeNorthwestSoutheast"))
+ slot = &resizeNorthwestSoutheastNSCursor;
+ else if (!strcmp(name, "ResizeSouth"))
+ slot = &resizeSouthNSCursor;
+ else if (!strcmp(name, "ResizeSoutheast"))
+ slot = &resizeSoutheastNSCursor;
+ else if (!strcmp(name, "ResizeSouthwest"))
+ slot = &resizeSouthwestNSCursor;
+ else if (!strcmp(name, "ResizeWest"))
+ slot = &resizeWestNSCursor;
+ else if (!strcmp(name, "Cell"))
+ slot = &cellNSCursor;
+ else if (!strcmp(name, "Help"))
+ slot = &helpNSCursor;
+ else if (!strcmp(name, "ZoomIn"))
+ slot = &zoomInNSCursor;
+ else if (!strcmp(name, "ZoomOut"))
+ slot = &zoomOutNSCursor;
+
+ if (!slot)
+ return nil;
+
+ if (!*slot)
+ *slot = [[coreCursorClass() alloc] init];
+ return *slot;
+}
+
// Simple NSCursor calls shouldn't need protection,
// but creating a cursor with a bad image might throw.
@@ -103,72 +238,72 @@
break;
case Cursor::Wait:
- m_platformCursor = wkCursor("BusyButClickable");
+ m_platformCursor = cursor("BusyButClickable");
break;
case Cursor::Help:
- m_platformCursor = wkCursor("Help");
+ m_platformCursor = cursor("Help");
break;
case Cursor::Move:
case Cursor::MiddlePanning:
- m_platformCursor = wkCursor("Move");
+ m_platformCursor = cursor("Move");
break;
case Cursor::EastResize:
case Cursor::EastPanning:
- m_platformCursor = wkCursor("ResizeEast");
+ m_platformCursor = cursor("ResizeEast");
break;
case Cursor::NorthResize:
case Cursor::NorthPanning:
- m_platformCursor = wkCursor("ResizeNorth");
+ m_platformCursor = cursor("ResizeNorth");
break;
case Cursor::NorthEastResize:
case Cursor::NorthEastPanning:
- m_platformCursor = wkCursor("ResizeNortheast");
+ m_platformCursor = cursor("ResizeNortheast");
break;
case Cursor::NorthWestResize:
case Cursor::NorthWestPanning:
- m_platformCursor = wkCursor("ResizeNorthwest");
+ m_platformCursor = cursor("ResizeNorthwest");
break;
case Cursor::SouthResize:
case Cursor::SouthPanning:
- m_platformCursor = wkCursor("ResizeSouth");
+ m_platformCursor = cursor("ResizeSouth");
break;
case Cursor::SouthEastResize:
case Cursor::SouthEastPanning:
- m_platformCursor = wkCursor("ResizeSoutheast");
+ m_platformCursor = cursor("ResizeSoutheast");
break;
case Cursor::SouthWestResize:
case Cursor::SouthWestPanning:
- m_platformCursor = wkCursor("ResizeSouthwest");
+ m_platformCursor = cursor("ResizeSouthwest");
break;
case Cursor::WestResize:
case Cursor::WestPanning:
- m_platformCursor = wkCursor("ResizeWest");
+ m_platformCursor = cursor("ResizeWest");
break;
case Cursor::NorthSouthResize:
- m_platformCursor = wkCursor("ResizeNorthSouth");
+ m_platformCursor = cursor("ResizeNorthSouth");
break;
case Cursor::EastWestResize:
- m_platformCursor = wkCursor("ResizeEastWest");
+ m_platformCursor = cursor("ResizeEastWest");
break;
case Cursor::NorthEastSouthWestResize:
- m_platformCursor = wkCursor("ResizeNortheastSouthwest");
+ m_platformCursor = cursor("ResizeNortheastSouthwest");
break;
case Cursor::NorthWestSouthEastResize:
- m_platformCursor = wkCursor("ResizeNorthwestSoutheast");
+ m_platformCursor = cursor("ResizeNorthwestSoutheast");
break;
case Cursor::ColumnResize:
@@ -184,7 +319,7 @@
break;
case Cursor::Cell:
- m_platformCursor = wkCursor("Cell");
+ m_platformCursor = cursor("Cell");
break;
case Cursor::ContextMenu:
@@ -192,11 +327,11 @@
break;
case Cursor::Alias:
- m_platformCursor = wkCursor("MakeAlias");
+ m_platformCursor = cursor("MakeAlias");
break;
case Cursor::Progress:
- m_platformCursor = wkCursor("BusyButClickable");
+ m_platformCursor = cursor("BusyButClickable");
break;
case Cursor::NoDrop:
@@ -216,11 +351,11 @@
break;
case Cursor::ZoomIn:
- m_platformCursor = wkCursor("ZoomIn");
+ m_platformCursor = cursor("ZoomIn");
break;
case Cursor::ZoomOut:
- m_platformCursor = wkCursor("ZoomOut");
+ m_platformCursor = cursor("ZoomOut");
break;
case Cursor::Grab:
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (222149 => 222150)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2017-09-18 16:21:29 UTC (rev 222150)
@@ -123,7 +123,6 @@
wkPatternTilingConstantSpacing
} wkPatternTiling;
#if !PLATFORM(IOS)
-extern void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
extern void (*wkDrawMediaSliderTrack)(CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
float duration, unsigned state);
extern void (*wkDrawMediaUIPart)(int part, CGContextRef context, CGRect rect, unsigned state);
@@ -136,14 +135,6 @@
extern void* wkGetHyphenationLocationBeforeIndex;
#endif
-#if !PLATFORM(IOS)
-extern bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
-
-extern CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
-
-extern NSCursor *(*wkCursor)(const char*);
-#endif // !PLATFORM(IOS)
-
#if PLATFORM(IOS)
extern void (*wkSetLayerContentsScale)(CALayer *);
#endif
@@ -150,10 +141,4 @@
typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
-#if !PLATFORM(IOS)
-extern CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
-extern CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
-extern CGFloat (*wkNSReboundDeltaForElasticDelta)(CGFloat delta);
-#endif
-
}
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (222149 => 222150)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -30,7 +30,6 @@
#import <Foundation/Foundation.h>
-void (*wkDrawBezeledTextArea)(NSRect, BOOL enabled);
void (*wkDrawMediaSliderTrack)(CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
float duration, unsigned state);
BOOL (*wkHitTestMediaUIPart)(int part, CGRect bounds, CGPoint point);
@@ -42,14 +41,4 @@
void* wkGetHyphenationLocationBeforeIndex;
-bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
-
CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
-
-NSCursor *(*wkCursor)(const char*);
-
-#if !PLATFORM(IOS)
-CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
-CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
-CGFloat (*wkNSReboundDeltaForElasticDelta)(CGFloat delta);
-#endif
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (222149 => 222150)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -74,6 +74,7 @@
#import <math.h>
#import <pal/spi/cg/CoreGraphicsSPI.h>
#import <pal/spi/cocoa/NSColorSPI.h>
+#import <pal/spi/mac/NSCellSPI.h>
#import <pal/spi/mac/NSSharingServicePickerSPI.h>
#import <wtf/MathExtras.h>
#import <wtf/RetainPtr.h>
@@ -884,7 +885,7 @@
bool RenderThemeMac::paintTextArea(const RenderObject& o, const PaintInfo& paintInfo, const FloatRect& r)
{
LocalCurrentGraphicsContext localContext(paintInfo.context());
- wkDrawBezeledTextArea(r, isEnabled(o) && !isReadOnlyControl(o));
+ _NSDrawCarbonThemeListBox(r, isEnabled(o) && !isReadOnlyControl(o), YES, YES);
return false;
}
Modified: trunk/Source/WebKit/ChangeLog (222149 => 222150)
--- trunk/Source/WebKit/ChangeLog 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/ChangeLog 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,3 +1,31 @@
+2017-09-18 Andy Estes <[email protected]>
+
+ [Mac] Upstream miscellaneous WebKitSystemInterface functions
+ https://bugs.webkit.org/show_bug.cgi?id=177029
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/mac/NetworkProcessMac.mm:
+ (WebKit::NetworkProcess::initializeProcessName):
+ * PluginProcess/mac/PluginProcessMac.mm:
+ (WebKit::PluginProcess::initializeProcessName):
+ * StorageProcess/mac/StorageProcessMac.mm:
+ (WebKit::StorageProcess::initializeProcessName):
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::trackingAreaOptions):
+ (WebKit::WebViewImpl::mightBeginScrollWhileInactive):
+ * UIProcess/mac/WebPopupMenuProxyMac.mm:
+ (WebKit::WebPopupMenuProxyMac::showPopupMenu):
+ * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
+ (WebKit::NetscapePlugin::popUpContextMenu):
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::handleContextMenuEvent):
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::initializeProcessName):
+ (WebKit::WebProcess::updateActivePages):
+
2017-09-17 Michael Catanzaro <[email protected]>
[WPE][GTK] Merge ProcessLauncher[WPE,GTK]
Modified: trunk/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm (222149 => 222150)
--- trunk/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -42,6 +42,7 @@
#import <WebKitSystemInterface.h>
#import <notify.h>
#import <pal/spi/cf/CFNetworkSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#import <sysexits.h>
#import <wtf/MemoryPressureHandler.h>
#import <wtf/text/WTFString.h>
@@ -59,7 +60,7 @@
void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters)
{
NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Networking", "visible name of the network process. The argument is the application name."), (NSString *)parameters.uiProcessName];
- WKSetVisibleApplicationName((CFStringRef)applicationName);
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);
}
static void overrideSystemProxies(const String& httpProxy, const String& httpsProxy)
Modified: trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (222149 => 222150)
--- trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/PluginProcess/mac/PluginProcessMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -47,6 +47,7 @@
#import <mach/vm_statistics.h>
#import <objc/runtime.h>
#import <pal/spi/cg/CoreGraphicsSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#import <pal/spi/mac/HIToolboxSPI.h>
#import <pal/spi/mac/NSWindowSPI.h>
#import <sysexits.h>
@@ -622,9 +623,9 @@
void PluginProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters)
{
NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ (%@ Internet plug-in)", "visible name of the plug-in host process. The first argument is the plug-in name and the second argument is the application name."), [[(NSString *)m_pluginPath lastPathComponent] stringByDeletingPathExtension], (NSString *)parameters.uiProcessName];
- WKSetVisibleApplicationName((CFStringRef)applicationName);
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);
if (!m_pluginBundleIdentifier.isEmpty())
- WKSetApplicationInformationItem(kLSPlugInBundleIdentifierKey, m_pluginBundleIdentifier.createCFString().get());
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), kLSPlugInBundleIdentifierKey, m_pluginBundleIdentifier.createCFString().get(), nullptr);
}
void PluginProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters)
Modified: trunk/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm (222149 => 222150)
--- trunk/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/StorageProcess/mac/StorageProcessMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +33,7 @@
#import <WebCore/FileSystem.h>
#import <WebCore/LocalizedStrings.h>
#import <WebKitSystemInterface.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
using namespace WebCore;
@@ -47,7 +48,7 @@
void StorageProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters)
{
NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Storage", "visible name of the storage process. The argument is the application name."), (NSString *)parameters.uiProcessName];
- WKSetVisibleApplicationName((CFStringRef)applicationName);
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);
}
void StorageProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (222149 => 222150)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -71,7 +71,7 @@
#import <wtf/NeverDestroyed.h>
#if HAVE(APP_LINKS)
-#import <pal/spi/ios/LaunchServicesSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#endif
#if USE(QUICK_LOOK)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (222149 => 222150)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -94,6 +94,7 @@
#import <pal/spi/mac/NSAccessibilitySPI.h>
#import <pal/spi/mac/NSApplicationSPI.h>
#import <pal/spi/mac/NSImmediateActionGestureRecognizerSPI.h>
+#import <pal/spi/mac/NSScrollerImpSPI.h>
#import <pal/spi/mac/NSSpellCheckerSPI.h>
#import <pal/spi/mac/NSTextFinderSPI.h>
#import <pal/spi/mac/NSWindowSPI.h>
@@ -1259,7 +1260,7 @@
{
// Legacy style scrollbars have design details that rely on tracking the mouse all the time.
NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
- if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
+ if (_NSRecommendedScrollerStyle() == NSScrollerStyleLegacy)
options |= NSTrackingActiveAlways;
else
options |= NSTrackingActiveInKeyWindow;
@@ -1945,7 +1946,7 @@
bool WebViewImpl::mightBeginScrollWhileInactive()
{
// Legacy style scrollbars have design details that rely on tracking the mouse all the time.
- if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy)
+ if (_NSRecommendedScrollerStyle() == NSScrollerStyleLegacy)
return true;
return false;
Modified: trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm (222149 => 222150)
--- trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -47,7 +47,7 @@
#import <wtf/text/WTFString.h>
#if HAVE(APP_LINKS)
-#import <pal/spi/ios/LaunchServicesSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#endif
#if HAVE(SAFARI_SERVICES_FRAMEWORK)
Modified: trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm (222149 => 222150)
--- trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/UIProcess/mac/WebPopupMenuProxyMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +34,7 @@
#import "StringUtilities.h"
#import "WebPopupItem.h"
#import <WebKitSystemInterface.h>
+#import <pal/system/mac/PopupMenu.h>
using namespace WebCore;
@@ -165,7 +166,7 @@
}
Ref<WebPopupMenuProxyMac> protect(*this);
- WKPopupMenu(menu, location, roundf(NSWidth(rect)), dummyView.get(), selectedIndex, font, controlSize, data.hideArrows);
+ PAL::popUpMenu(menu, location, roundf(NSWidth(rect)), dummyView.get(), selectedIndex, font, controlSize, data.hideArrows);
[m_popup dismissPopUp];
[dummyView removeFromSuperview];
Modified: trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm (222149 => 222150)
--- trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -38,6 +38,7 @@
#import <WebKitSystemInterface.h>
#import <objc/runtime.h>
#import <pal/spi/mac/HIToolboxSPI.h>
+#import <pal/spi/mac/NSMenuSPI.h>
#import <wtf/NeverDestroyed.h>
#import <wtf/text/StringView.h>
@@ -158,7 +159,6 @@
return false;
}
-
NPError NetscapePlugin::popUpContextMenu(NPMenu* npMenu)
{
if (!m_currentMouseEvent)
@@ -168,7 +168,7 @@
if (!convertPoint(m_currentMouseEvent->data.mouse.pluginX, m_currentMouseEvent->data.mouse.pluginY, NPCoordinateSpacePlugin, screenX, screenY, NPCoordinateSpaceScreen))
ASSERT_NOT_REACHED();
- WKPopupContextMenu(reinterpret_cast<NSMenu *>(npMenu), NSMakePoint(screenX, screenY));
+ _NSPopUpCarbonMenu3(reinterpret_cast<NSMenu *>(npMenu), nil, nil, NSMakePoint(screenX, screenY), -1, nil, 0, nil, NSPopUpMenuTypeContext, nil);
return NPERR_NO_ERROR;
}
Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (222149 => 222150)
--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009, 2011, 2012, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -81,6 +81,7 @@
#import <WebCore/WheelEventTestTrigger.h>
#import <WebKitSystemInterface.h>
#import <pal/spi/cg/CoreGraphicsSPI.h>
+#import <pal/spi/mac/NSMenuSPI.h>
#import <wtf/CurrentTime.h>
#import <wtf/UUID.h>
@@ -1585,7 +1586,7 @@
IntPoint point = frameView->contentsToScreen(IntRect(frameView->windowToContents(event.position()), IntSize())).location();
if (NSMenu *nsMenu = [m_pdfLayerController menuForEvent:nsEventForWebMouseEvent(event)]) {
- WKPopupContextMenu(nsMenu, point);
+ _NSPopUpCarbonMenu3(nsMenu, nil, nil, point, -1, nil, 0, nil, NSPopUpMenuTypeContext, nil);
return true;
}
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (222149 => 222150)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -37,17 +37,10 @@
dispatch_once(&initOnce, ^{
#if !PLATFORM(IOS)
- INIT(DrawBezeledTextArea);
INIT(DrawMediaSliderTrack);
INIT(DrawMediaUIPart);
INIT(HitTestMediaUIPart);
INIT(MeasureMediaUIPart);
- INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
- INIT(CopyDefaultSearchProviderDisplayName);
- INIT(Cursor);
- INIT(NSElasticDeltaForTimeDelta);
- INIT(NSElasticDeltaForReboundDelta);
- INIT(NSReboundDeltaForElasticDelta);
#endif
});
}
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (222149 => 222150)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -62,6 +62,7 @@
#import <dispatch/dispatch.h>
#import <objc/runtime.h>
#import <pal/spi/cf/CFNetworkSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <pal/spi/cocoa/pthreadSPI.h>
#import <pal/spi/mac/NSAccessibilitySPI.h>
@@ -194,7 +195,7 @@
applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Web Inspector", "Visible name of Web Inspector's web process. The argument is the application name."), (NSString *)parameters.uiProcessName];
else
applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Web Content", "Visible name of the web process. The argument is the application name."), (NSString *)parameters.uiProcessName];
- WKSetVisibleApplicationName((CFStringRef)applicationName);
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr);
#endif
}
@@ -394,7 +395,7 @@
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), [activePageURLs] {
- WKSetApplicationInformationItem(CFSTR("LSActivePageUserVisibleOriginsKey"), (__bridge CFArrayRef)activePageURLs.get());
+ _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), CFSTR("LSActivePageUserVisibleOriginsKey"), (__bridge CFArrayRef)activePageURLs.get(), nullptr);
});
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,3 +1,28 @@
+2017-09-18 Andy Estes <[email protected]>
+
+ [Mac] Upstream miscellaneous WebKitSystemInterface functions
+ https://bugs.webkit.org/show_bug.cgi?id=177029
+
+ Reviewed by Alex Christensen.
+
+ * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
+ (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
+ * WebCoreSupport/PopupMenuMac.mm:
+ (PopupMenuMac::show):
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView setDataSource:]):
+ (-[WebHTMLView attachRootLayer:]):
+ * WebView/WebView.mm:
+ (-[WebView _needsAdobeFrameReloadingQuirk]):
+ (-[WebView _needsLinkElementTextCSSQuirk]):
+ (-[WebView _needsIsLoadingInAPISenseQuirk]):
+ (-[WebView _needsFrameLoadDelegateRetainQuirk]):
+ (-[WebView _preferencesChanged:]):
+
2017-09-15 Andy Estes <[email protected]>
[Cocoa] Upstream MediaRemote and VideoToolbox WebKitSystemInterface functions
Modified: trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -51,6 +51,7 @@
#import <WebKitLegacy/DOM.h>
#import <WebKitLegacy/DOMPrivate.h>
#import <WebKitSystemInterface.h>
+#import <pal/system/mac/DefaultSearchProvider.h>
#import <wtf/Assertions.h>
@implementation WebDefaultUIDelegate (WebContextMenu)
@@ -91,7 +92,7 @@
action = ""
break;
case WebMenuItemTagSearchWeb: {
- RetainPtr<CFStringRef> searchProviderName = adoptCF(WKCopyDefaultSearchProviderDisplayName());
+ auto searchProviderName = PAL::defaultSearchProviderDisplayName();
title = [NSString stringWithFormat:UI_STRING_INTERNAL("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get()];
action = ""
break;
Modified: trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostProxy.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008-2017 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,6 +41,7 @@
#import <WebCore/Frame.h>
#import <WebCore/IdentifierRep.h>
#import <WebCore/ScriptController.h>
+#import <pal/spi/mac/HIServicesSPI.h>
#import <wtf/NeverDestroyed.h>
extern "C" {
@@ -117,7 +118,7 @@
CFRunLoopAddSource(CFRunLoopGetCurrent(), deathPortSource.get(), kCFRunLoopDefaultMode);
- m_clientPortSource = adoptCF(WKCreateMIGServerSource((mig_subsystem_t)&WKWebKitPluginClient_subsystem, m_clientPort));
+ m_clientPortSource = adoptCF(MSHCreateMIGServerSource(nullptr, 0, (mig_subsystem_t)&WKWebKitPluginClient_subsystem, 0, m_clientPort, nullptr));
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), kCFRunLoopDefaultMode);
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_clientPortSource.get(), (CFStringRef)NSEventTrackingRunLoopMode);
}
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2008, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* This library is free software; you can redistribute it and/or
@@ -33,6 +33,7 @@
#import <WebCore/Page.h>
#import <WebCore/PopupMenuClient.h>
#import <WebKitSystemInterface.h>
+#import <pal/system/mac/PopupMenu.h>
#import <wtf/BlockObjCExceptions.h>
using namespace WebCore;
@@ -217,7 +218,7 @@
break;
}
- WKPopupMenu(menu, location, roundf(NSWidth(r)), dummyView.get(), index, toNSFont(font), controlSize, !m_client->menuStyle().hasDefaultAppearance());
+ PAL::popUpMenu(menu, location, roundf(NSWidth(r)), dummyView.get(), index, toNSFont(font), controlSize, !m_client->menuStyle().hasDefaultAppearance());
[m_popup dismissPopUp];
[dummyView removeFromSuperview];
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -155,7 +155,7 @@
#if HAVE(APP_LINKS)
#import <WebCore/WebCoreThreadRun.h>
-#import <pal/spi/ios/LaunchServicesSPI.h>
+#import <pal/spi/cocoa/LaunchServicesSPI.h>
#endif
#if ENABLE(CONTENT_FILTERING)
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebSystemInterface.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebSystemInterface.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebSystemInterface.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -43,7 +43,6 @@
return;
#if !PLATFORM(IOS)
- INIT(DrawBezeledTextArea);
INIT(DrawMediaUIPart);
INIT(DrawMediaSliderTrack);
INIT(HitTestMediaUIPart);
@@ -50,17 +49,5 @@
INIT(MeasureMediaUIPart);
#endif
-#if !PLATFORM(IOS)
- INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
- INIT(CopyDefaultSearchProviderDisplayName);
- INIT(Cursor);
-#endif
-
-#if !PLATFORM(IOS)
- INIT(NSElasticDeltaForTimeDelta);
- INIT(NSElasticDeltaForReboundDelta);
- INIT(NSReboundDeltaForElasticDelta);
-#endif
-
didInit = true;
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -130,7 +130,9 @@
#import <WebKitSystemInterface.h>
#import <dlfcn.h>
#import <limits>
+#import <pal/spi/cf/CFUtilitiesSPI.h>
#import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>
+#import <pal/spi/mac/NSScrollerImpSPI.h>
#import <pal/spi/mac/NSSpellCheckerSPI.h>
#import <pal/spi/mac/NSViewSPI.h>
#import <pal/spi/mac/NSWindowSPI.h>
@@ -4682,7 +4684,7 @@
#if PLATFORM(MAC)
if (!_private->installedTrackingArea) {
NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingCursorUpdate;
- if (WKRecommendedScrollerStyle() == NSScrollerStyleLegacy
+ if (_NSRecommendedScrollerStyle() == NSScrollerStyleLegacy
#if ENABLE(DASHBOARD_SUPPORT)
|| [[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows]
#endif
@@ -6354,7 +6356,7 @@
if ([[self _webView] _postsAcceleratedCompositingNotifications])
[[NSNotificationCenter defaultCenter] postNotificationName:_WebViewDidStartAcceleratedCompositingNotification object:[self _webView] userInfo:nil];
- if (WKExecutableWasLinkedOnOrBeforeLion())
+ if (!_CFExecutableLinkedOnOrAfter(CFSystemVersionMountainLion))
[viewLayer setGeometryFlipped:YES];
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (222149 => 222150)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-09-18 16:09:25 UTC (rev 222149)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-09-18 16:21:29 UTC (rev 222150)
@@ -209,6 +209,7 @@
#import <mach-o/dyld.h>
#import <objc/runtime.h>
#import <pal/spi/cf/CFNetworkSPI.h>
+#import <pal/spi/cf/CFUtilitiesSPI.h>
#import <pal/spi/cocoa/NSTouchBarSPI.h>
#import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>
#import <pal/spi/mac/NSResponderSPI.h>
@@ -2609,16 +2610,16 @@
#if !PLATFORM(IOS)
- (BOOL)_needsAdobeFrameReloadingQuirk
{
- static BOOL needsQuirk = WKAppVersionCheckLessThan(@"com.adobe.Acrobat", -1, 9.0)
- || WKAppVersionCheckLessThan(@"com.adobe.Acrobat.Pro", -1, 9.0)
- || WKAppVersionCheckLessThan(@"com.adobe.Reader", -1, 9.0)
- || WKAppVersionCheckLessThan(@"com.adobe.distiller", -1, 9.0)
- || WKAppVersionCheckLessThan(@"com.adobe.Contribute", -1, 4.2)
- || WKAppVersionCheckLessThan(@"com.adobe.dreamweaver-9.0", -1, 9.1)
- || WKAppVersionCheckLessThan(@"com.macromedia.fireworks", -1, 9.1)
- || WKAppVersionCheckLessThan(@"com.adobe.InCopy", -1, 5.1)
- || WKAppVersionCheckLessThan(@"com.adobe.InDesign", -1, 5.1)
- || WKAppVersionCheckLessThan(@"com.adobe.Soundbooth", -1, 2);
+ static BOOL needsQuirk = _CFAppVersionCheckLessThan(CFSTR("com.adobe.Acrobat"), -1, 9.0)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.Acrobat.Pro"), -1, 9.0)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.Reader"), -1, 9.0)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.distiller"), -1, 9.0)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.Contribute"), -1, 4.2)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.dreamweaver-9.0"), -1, 9.1)
+ || _CFAppVersionCheckLessThan(CFSTR("com.macromedia.fireworks"), -1, 9.1)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.InCopy"), -1, 5.1)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.InDesign"), -1, 5.1)
+ || _CFAppVersionCheckLessThan(CFSTR("com.adobe.Soundbooth"), -1, 2);
return needsQuirk;
}
@@ -2626,13 +2627,13 @@
- (BOOL)_needsLinkElementTextCSSQuirk
{
static BOOL needsQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_LINK_ELEMENT_TEXT_CSS_QUIRK)
- && WKAppVersionCheckLessThan(@"com.e-frontier.shade10", -1, 10.6);
+ && _CFAppVersionCheckLessThan(CFSTR("com.e-frontier.shade10"), -1, 10.6);
return needsQuirk;
}
- (BOOL)_needsIsLoadingInAPISenseQuirk
{
- static BOOL needsQuirk = WKAppVersionCheckLessThan(@"com.apple.iAdProducer", -1, 2.1);
+ static BOOL needsQuirk = _CFAppVersionCheckLessThan(CFSTR("com.apple.iAdProducer"), -1, 2.1);
return needsQuirk;
}
@@ -2645,7 +2646,7 @@
- (BOOL)_needsFrameLoadDelegateRetainQuirk
{
- static BOOL needsQuirk = WKAppVersionCheckLessThan(@"com.equinux.iSale5", -1, 5.6);
+ static BOOL needsQuirk = _CFAppVersionCheckLessThan(CFSTR("com.equinux.iSale5"), -1, 5.6);
return needsQuirk;
}
@@ -2927,7 +2928,7 @@
settings.setNeedsAdobeFrameReloadingQuirk([self _needsAdobeFrameReloadingQuirk]);
settings.setTreatsAnyTextCSSLinkAsStylesheet([self _needsLinkElementTextCSSQuirk]);
settings.setNeedsKeyboardEventDisambiguationQuirks([self _needsKeyboardEventDisambiguationQuirks]);
- settings.setEnforceCSSMIMETypeInNoQuirksMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings.setEnforceCSSMIMETypeInNoQuirksMode(!_CFAppVersionCheckLessThan(CFSTR("com.apple.iWeb"), -1, 2.1));
settings.setNeedsIsLoadingInAPISenseQuirk([self _needsIsLoadingInAPISenseQuirk]);
settings.setTextAreasAreResizable([preferences textAreasAreResizable]);
settings.setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]);