Changeset 170653 in webkit
- Timestamp:
- Jul 1, 2014 11:41:27 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r170652 r170653 1 2014-07-01 Alexey Proskuryakov <ap@apple.com> 2 3 [Cocoa] WebProcess doesn't follow localization of UI process when run as a service 4 https://bugs.webkit.org/show_bug.cgi?id=133126 5 <rdar://problem/13396515> 6 7 Patch by Alexey Proskuryakov. 8 Reviewed by Tim Horton. 9 10 * Configurations/WebContentService.Development.xcconfig: 11 * Configurations/WebContentService.xcconfig: 12 Figure out which of the two keys to use. CFBundleAllowMixedLocalizations was 13 a workaround before we got CFBundleFollowParentLocalization, and these cannot be 14 used together. 15 16 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Set up 17 XPC bootstrap for CFBundle to use. 18 19 * WebKit2.xcodeproj/project.pbxproj: Added a script that applies the key to Info.plist. 20 21 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist: 22 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: 23 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: 24 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: 25 Removed CFBundleAllowMixedLocalizations, we now add it programmatically. 26 1 27 2014-07-01 Alex Christensen <achristensen@webkit.org> 2 28 -
trunk/Source/WebKit2/Configurations/WebContentService.Development.xcconfig
r167543 r170653 1 // Copyright (C) 2012 , 2013Apple Inc. All rights reserved.1 // Copyright (C) 2012-2014 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 32 32 INFOPLIST_FILE_iphonesimulator = $(INFOPLIST_FILE_iphoneos); 33 33 34 BUNDLE_LOCALIZATION_KEY = $(BUNDLE_LOCALIZATION_KEY_$(PLATFORM_NAME)); 35 BUNDLE_LOCALIZATION_KEY_iphoneos = CFBundleFollowParentLocalization; 36 BUNDLE_LOCALIZATION_KEY_iphonesimulator = CFBundleFollowParentLocalization; 37 BUNDLE_LOCALIZATION_KEY_macosx = $(BUNDLE_LOCALIZATION_KEY_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 38 BUNDLE_LOCALIZATION_KEY_macosx_1080 = CFBundleAllowMixedLocalizations; 39 BUNDLE_LOCALIZATION_KEY_macosx_1090 = CFBundleAllowMixedLocalizations; 40 BUNDLE_LOCALIZATION_KEY_macosx_101000 = CFBundleFollowParentLocalization; 41 34 42 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/WebContent-iOS.entitlements 35 43 -
trunk/Source/WebKit2/Configurations/WebContentService.xcconfig
r167543 r170653 1 // Copyright (C) 2012 , 2013Apple Inc. All rights reserved.1 // Copyright (C) 2012-2014 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 32 32 INFOPLIST_FILE_iphonesimulator = $(INFOPLIST_FILE_iphoneos); 33 33 34 BUNDLE_LOCALIZATION_KEY = $(BUNDLE_LOCALIZATION_KEY_$(PLATFORM_NAME)); 35 BUNDLE_LOCALIZATION_KEY_iphoneos = CFBundleFollowParentLocalization; 36 BUNDLE_LOCALIZATION_KEY_iphonesimulator = CFBundleFollowParentLocalization; 37 BUNDLE_LOCALIZATION_KEY_macosx = $(BUNDLE_LOCALIZATION_KEY_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 38 BUNDLE_LOCALIZATION_KEY_macosx_1080 = CFBundleAllowMixedLocalizations; 39 BUNDLE_LOCALIZATION_KEY_macosx_1090 = CFBundleAllowMixedLocalizations; 40 BUNDLE_LOCALIZATION_KEY_macosx_101000 = CFBundleFollowParentLocalization; 41 34 42 CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*] = Configurations/WebContent-iOS.entitlements 35 43 -
trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
r169663 r170653 1 1 /* 2 * Copyright (C) 2010 , 2011, 2012Apple Inc. All rights reserved.2 * Copyright (C) 2010-2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 30 30 #import "EnvironmentVariables.h" 31 31 #import "WebKitSystemInterface.h" 32 #import <WebCore/SoftLinking.h> 32 33 #import <crt_externs.h> 33 34 #import <mach-o/dyld.h> … … 45 46 #import <xpc/xpc.h> 46 47 48 #if __has_include(<xpc/private.h>) 49 #import <xpc/private.h> 50 #endif 51 47 52 // FIXME: We should be doing this another way. 48 53 extern "C" kern_return_t bootstrap_register2(mach_port_t, name_t, mach_port_t, uint64_t); … … 50 55 extern "C" void xpc_connection_set_instance(xpc_connection_t, uuid_t); 51 56 extern "C" void xpc_dictionary_set_mach_send(xpc_object_t, const char*, mach_port_t); 57 58 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100 59 extern "C" void xpc_connection_set_bootstrap(xpc_connection_t connection, xpc_object_t bootstrap); 60 61 // FIXME: Soft linking is temporary, make this into a regular function call once this function is available everywhere we need. 62 SOFT_LINK_FRAMEWORK(CoreFoundation) 63 SOFT_LINK_OPTIONAL(CoreFoundation, _CFBundleSetupXPCBootstrap, void, unused, (xpc_object_t)) 64 65 #endif 52 66 53 67 namespace WebKit { … … 192 206 xpc_connection_set_instance(connection.get(), instanceUUID->uuid); 193 207 208 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100 209 // Inherit UI process localization. It can be different from child process default localization: 210 // 1. When the application and system frameworks simply have different localized resources available, we should match the application. 211 // 1.1. An important case is WebKitTestRunner, where we should use English localizations for all system frameworks. 212 // 2. When AppleLanguages is passed as command line argument for UI process, or set in its preferences, we should respect it in child processes. 213 RetainPtr<CFStringRef> localization = adoptCF(WKCopyCFLocalizationPreferredName(0)); 214 if (localization && _CFBundleSetupXPCBootstrapPtr()) { 215 auto initializationMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0)); 216 _CFBundleSetupXPCBootstrapPtr()(initializationMessage.get()); 217 xpc_connection_set_bootstrap(connection.get(), initializationMessage.get()); 218 } 219 #endif 220 194 221 // XPC requires having an event handler, even if it is not used. 195 222 xpc_connection_set_event_handler(connection.get(), ^(xpc_object_t event) { }); … … 212 239 CString clientIdentifier = bundleIdentifier ? String([[NSBundle mainBundle] bundleIdentifier]).utf8() : *_NSGetProgname(); 213 240 241 // FIXME: Switch to xpc_connection_set_bootstrap once it's available everywhere we need. 214 242 auto bootstrapMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0)); 215 243 xpc_dictionary_set_string(bootstrapMessage.get(), "message-name", "bootstrap"); -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r170640 r170653 8018 8018 BCDC308D15FDB99A006B6695 /* Frameworks */, 8019 8019 BC3DE46415A91763008D26FC /* Resources */, 8020 E19C7DDB194A5E9100F1866F /* Add CFBundle Localization Info.plist Key */, 8020 8021 ); 8021 8022 buildRules = ( … … 8126 8127 BCAE9DE6160C097400A33217 /* Frameworks */, 8127 8128 BCAE9DE7160C097400A33217 /* Resources */, 8129 E19C7DDA194A4C9500F1866F /* Add CFBundle Localization Info.plist Key */, 8128 8130 ); 8129 8131 buildRules = ( … … 8624 8626 shellPath = /bin/sh; 8625 8627 shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\n\nexport WebKit2=\"${SRCROOT}\"\n\nif [ ! $CC ]; then\n export CC=\"`xcrun -find clang`\"\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make --no-builtin-rules -f \"${WebKit2}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.activecpu` SDKROOT=${SDKROOT}\nfi\n"; 8628 }; 8629 E19C7DDA194A4C9500F1866F /* Add CFBundle Localization Info.plist Key */ = { 8630 isa = PBXShellScriptBuildPhase; 8631 buildActionMask = 2147483647; 8632 files = ( 8633 ); 8634 inputPaths = ( 8635 ); 8636 name = "Add CFBundle Localization Info.plist Key"; 8637 outputPaths = ( 8638 ); 8639 runOnlyForDeploymentPostprocessing = 0; 8640 shellPath = /bin/sh; 8641 shellScript = "/usr/libexec/PlistBuddy -c \"Print :$BUNDLE_LOCALIZATION_KEY\" $TARGET_BUILD_DIR/$INFOPLIST_PATH >/dev/null 2>/dev/null\nif [[ $? != 0 ]]; then\n echo \"Updating the Info.plist key\"\n /usr/libexec/PlistBuddy -c \"Delete :CFBundleAllowMixedLocalizations\" $TARGET_BUILD_DIR/$INFOPLIST_PATH 2>/dev/null\n /usr/libexec/PlistBuddy -c \"Delete :CFBundleFollowParentLocalization\" $TARGET_BUILD_DIR/$INFOPLIST_PATH 2>/dev/null\n /usr/libexec/PlistBuddy -c \"Add :$BUNDLE_LOCALIZATION_KEY bool true\" $TARGET_BUILD_DIR/$INFOPLIST_PATH\n echo \"Done\"\nfi\n"; 8642 showEnvVarsInLog = 0; 8643 }; 8644 E19C7DDB194A5E9100F1866F /* Add CFBundle Localization Info.plist Key */ = { 8645 isa = PBXShellScriptBuildPhase; 8646 buildActionMask = 2147483647; 8647 files = ( 8648 ); 8649 inputPaths = ( 8650 ); 8651 name = "Add CFBundle Localization Info.plist Key"; 8652 outputPaths = ( 8653 ); 8654 runOnlyForDeploymentPostprocessing = 0; 8655 shellPath = /bin/sh; 8656 shellScript = "/usr/libexec/PlistBuddy -c \"Print :$BUNDLE_LOCALIZATION_KEY\" $TARGET_BUILD_DIR/$INFOPLIST_PATH >/dev/null 2>/dev/null\nif [[ $? != 0 ]]; then\n echo \"Updating the Info.plist key\"\n /usr/libexec/PlistBuddy -c \"Delete :CFBundleAllowMixedLocalizations\" $TARGET_BUILD_DIR/$INFOPLIST_PATH 2>/dev/null\n /usr/libexec/PlistBuddy -c \"Delete :CFBundleFollowParentLocalization\" $TARGET_BUILD_DIR/$INFOPLIST_PATH 2>/dev/null\n /usr/libexec/PlistBuddy -c \"Add :$BUNDLE_LOCALIZATION_KEY bool true\" $TARGET_BUILD_DIR/$INFOPLIST_PATH\n echo \"Done\"\nfi\n"; 8657 showEnvVarsInLog = 0; 8626 8658 }; 8627 8659 /* End PBXShellScriptBuildPhase section */ -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist
r163425 r170653 23 23 <key>CFBundleVersion</key> 24 24 <string>${BUNDLE_VERSION}</string> 25 <key>CFBundleAllowMixedLocalizations</key>26 <true/>27 25 <key>LSFileQuarantineEnabled</key> 28 26 <true/> … … 37 35 <key>NSSupportsAppNap</key> 38 36 <true/> 37 <key>NSMainNibFile</key> 38 <string>WebContentProcess</string> 39 39 <key>XPCService</key> 40 40 <dict> … … 48 48 <true/> 49 49 </dict> 50 <key>NSMainNibFile</key>51 <string>WebContentProcess</string>52 50 </dict> 53 51 </plist> -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist
r170075 r170653 23 23 <key>CFBundleVersion</key> 24 24 <string>${BUNDLE_VERSION}</string> 25 <key>CFBundleAllowMixedLocalizations</key>26 <true/>27 25 <key>LSFileQuarantineEnabled</key> 28 26 <true/> -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist
r168541 r170653 29 29 <key>WebKitEntryPoint</key> 30 30 <string>WebContentServiceInitializer</string> 31 <key>CFBundleAllowMixedLocalizations</key>32 <true/>33 31 <key>LSUIElement</key> 34 32 <true/> -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist
r170075 r170653 36 36 <true/> 37 37 </dict> 38 <key>CFBundleAllowMixedLocalizations</key>39 <true/>40 38 <key>UIBackgroundModes</key> 41 39 <array>
Note: See TracChangeset
for help on using the changeset viewer.