diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
| commit | 8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch) | |
| tree | 17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebKit2/UIProcess/mac | |
| parent | b9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff) | |
| download | qtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz | |
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well
as the previously cherry-picked changes
Diffstat (limited to 'Source/WebKit2/UIProcess/mac')
| -rw-r--r-- | Source/WebKit2/UIProcess/mac/WebContextMac.mm | 37 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm | 2 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm | 16 |
3 files changed, 34 insertions, 21 deletions
diff --git a/Source/WebKit2/UIProcess/mac/WebContextMac.mm b/Source/WebKit2/UIProcess/mac/WebContextMac.mm index 68c8e1125..9a9232cb0 100644 --- a/Source/WebKit2/UIProcess/mac/WebContextMac.mm +++ b/Source/WebKit2/UIProcess/mac/WebContextMac.mm @@ -30,6 +30,7 @@ #import "WebProcessCreationParameters.h" #import <WebCore/Color.h> #import <WebCore/FileSystem.h> +#include <WebCore/NotImplemented.h> #import <WebCore/PlatformPasteboard.h> #import <sys/param.h> @@ -77,22 +78,8 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para { parameters.presenterApplicationPid = getpid(); - if (!omitPDFSupport()) { - // We want to use a PDF view in the UI process for PDF MIME types. - HashSet<String, CaseFoldingHash> mimeType = pdfAndPostScriptMIMETypes(); - parameters.mimeTypesWithCustomRepresentation.appendRange(mimeType.begin(), mimeType.end()); - } - parameters.parentProcessName = [[NSProcessInfo processInfo] processName]; - RetainPtr<CFStringRef> cachePath(AdoptCF, WKCopyFoundationCacheDirectory()); - if (!cachePath) - cachePath = reinterpret_cast<CFStringRef>(NSHomeDirectory()); - - parameters.nsURLCachePath = [(NSString *)cachePath.get() stringByStandardizingPath]; - SandboxExtension::createHandleForReadWriteDirectory(parameters.nsURLCachePath, parameters.nsURLCachePathExtensionHandle); - ASSERT(!parameters.nsURLCachePath.isEmpty()); - NSURLCache *urlCache = [NSURLCache sharedURLCache]; parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity]; parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity]; @@ -100,10 +87,7 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSFontDefaultScreenFontSubstitutionEnabled"]; #endif - -#if ENABLE(PLUGIN_PROCESS) - parameters.disablePluginProcessMessageTimeout = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitDisablePluginProcessMessageTimeout"]; -#endif + parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitKerningAndLigaturesEnabledByDefault"]; #if USE(ACCELERATED_COMPOSITING) && HAVE(HOSTED_CORE_ANIMATION) #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 @@ -131,7 +115,22 @@ void WebContext::platformInvalidateContext() { [[NSNotificationCenter defaultCenter] removeObserver:(id)m_enhancedAccessibilityObserver.get()]; } - + +String WebContext::platformDefaultDiskCacheDirectory() const +{ + RetainPtr<NSString> cachePath(AdoptNS, (NSString *)WKCopyFoundationCacheDirectory()); + if (!cachePath) + cachePath = @"~/Library/Caches/com.apple.WebKit2.WebProcess"; + + return [cachePath.get() stringByStandardizingPath]; +} + +String WebContext::platformDefaultCookieStorageDirectory() const +{ + notImplemented(); + return [@"" stringByStandardizingPath]; +} + String WebContext::platformDefaultDatabaseDirectory() const { NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey]; diff --git a/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm b/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm index eb442fde5..530a2f587 100644 --- a/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm +++ b/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm @@ -96,7 +96,7 @@ static const CGFloat windowContentBorderThickness = 55; // depend on this for enforcing the height constraints, so a small delay isn't terrible. Most // of the time the views will already have the correct frames because of autoresizing masks. - dispatch_after(DISPATCH_TIME_NOW, dispatch_get_current_queue(), ^{ + dispatch_after(DISPATCH_TIME_NOW, dispatch_get_main_queue(), ^{ if (!_inspectorProxy) return; static_cast<WebInspectorProxy*>(_inspectorProxy)->inspectedViewFrameDidChange(); diff --git a/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm b/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm index 73f3ddc02..a182faa42 100644 --- a/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm +++ b/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm @@ -149,6 +149,20 @@ bool WebProcessProxy::fullKeyboardAccessEnabled() return [WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]; } +#if HAVE(XPC) +static bool shouldUseXPC() +{ + if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"]) + return [value boolValue]; + +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 + return true; +#else + return false; +#endif +} +#endif + void WebProcessProxy::platformConnect(ProcessLauncher::LaunchOptions& launchOptions) { // We want the web process to match the architecture of the UI process. @@ -156,7 +170,7 @@ void WebProcessProxy::platformConnect(ProcessLauncher::LaunchOptions& launchOpti launchOptions.executableHeap = false; #if HAVE(XPC) - launchOptions.useXPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKit2UseXPCServiceForWebProcess"]; + launchOptions.useXPC = shouldUseXPC(); #endif } |
