Diff
Modified: trunk/Source/WebCore/ChangeLog (172974 => 172975)
--- trunk/Source/WebCore/ChangeLog 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/ChangeLog 2014-08-26 21:06:07 UTC (rev 172975)
@@ -1,3 +1,28 @@
+2014-08-25 Maciej Stachowiak <[email protected]>
+
+ Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
+ https://bugs.webkit.org/show_bug.cgi?id=136082
+
+ Reviewed by Alexey Proskuryakov.
+
+ * platform/mac/Language.mm:
+ (WebCore::httpStyleLanguageCode): Replace use of WKCopyCFLocalizationPreferredName
+ with new WebCoreNSStringExtras helper.
+ * platform/mac/WebCoreNSStringExtras.mm: Replacements for the aspects of
+ WKCopyCFLocalizationPreferredName.
+ (preferredBundleLocalizationName): New helper - most preferred localization available
+ in the main bundle, canonicalized the way we like it.
+ (canonicalLocalizationName): Convert a lcalization name to a string with language and
+ country code, using default if necessary (e.g. "en" maps to "en_US").
+ * WebCore.order: Remove mention of WKCopyCFLocalizationPreferredName.
+ * WebCore.exp.in: ditto; also export preferredBundleLocalizationName for WebKit(2).
+ * platform/ios/WebCoreSystemInterfaceIOS.mm: ditto
+ * platform/mac/WebCoreSystemInterface.h: ditto
+ * platform/mac/WebCoreSystemInterface.mm: ditto
+ * platform/spi/cf: Added.
+ * platform/spi/cf/CFLocaleSPI.h: Added. Declare
+ CFLocaleGetLanguageRegionEncodingForLocaleIdentifier.
+
2014-08-26 Zoltan Horvath <[email protected]>
[CSS Shapes] Positioned polygon reftests failing
Modified: trunk/Source/WebCore/WebCore.exp.in (172974 => 172975)
--- trunk/Source/WebCore/WebCore.exp.in 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/WebCore.exp.in 2014-08-26 21:06:07 UTC (rev 172975)
@@ -2077,6 +2077,7 @@
_hasCaseInsensitivePrefix
_hasCaseInsensitiveSubstring
_hasCaseInsensitiveSuffix
+_preferredBundleLocalizationName
_stringIsCaseInsensitiveEqualToString
_suggestedFilenameWithMIMEType
_wkCALayerEnumerateRectsBeingDrawnWithBlock
@@ -2087,7 +2088,6 @@
_wkCGPathAddRoundedRect
_wkCGPatternCreateWithImageAndTransform
_wkCTRunGetInitialAdvance
-_wkCopyCFLocalizationPreferredName
_wkCopyCFURLResponseSuggestedFilename
_wkCopyCONNECTProxyResponse
_wkCopyHTTPCookieStorage
Modified: trunk/Source/WebCore/WebCore.order (172974 => 172975)
--- trunk/Source/WebCore/WebCore.order 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/WebCore.order 2014-08-26 21:06:07 UTC (rev 172975)
@@ -30590,7 +30590,6 @@
_wkCGContextResetClip
_wkCGContextDrawsWithCorrectShadowOffsets
_wkCGPatternCreateWithImageAndTransform
-_wkCopyCFLocalizationPreferredName
_wkCopyNSURLResponseStatusLine
_wkCopyNSURLResponseCertificateChain
_wkDrawBezeledTextFieldCell
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (172974 => 172975)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-08-26 21:06:07 UTC (rev 172975)
@@ -9231,6 +9231,7 @@
63189AE20E83A33300012E41 /* NodeRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeRareData.h; sourceTree = "<group>"; };
637B7ADE0E8767B800E32194 /* ElementRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementRareData.h; sourceTree = "<group>"; };
63D7B32C0E78CD3F00F7617C /* NodeRenderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeRenderStyle.h; sourceTree = "<group>"; };
+ 65086DA719AC1719009AF46B /* CFLocaleSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFLocaleSPI.h; sourceTree = "<group>"; };
650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSGrammar.h; sourceTree = "<group>"; };
650FBF270D9AF046008FC292 /* SVGHKernElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGHKernElement.cpp; sourceTree = "<group>"; };
650FBF280D9AF047008FC292 /* SVGHKernElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGHKernElement.h; sourceTree = "<group>"; };
@@ -16157,9 +16158,18 @@
path = plugins;
sourceTree = "<group>";
};
+ 65086DA619AC1719009AF46B /* cf */ = {
+ isa = PBXGroup;
+ children = (
+ 65086DA719AC1719009AF46B /* CFLocaleSPI.h */,
+ );
+ path = cf;
+ sourceTree = "<group>";
+ };
653EF83619A043AE0052202C /* spi */ = {
isa = PBXGroup;
children = (
+ 65086DA619AC1719009AF46B /* cf */,
653EF83719A043AE0052202C /* cocoa */,
);
path = spi;
Modified: trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm (172974 => 172975)
--- trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -30,7 +30,6 @@
WEBCORE_EXPORT BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);
WEBCORE_EXPORT CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int);
WEBCORE_EXPORT void (*wkCGContextResetClip)(CGContextRef);
-WEBCORE_EXPORT CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
WEBCORE_EXPORT void (*wkClearGlyphVector)(void* glyphs);
WEBCORE_EXPORT OSStatus (*wkConvertCharToGlyphs)(void* styleGroup, const UniChar*, unsigned numCharacters, void* glyphs);
WEBCORE_EXPORT NSString* (*wkGetMIMETypeForExtension)(NSString*);
Modified: trunk/Source/WebCore/platform/mac/Language.mm (172974 => 172975)
--- trunk/Source/WebCore/platform/mac/Language.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/mac/Language.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -27,7 +27,7 @@
#import "Language.h"
#import "BlockExceptions.h"
-#import "WebCoreSystemInterface.h"
+#import "WebCoreNSStringExtras.h"
#import <mutex>
#import <wtf/Assertions.h>
#import <wtf/NeverDestroyed.h>
@@ -77,25 +77,9 @@
namespace WebCore {
-static String httpStyleLanguageCode(NSString *languageCode)
+static String httpStyleLanguageCode(NSString *language)
{
- // Look up the language code using CFBundle.
- RetainPtr<CFStringRef> preferredLanguageCode = adoptCF(wkCopyCFLocalizationPreferredName((CFStringRef)languageCode));
-
- if (preferredLanguageCode)
- languageCode = (NSString *)preferredLanguageCode.get();
-
- // Make the string lowercase.
- NSString *lowercaseLanguageCode = [languageCode lowercaseString];
-
- // Turn a '_' into a '-' if it appears after a 2-letter language code.
- if ([lowercaseLanguageCode length] >= 3 && [lowercaseLanguageCode characterAtIndex:2] == '_') {
- RetainPtr<NSMutableString> mutableLanguageCode = adoptNS([lowercaseLanguageCode mutableCopy]);
- [mutableLanguageCode.get() replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
- return mutableLanguageCode.get();
- }
-
- return lowercaseLanguageCode;
+ return [[NSLocale canonicalLanguageIdentifierFromString:canonicalLocaleName(language)] lowercaseString];
}
Vector<String> platformUserPreferredLanguages()
Modified: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h (172974 => 172975)
--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h 2014-08-26 21:06:07 UTC (rev 172975)
@@ -48,6 +48,9 @@
CFStringEncoding stringEncodingForResource(Handle resource);
#endif
+NSString *preferredBundleLocalizationName();
+NSString *canonicalLocaleName(NSString *);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm (172974 => 172975)
--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -28,6 +28,7 @@
#import "config.h"
#import "WebCoreNSStringExtras.h"
+#import "CFLocaleSPI.h"
#import <wtf/RetainPtr.h>
@@ -127,3 +128,32 @@
#endif
#endif // !PLATFORM(IOS)
+
+
+
+NSString *preferredBundleLocalizationName()
+{
+ // FIXME: Any use of this function to pass localizations to another
+ // process is likely not completely right, since it only considers
+ // one localization.
+ NSArray *preferredLocalizations = [[NSBundle mainBundle] preferredLocalizations];
+ if (!preferredLocalizations || ![preferredLocalizations count])
+ return @"en_US";
+
+ return canonicalLocaleName([preferredLocalizations objectAtIndex:0]);
+}
+
+NSString *canonicalLocaleName(NSString *language)
+{
+ // FIXME: <rdar://problem/18083880> Replace use of Script Manager
+ // to canonicalize locales with a custom Web-specific table
+ LangCode languageCode;
+ RegionCode regionCode;
+
+ Boolean success = CFLocaleGetLanguageRegionEncodingForLocaleIdentifier((CFStringRef)language, &languageCode, ®ionCode, nullptr, nullptr);
+ if (!success)
+ return @"en_US";
+
+ RetainPtr<CFStringRef> code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode));
+ return (NSString *)code.autorelease();
+}
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (172974 => 172975)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h 2014-08-26 21:06:07 UTC (rev 172975)
@@ -149,7 +149,6 @@
void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
void *context);
-extern CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
extern NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
extern CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);
extern CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void);
Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (172974 => 172975)
--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -35,7 +35,6 @@
bool (*wkCGContextDrawsWithCorrectShadowOffsets)(CGContextRef);
#endif
CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int);
-CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);
CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void);
Added: trunk/Source/WebCore/platform/spi/cf/CFLocaleSPI.h (0 => 172975)
--- trunk/Source/WebCore/platform/spi/cf/CFLocaleSPI.h (rev 0)
+++ trunk/Source/WebCore/platform/spi/cf/CFLocaleSPI.h 2014-08-26 21:06:07 UTC (rev 172975)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2014 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. ``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
+ * 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.
+ */
+
+#ifndef CFLocaleSPI_h
+#define CFLocaleSPI_h
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#if USE(APPLE_INTERNAL_SDK)
+#import <CoreFoundation/CFPriv.h>
+#endif
+
+extern "C" {
+// FIXME: <rdar://problem/18128192> Make CFLocaleGetLanguageRegionEncodingForLocaleIdentifier public API
+// FIXME: <rdar://problem/18083880> Replace use of Script Manager to canonicalize locales with a custom Web-specific table
+Boolean CFLocaleGetLanguageRegionEncodingForLocaleIdentifier(CFStringRef locale, LangCode*, RegionCode*, ScriptCode*, CFStringEncoding*);
+}
+
+#endif
Modified: trunk/Source/WebKit/mac/ChangeLog (172974 => 172975)
--- trunk/Source/WebKit/mac/ChangeLog 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-08-26 21:06:07 UTC (rev 172975)
@@ -1,3 +1,24 @@
+2014-08-25 Maciej Stachowiak <[email protected]>
+
+ Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
+ https://bugs.webkit.org/show_bug.cgi?id=136082
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost): Get current
+ localization name using WebCore helper instead of SPI.
+ * Plugins/WebBasePluginPackage.mm: Fixed the include style for this
+ file.
+ (-[WebBasePluginPackage getPluginInfoFromPLists]): Get current
+ localization name using WebCore helper instead of SPI.
+ (+[WebBasePluginPackage preferredLocalizationName]): Deleted. This
+ helper no longer pulls its weight.
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Remove mention of
+ WKCopyCFLocalizationPreferredName.
+ * WebKit.order: ditto
+
2014-08-25 Daniel Bates <[email protected]>
Attempt to fix the iOS build after <http://trac.webkit.org/changeset/172889>
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm (172974 => 172975)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -32,6 +32,7 @@
#import "WebLocalizableStringsInternal.h"
#import "WebKitSystemInterface.h"
#import "WebNetscapePluginPackage.h"
+#import <WebCore/WebCoreNSStringExtras.h>
#import <mach/mach_port.h>
#import <servers/bootstrap.h>
#import <spawn.h>
@@ -113,12 +114,10 @@
NSString *pluginHostAppPath = [[NSBundle bundleForClass:[WebNetscapePluginPackage class]] pathForAuxiliaryExecutable:pluginHostAppName];
NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
- RetainPtr<CFStringRef> localization = adoptCF(WKCopyCFLocalizationPreferredName(NULL));
-
NSDictionary *launchProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
pluginHostAppExecutablePath, @"pluginHostPath",
[NSNumber numberWithInt:pluginArchitecture], @"cpuType",
- (NSString *)localization.get(), @"localization",
+ preferredBundleLocalizationName(), @"localization",
nil];
NSData *data = "" dataWithPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 options:0 error:nullptr];
Modified: trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm (172974 => 172975)
--- trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -26,13 +26,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <WebKitLegacy/WebBasePluginPackage.h>
+#import "WebBasePluginPackage.h"
-#import <algorithm>
+#import "WebKitLogging.h"
+#import "WebKitNSStringExtras.h"
+#import "WebNetscapePluginPackage.h"
+#import "WebPluginPackage.h"
+#import "WebTypesInternal.h"
+#import <WebCore/WebCoreNSStringExtras.h>
#import <WebCore/WebCoreObjCExtras.h>
-#import <WebKitLegacy/WebKitNSStringExtras.h>
-#import <WebKitLegacy/WebNetscapePluginPackage.h>
-#import <WebKitLegacy/WebPluginPackage.h>
+#import <algorithm>
+#import <mach-o/arch.h>
+#import <mach-o/fat.h>
+#import <mach-o/loader.h>
#import <runtime/InitializeThreading.h>
#import <wtf/Assertions.h>
#import <wtf/MainThread.h>
@@ -41,15 +47,7 @@
#import <wtf/Vector.h>
#import <wtf/text/CString.h>
-#import <WebKitSystemInterface.h>
-#import "WebKitLogging.h"
-#import "WebTypesInternal.h"
-
-#import <mach-o/arch.h>
-#import <mach-o/fat.h>
-#import <mach-o/loader.h>
-
#define JavaCocoaPluginIdentifier "com.apple.JavaPluginCocoa"
#define JavaCarbonPluginIdentifier "com.apple.JavaAppletPlugin"
@@ -90,11 +88,6 @@
return [pluginPackage autorelease];
}
-+ (NSString *)preferredLocalizationName
-{
- return CFBridgingRelease(WKCopyCFLocalizationPreferredName(NULL));
-}
-
#if COMPILER(CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -196,7 +189,7 @@
if (pList) {
// If the plist isn't localized, have the plug-in recreate it in the preferred language.
NSString *localizationName = [pList objectForKey:WebPluginLocalizationNameKey];
- if (![localizationName isEqualToString:[[self class] preferredLocalizationName]])
+ if (![localizationName isEqualToString:preferredBundleLocalizationName()])
pList = [self pListForPath:pListPath createFile:YES];
MIMETypes = [pList objectForKey:WebPluginMIMETypesKey];
} else
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (172974 => 172975)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -57,7 +57,6 @@
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
INIT(CTFontTransformGlyphs);
#endif
- INIT(CopyCFLocalizationPreferredName);
INIT(CopyCONNECTProxyResponse);
INIT(CopyNSURLResponseStatusLine);
INIT(CopyNSURLResponseCertificateChain);
Modified: trunk/Source/WebKit/mac/WebKit.order (172974 => 172975)
--- trunk/Source/WebKit/mac/WebKit.order 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit/mac/WebKit.order 2014-08-26 21:06:07 UTC (rev 172975)
@@ -26,7 +26,6 @@
+[WebView _shouldAutomaticDashSubstitutionBeEnabled]
+[WebView _shouldAutomaticTextReplacementBeEnabled]
+[WebView _shouldAutomaticSpellingCorrectionBeEnabled]
-_WKCopyCFLocalizationPreferredName
+[WebView(WebPrivate) _setDomainRelaxationForbidden:forURLScheme:]
+[WebView(WebPrivate) _registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing:]
+[WebView(WebPrivate) _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]
@@ -849,7 +848,6 @@
__ZN7WebCore13MimeClassInfoD2Ev
-[WebBasePluginPackage isNativeLibraryData:]
-[WebBasePluginPackage pListForPath:createFile:]
-+[WebBasePluginPackage preferredLocalizationName]
-[WebPluginDatabase(Internal) _addPlugin:]
-[WebBasePluginPackage path]
-[WebBasePluginPackage wasAddedToPluginDatabase:]
Modified: trunk/Source/WebKit2/ChangeLog (172974 => 172975)
--- trunk/Source/WebKit2/ChangeLog 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit2/ChangeLog 2014-08-26 21:06:07 UTC (rev 172975)
@@ -1,3 +1,19 @@
+2014-08-25 Maciej Stachowiak <[email protected]>
+
+ Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
+ https://bugs.webkit.org/show_bug.cgi?id=136082
+
+ Reviewed by Alexey Proskuryakov.
+
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+ (WebKit::connectToService): Remove accidental leftover retrieval
+ of the localization.
+ (WebKit::createProcess): Get current localization name from
+ CFBundle API instead of using SPI.
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
+ * mac/WebKit2.order: ditto
+
2014-08-26 Dana Burkart <[email protected]>
The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures.
Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (172974 => 172975)
--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -28,8 +28,8 @@
#import "DynamicLinkerEnvironmentExtractor.h"
#import "EnvironmentVariables.h"
-#import "WebKitSystemInterface.h"
#import <WebCore/SoftLinking.h>
+#import <WebCore/WebCoreNSStringExtras.h>
#import <crt_externs.h>
#import <mach-o/dyld.h>
#import <mach/machine.h>
@@ -210,8 +210,7 @@
// 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.
- RetainPtr<CFStringRef> localization = adoptCF(WKCopyCFLocalizationPreferredName(0));
- if (localization && _CFBundleSetupXPCBootstrapPtr()) {
+ if (_CFBundleSetupXPCBootstrapPtr()) {
auto initializationMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0));
_CFBundleSetupXPCBootstrapPtr()(initializationMessage.get());
xpc_connection_set_bootstrap(connection.get(), initializationMessage.get());
@@ -457,7 +456,7 @@
// 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.
- CString appleLanguagesArgument = String("('" + String(adoptCF(WKCopyCFLocalizationPreferredName(0)).get()) + "')").utf8();
+ CString appleLanguagesArgument = String("('" + String(preferredBundleLocalizationName()) + "')").utf8();
Vector<const char*> args;
args.append([processAppExecutablePath fileSystemRepresentation]);
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (172974 => 172975)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm 2014-08-26 21:06:07 UTC (rev 172975)
@@ -40,7 +40,6 @@
INIT(AdvanceDefaultButtonPulseAnimation);
#endif
INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
- INIT(CopyCFLocalizationPreferredName);
INIT(CGContextGetShouldSmoothFonts);
INIT(CGPatternCreateWithImageAndTransform);
INIT(CGContextResetClip);
Modified: trunk/Source/WebKit2/mac/WebKit2.order (172974 => 172975)
--- trunk/Source/WebKit2/mac/WebKit2.order 2014-08-26 20:37:04 UTC (rev 172974)
+++ trunk/Source/WebKit2/mac/WebKit2.order 2014-08-26 21:06:07 UTC (rev 172975)
@@ -3423,7 +3423,6 @@
__ZN6WebKit20EnvironmentVariables11appendValueEPKcS2_c
__ZN3WTF6VectorINSt3__14pairINS_7CStringES3_EELm0ENS_15CrashOnOverflowEED2Ev
__ZN3WTF6VectorINSt3__14pairINS_7CStringES3_EELm0ENS_15CrashOnOverflowEE6shrinkEm
-_WKCopyCFLocalizationPreferredName
__ZN6WebKit15ProcessLauncher19processTypeAsStringENS0_11ProcessTypeE
__ZNK3WTF12StringAppendIPKcNS_6StringEEcvS3_Ev
__ZN3WTF6VectorINS_7CStringELm0ENS_15CrashOnOverflowEE14appendSlowCaseIS1_EEvRKT_