Title: [169355] trunk
Revision
169355
Author
commit-qu...@webkit.org
Date
2014-05-26 10:45:08 -0700 (Mon, 26 May 2014)

Log Message

Unreviewed, rolling out r169122.
https://bugs.webkit.org/show_bug.cgi?id=133288

Broke CJK font fallback (Requested by ap on #webkit).

Reverted changeset:

"[Mac] WebProcess doesn't follow localization of UI process
when run as a service"
https://bugs.webkit.org/show_bug.cgi?id=133126
http://trac.webkit.org/changeset/169122

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (169354 => 169355)


--- trunk/Source/WebKit2/ChangeLog	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-26 17:45:08 UTC (rev 169355)
@@ -1,3 +1,17 @@
+2014-05-26  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r169122.
+        https://bugs.webkit.org/show_bug.cgi?id=133288
+
+        Broke CJK font fallback (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "[Mac] WebProcess doesn't follow localization of UI process
+        when run as a service"
+        https://bugs.webkit.org/show_bug.cgi?id=133126
+        http://trac.webkit.org/changeset/169122
+
 2014-05-26  Anders Carlsson  <ander...@apple.com>
 
         Convert a couple of loops over to range-based for

Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm (169354 => 169355)


--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm	2014-05-26 17:45:08 UTC (rev 169355)
@@ -31,22 +31,6 @@
 #import <stdlib.h>
 #import "XPCPtr.h"
 
-#if __has_include(<Foundation/NSPrivateDecls.h>)
-#import <Foundation/NSPrivateDecls.h>
-#endif
-
-#if __has_include(<xpc/private.h>)
-#import <xpc/private.h>
-#endif
-
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-extern "C" xpc_object_t xpc_copy_bootstrap();
-#endif
-
-@interface NSUserDefaults (Details)
-- (void)setObject:(id)value forKey:(NSString *)defaultName inDomain:(NSString *)domain;
-@end
-
 namespace WebKit {
 
 struct ReexecInfo {
@@ -171,25 +155,12 @@
     xpc_connection_resume(peer);
 }
 
-static void handleXPCBootstrap()
-{
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-    auto bootstrapData = IPC::adoptXPC(xpc_copy_bootstrap());
-    const char* localization = xpc_dictionary_get_string(bootstrapData.get(), "localization");
-    if (localization) {
-        // Do this before calling xpc_main(), so that the preference is set before any CFBundle code runs.
-        [[NSUserDefaults standardUserDefaults] setObject:@[ [NSString stringWithUTF8String:localization] ] forKey:@"AppleLanguages" inDomain:NSArgumentDomain];
-    }
-#endif
-}
-
 } // namespace WebKit;
 
 using namespace WebKit;
 
 int main(int argc, char** argv)
 {
-    handleXPCBootstrap();
     xpc_main(XPCServiceEventHandler);
     return 0;
 }

Modified: trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (169354 => 169355)


--- trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm	2014-05-26 17:45:08 UTC (rev 169355)
@@ -26,22 +26,6 @@
 #import <CoreFoundation/CoreFoundation.h>
 #import "XPCPtr.h"
 
-#if __has_include(<Foundation/NSPrivateDecls.h>)
-#import <Foundation/NSPrivateDecls.h>
-#endif
-
-#if __has_include(<xpc/private.h>)
-#import <xpc/private.h>
-#endif
-
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-extern "C" xpc_object_t xpc_copy_bootstrap();
-#endif
-
-@interface NSUserDefaults (Details)
-- (void)setObject:(id)value forKey:(NSString *)defaultName inDomain:(NSString *)domain;
-@end
-
 namespace WebKit {
 
 static void XPCServiceEventHandler(xpc_connection_t peer)
@@ -84,25 +68,12 @@
     xpc_connection_resume(peer);
 }
 
-static void handleXPCBootstrap()
-{
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-    auto bootstrapData = IPC::adoptXPC(xpc_copy_bootstrap());
-    const char* localization = xpc_dictionary_get_string(bootstrapData.get(), "localization");
-    if (localization) {
-        // Do this before calling xpc_main(), so that the preference is set before any CFBundle code runs.
-        [[NSUserDefaults standardUserDefaults] setObject:@[ [NSString stringWithUTF8String:localization] ] forKey:@"AppleLanguages" inDomain:NSArgumentDomain];
-    }
-#endif
-}
-
 } // namespace WebKit
 
 using namespace WebKit;
 
 int main(int argc, char** argv)
 {
-    handleXPCBootstrap();
     xpc_main(XPCServiceEventHandler);
     return 0;
 }

Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (169354 => 169355)


--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2014-05-26 17:45:08 UTC (rev 169355)
@@ -44,20 +44,12 @@
 #import <wtf/text/WTFString.h>
 #import <xpc/xpc.h>
 
-#if __has_include(<xpc/private.h>)
-#import <xpc/private.h>
-#endif
-
 // FIXME: We should be doing this another way.
 extern "C" kern_return_t bootstrap_register2(mach_port_t, name_t, mach_port_t, uint64_t);
 
 extern "C" void xpc_connection_set_instance(xpc_connection_t, uuid_t);
 extern "C" void xpc_dictionary_set_mach_send(xpc_object_t, const char*, mach_port_t);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-extern "C" void xpc_connection_set_bootstrap(xpc_connection_t connection, xpc_object_t bootstrap);
-#endif
-
 namespace WebKit {
 
 namespace {
@@ -184,20 +176,6 @@
     auto connection = IPC::adoptXPC(xpc_connection_create(serviceName(launchOptions, forDevelopment), 0));
     xpc_connection_set_instance(connection.get(), instanceUUID->uuid);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-    // Inherit UI process localization. It can be different from child process default localization:
-    // 1. When the application and system frameworks simply have different localized resources available, we should match the application.
-    // 1.1. An important case is WebKitTestRunner, where we should use English localizations for all system frameworks.
-    // 2. When AppleLanguages is passed as command line argument for UI process, or set in its preferences, we should respect it in child processes.
-    // FIXME: When UI process allows for mixed localizations (CFBundleAllowMixedLocalizations), we should probably send the whole AppleLanguages array.
-    RetainPtr<CFStringRef> localization = adoptCF(WKCopyCFLocalizationPreferredName(0));
-    if (localization) {
-        auto initializationMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0));
-        xpc_dictionary_set_string(initializationMessage.get(), "localization", String(localization.get()).ascii().data());
-        xpc_connection_set_bootstrap(connection.get(), initializationMessage.get());
-    }
-#endif
-
     // XPC requires having an event handler, even if it is not used.
     xpc_connection_set_event_handler(connection.get(), ^(xpc_object_t event) { });
     xpc_connection_resume(connection.get());
@@ -221,7 +199,6 @@
     NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
     CString clientIdentifier = bundleIdentifier ? String([[NSBundle mainBundle] bundleIdentifier]).utf8() : *_NSGetProgname();
 
-    // FIXME: Switch to xpc_connection_set_bootstrap once it's available everywhere we need.
     auto bootstrapMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0));
     xpc_dictionary_set_string(bootstrapMessage.get(), "message-name", "bootstrap");
     xpc_dictionary_set_string(bootstrapMessage.get(), "framework-executable-path", [[[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] executablePath] fileSystemRepresentation]);

Modified: trunk/Tools/ChangeLog (169354 => 169355)


--- trunk/Tools/ChangeLog	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Tools/ChangeLog	2014-05-26 17:45:08 UTC (rev 169355)
@@ -1,3 +1,17 @@
+2014-05-26  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r169122.
+        https://bugs.webkit.org/show_bug.cgi?id=133288
+
+        Broke CJK font fallback (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "[Mac] WebProcess doesn't follow localization of UI process
+        when run as a service"
+        https://bugs.webkit.org/show_bug.cgi?id=133126
+        http://trac.webkit.org/changeset/169122
+
 2014-05-26  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GTK] WebProcess leaked when closing pages with network process enabled

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm (169354 => 169355)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm	2014-05-26 17:43:41 UTC (rev 169354)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm	2014-05-26 17:45:08 UTC (rev 169355)
@@ -54,11 +54,9 @@
         @"NSScrollAnimationEnabled": @NO,
         @"NSOverlayScrollersEnabled": @NO,
         @"AppleShowScrollBars": @"Always",
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
         // FIXME (<rdar://problem/13396515>): It is too late to set AppleLanguages here, as loaded frameworks localizations cannot be changed.
         // This breaks some accessibility tests on machines with non-English user language.
         @"AppleLanguages": @[ @"en" ],
-#endif
         // FIXME: Why does this dictionary not match the one in DumpRenderTree?
         @"NSTestCorrectionDictionary": @{
             @"notationl": @"notational"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to