Reviewed by Hyatt.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jun 2005 09:22:25 +0000 (09:22 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jun 2005 09:22:25 +0000 (09:22 +0000)
- link against libWebKitSystemInterface and use the first function in it.

        * Misc.subproj/WebNSUserDefaultsExtras.m:
        (-[NSString _webkit_HTTPStyleLanguageCode]): use WKCopyCFLocalizationPreferredName
        * Plugins.subproj/WebBasePluginPackage.m:
        (+[WebBasePluginPackage preferredLocalizationName]): ditto
        * WebKit.pbproj/project.pbxproj: link in libWebKitSystemInterface.a and find headers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9275 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Misc.subproj/WebNSUserDefaultsExtras.m
WebKit/Plugins.subproj/WebBasePluginPackage.m
WebKit/WebKit.pbproj/project.pbxproj

index b58ab97b38bc7af76d05ba58315128c2a799b10f..e5afcb3c1651a03dae08ad490d67529d74cdad8e 100644 (file)
@@ -1,3 +1,15 @@
+2005-06-05  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Hyatt.
+
+       - link against libWebKitSystemInterface and use the first function in it.
+
+        * Misc.subproj/WebNSUserDefaultsExtras.m:
+        (-[NSString _webkit_HTTPStyleLanguageCode]): use WKCopyCFLocalizationPreferredName
+        * Plugins.subproj/WebBasePluginPackage.m:
+        (+[WebBasePluginPackage preferredLocalizationName]): ditto
+        * WebKit.pbproj/project.pbxproj: link in libWebKitSystemInterface.a and find headers.
+
 2005-06-04  Darin Adler  <darin@apple.com>
 
         Reviewed by Don.
index ee50a08196efda8a659e0e084eb7715e7f0603cf..3f20928321b7a9120590d056cbd7617d64301c63 100644 (file)
@@ -6,8 +6,8 @@
 
 #import <WebKit/WebNSUserDefaultsExtras.h>
 
-#import <CoreFoundation/CFBundlePriv.h>
 #import <WebKit/WebAssertions.h>
+#import <WebKitSystemInterface.h>
 
 @implementation NSString (WebNSUserDefaultsPrivate)
 
 {
     // Look up the language code using CFBundle.
     NSString *languageCode = self;
-    SInt32 languageCodeNumber, regionCodeNumber;
-    if (CFBundleGetLocalizationInfoForLocalization((CFStringRef)self, &languageCodeNumber, &regionCodeNumber, NULL, NULL)) {
-        CFStringRef shortName = CFMakeCollectable(CFBundleCopyLocalizationForLocalizationInfo(languageCodeNumber, regionCodeNumber, -1, 0xFFFF));
-        if (shortName) {
-            languageCode = [(id)shortName autorelease];
-        }
-    }
+    NSString *preferredLanguageCode = [(id)WKCopyCFLocalizationPreferredName((CFStringRef)self) autorelease];
+
+    if (preferredLanguageCode)
+        languageCode = preferredLanguageCode;
     
     // Make the string lowercase.
     NSString *lowercaseLanguageCode = [languageCode lowercaseString];
index c9712af129630706a269254ffdce78141cc0ee62..5f8c558f6b376b1872a38d1d6a7e89166298baac 100644 (file)
@@ -13,7 +13,7 @@
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebPluginPackage.h>
 
-#import <CoreFoundation/CFBundlePriv.h>
+#import <WebKitSystemInterface.h>
 
 #define JavaCocoaPluginIdentifier      @"com.apple.JavaPluginCocoa"
 #define JavaCarbonPluginIdentifier     @"com.apple.JavaAppletPlugin"
 
 + (NSString *)preferredLocalizationName
 {
-    SInt32 languageCode;
-    SInt32 regionCode;
-    SInt32 scriptCode;
-    CFStringEncoding stringEncoding;
-    
-    CFBundleGetLocalizationInfoForLocalization(NULL, &languageCode, &regionCode, &scriptCode, &stringEncoding);
-    return WebCFAutorelease(CFBundleCopyLocalizationForLocalizationInfo(languageCode, regionCode, scriptCode, stringEncoding));
+    return WebCFAutorelease(WKCopyCFLocalizationPreferredName(NULL));
 }
 
 - (NSString *)pathByResolvingSymlinksAndAliasesInPath:(NSString *)thePath
index 17987300152a4ed630e58cd3bcf0885ac79bf91d..0b6274e22fe69e6158694ad75a595a7e14dba986 100644 (file)
                                830E81E005853AC000AD0891,
                                93D623DD051E791F002F47DD,
                                F738C9E903FAD3DF0321FBE0,
+                               65A0006808527D1A005620FA,
                                F738C9EA03FAD3DF0321FBE0,
                        );
                        isa = PBXGroup;
                        refType = 4;
                        sourceTree = "<group>";
                };
+               65A0006808527D1A005620FA = {
+                       isa = PBXFileReference;
+                       lastKnownFileType = archive.ar;
+                       path = libWebKitSystemInterface.a;
+                       refType = 3;
+                       sourceTree = BUILT_PRODUCTS_DIR;
+               };
+               65A0006908527D1A005620FA = {
+                       fileRef = 65A0006808527D1A005620FA;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
                65A7D44A0568AB2600E70EF6 = {
                        fileEncoding = 30;
                        isa = PBXFileReference;
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                               HEADER_SEARCH_PATHS = icu;
+                               HEADER_SEARCH_PATHS = "$(SYMROOT)/usr/local/include icu";
                                INFOPLIST_FILE = Info.plist;
                                INSTALL_PATH = /System/Library/Frameworks;
                                JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = "$(UMBRELLA_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders";
                                9398112C0824BF01008DF038,
                                9398112E0824BF01008DF038,
                                9398112F0824BF01008DF038,
+                               65A0006908527D1A005620FA,
                        );
                        isa = PBXFrameworksBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;