<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[172875] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/172875">172875</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-08-22 16:04:04 -0700 (Fri, 22 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/172866">r172866</a>.
https://bugs.webkit.org/show_bug.cgi?id=136177

Broke iOS build (Requested by othermaciej on #webkit).

Reverted changeset:

&quot;Replace use of WKCopyCFLocalizationPreferredName with
NSLocale public API&quot;
https://bugs.webkit.org/show_bug.cgi?id=136082
http://trac.webkit.org/changeset/172866</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCoreorder">trunk/Source/WebCore/WebCore.order</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebCoreSystemInterfaceIOSmm">trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacLanguagemm">trunk/Source/WebCore/platform/mac/Language.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreNSStringExtrash">trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreNSStringExtrasmm">trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsHostedNetscapePluginHostManagermm">trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebBasePluginPackagemm">trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm">trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebKitorder">trunk/Source/WebKit/mac/WebKit.order</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm">trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKit2macWebKit2order">trunk/Source/WebKit2/mac/WebKit2.order</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/ChangeLog        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-08-22  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r172866.
+        https://bugs.webkit.org/show_bug.cgi?id=136177
+
+        Broke iOS build (Requested by othermaciej on #webkit).
+
+        Reverted changeset:
+
+        &quot;Replace use of WKCopyCFLocalizationPreferredName with
+        NSLocale public API&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=136082
+        http://trac.webkit.org/changeset/172866
+
</ins><span class="cx"> 2014-08-22  David Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add proper support for letter-spacing to bopomofo Ruby
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -2077,7 +2077,6 @@
</span><span class="cx"> _hasCaseInsensitivePrefix
</span><span class="cx"> _hasCaseInsensitiveSubstring
</span><span class="cx"> _hasCaseInsensitiveSuffix
</span><del>-_preferredBundleLocalizationName
</del><span class="cx"> _stringIsCaseInsensitiveEqualToString
</span><span class="cx"> _suggestedFilenameWithMIMEType
</span><span class="cx"> _wkCALayerEnumerateRectsBeingDrawnWithBlock
</span><span class="lines">@@ -2088,6 +2087,7 @@
</span><span class="cx"> _wkCGPathAddRoundedRect
</span><span class="cx"> _wkCGPatternCreateWithImageAndTransform
</span><span class="cx"> _wkCTRunGetInitialAdvance
</span><ins>+_wkCopyCFLocalizationPreferredName
</ins><span class="cx"> _wkCopyCFURLResponseSuggestedFilename
</span><span class="cx"> _wkCopyCONNECTProxyResponse
</span><span class="cx"> _wkCopyHTTPCookieStorage
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreorder"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.order (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.order        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/WebCore.order        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -30590,6 +30590,7 @@
</span><span class="cx"> _wkCGContextResetClip
</span><span class="cx"> _wkCGContextDrawsWithCorrectShadowOffsets
</span><span class="cx"> _wkCGPatternCreateWithImageAndTransform
</span><ins>+_wkCopyCFLocalizationPreferredName
</ins><span class="cx"> _wkCopyNSURLResponseStatusLine
</span><span class="cx"> _wkCopyNSURLResponseCertificateChain
</span><span class="cx"> _wkDrawBezeledTextFieldCell
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebCoreSystemInterfaceIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> WEBCORE_EXPORT BOOL (*wkCGContextGetShouldSmoothFonts)(CGContextRef);
</span><span class="cx"> WEBCORE_EXPORT CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int);
</span><span class="cx"> WEBCORE_EXPORT void (*wkCGContextResetClip)(CGContextRef);
</span><ins>+WEBCORE_EXPORT CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
</ins><span class="cx"> WEBCORE_EXPORT void (*wkClearGlyphVector)(void* glyphs);
</span><span class="cx"> WEBCORE_EXPORT OSStatus (*wkConvertCharToGlyphs)(void* styleGroup, const UniChar*, unsigned numCharacters, void* glyphs);
</span><span class="cx"> WEBCORE_EXPORT NSString* (*wkGetMIMETypeForExtension)(NSString*);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacLanguagemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/Language.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/Language.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/mac/Language.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #import &quot;Language.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &quot;BlockExceptions.h&quot;
</span><del>-#import &quot;WebCoreNSStringExtras.h&quot;
</del><ins>+#import &quot;WebCoreSystemInterface.h&quot;
</ins><span class="cx"> #import &lt;mutex&gt;
</span><span class="cx"> #import &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><span class="lines">@@ -77,9 +77,25 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static String httpStyleLanguageCode(NSString *language)
</del><ins>+static String httpStyleLanguageCode(NSString *languageCode)
</ins><span class="cx"> {
</span><del>-    return [[NSLocale canonicalLanguageIdentifierFromString:canonicalLocaleName(language)] lowercaseString];
</del><ins>+    // Look up the language code using CFBundle.
+    RetainPtr&lt;CFStringRef&gt; 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] &gt;= 3 &amp;&amp; [lowercaseLanguageCode characterAtIndex:2] == '_') {
+        RetainPtr&lt;NSMutableString&gt; mutableLanguageCode = adoptNS([lowercaseLanguageCode mutableCopy]);
+        [mutableLanguageCode.get() replaceCharactersInRange:NSMakeRange(2, 1) withString:@&quot;-&quot;];
+        return mutableLanguageCode.get();
+    }
+
+    return lowercaseLanguageCode;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Vector&lt;String&gt; platformUserPreferredLanguages()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreNSStringExtrash"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -48,9 +48,6 @@
</span><span class="cx"> CFStringEncoding stringEncodingForResource(Handle resource);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-NSString *preferredBundleLocalizationName();
-NSString *canonicalLocaleName(NSString *);
-
</del><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreNSStringExtrasmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -122,34 +122,6 @@
</span><span class="cx">     return encoding;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
-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 @&quot;en_US&quot;;
-
-    return canonicalLocaleName([preferredLocalizations objectAtIndex:0]);
-}
-
-NSString *canonicalLocaleName(NSString *language)
-{
-    // FIXME: &lt;rdar://problem/18083880&gt; Replace use of Script Manager
-    // to canonicalize locales with a custom Web-specific table
-    LangCode languageCode;
-    RegionCode regionCode;
-
-    OSStatus status = LocaleStringToLangAndRegionCodes([language UTF8String], &amp;languageCode, &amp;regionCode);
-    if (status != noErr)
-        return @&quot;en_US&quot;;
-
-    RetainPtr&lt;CFStringRef&gt; code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode));
-    return [(NSString*)code.get() autorelease];
-}
-
</del><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -149,6 +149,7 @@
</span><span class="cx">     void (*formSchedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *), 
</span><span class="cx">     void (*formUnschedule)(CFReadStreamRef, CFRunLoopRef, CFStringRef, void *),
</span><span class="cx">     void *context);
</span><ins>+extern CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
</ins><span class="cx"> extern NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
</span><span class="cx"> extern CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);
</span><span class="cx"> extern CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> bool (*wkCGContextDrawsWithCorrectShadowOffsets)(CGContextRef);
</span><span class="cx"> #endif
</span><span class="cx"> CGPatternRef (*wkCGPatternCreateWithImageAndTransform)(CGImageRef, CGAffineTransform, int);
</span><ins>+CFStringRef (*wkCopyCFLocalizationPreferredName)(CFStringRef);
</ins><span class="cx"> NSString* (*wkCopyNSURLResponseStatusLine)(NSURLResponse*);
</span><span class="cx"> CFArrayRef (*wkCopyNSURLResponseCertificateChain)(NSURLResponse*);
</span><span class="cx"> CFStringEncoding (*wkGetWebDefaultCFStringEncoding)(void);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-08-22  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r172866.
+        https://bugs.webkit.org/show_bug.cgi?id=136177
+
+        Broke iOS build (Requested by othermaciej on #webkit).
+
+        Reverted changeset:
+
+        &quot;Replace use of WKCopyCFLocalizationPreferredName with
+        NSLocale public API&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=136082
+        http://trac.webkit.org/changeset/172866
+
</ins><span class="cx"> 2014-08-22  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement paint flashing in the WK1 InspectorOverlay page
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsHostedNetscapePluginHostManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import &quot;WebLocalizableStringsInternal.h&quot;
</span><span class="cx"> #import &quot;WebKitSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebNetscapePluginPackage.h&quot;
</span><del>-#import &lt;WebCore/WebCoreNSStringExtras.h&gt;
</del><span class="cx"> #import &lt;mach/mach_port.h&gt;
</span><span class="cx"> #import &lt;servers/bootstrap.h&gt;
</span><span class="cx"> #import &lt;spawn.h&gt;
</span><span class="lines">@@ -114,10 +113,12 @@
</span><span class="cx">     NSString *pluginHostAppPath = [[NSBundle bundleForClass:[WebNetscapePluginPackage class]] pathForAuxiliaryExecutable:pluginHostAppName];
</span><span class="cx">     NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
</span><span class="cx"> 
</span><ins>+    RetainPtr&lt;CFStringRef&gt; localization = adoptCF(WKCopyCFLocalizationPreferredName(NULL));
+    
</ins><span class="cx">     NSDictionary *launchProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
</span><span class="cx">                                       pluginHostAppExecutablePath, @&quot;pluginHostPath&quot;,
</span><span class="cx">                                       [NSNumber numberWithInt:pluginArchitecture], @&quot;cpuType&quot;,
</span><del>-                                      preferredBundleLocalizationName(), @&quot;localization&quot;,
</del><ins>+                                      (NSString *)localization.get(), @&quot;localization&quot;,
</ins><span class="cx">                                       nil];
</span><span class="cx"> 
</span><span class="cx">     NSData *data = [NSPropertyListSerialization dataWithPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 options:0 error:nullptr];
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebBasePluginPackagemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -26,19 +26,13 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#import &quot;WebBasePluginPackage.h&quot;
</del><ins>+#import &lt;WebKitLegacy/WebBasePluginPackage.h&gt;
</ins><span class="cx"> 
</span><del>-#import &quot;WebKitLogging.h&quot;
-#import &quot;WebKitNSStringExtras.h&quot;
-#import &quot;WebNetscapePluginPackage.h&quot;
-#import &quot;WebPluginPackage.h&quot;
-#import &quot;WebTypesInternal.h&quot;
-#import &lt;WebCore/WebCoreNSStringExtras.h&gt;
</del><ins>+#import &lt;algorithm&gt;
</ins><span class="cx"> #import &lt;WebCore/WebCoreObjCExtras.h&gt;
</span><del>-#import &lt;algorithm&gt;
-#import &lt;mach-o/arch.h&gt;
-#import &lt;mach-o/fat.h&gt;
-#import &lt;mach-o/loader.h&gt;
</del><ins>+#import &lt;WebKitLegacy/WebKitNSStringExtras.h&gt;
+#import &lt;WebKitLegacy/WebNetscapePluginPackage.h&gt;
+#import &lt;WebKitLegacy/WebPluginPackage.h&gt;
</ins><span class="cx"> #import &lt;runtime/InitializeThreading.h&gt;
</span><span class="cx"> #import &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #import &lt;wtf/MainThread.h&gt;
</span><span class="lines">@@ -47,7 +41,15 @@
</span><span class="cx"> #import &lt;wtf/Vector.h&gt;
</span><span class="cx"> #import &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><ins>+#import &lt;WebKitSystemInterface.h&gt;
</ins><span class="cx"> 
</span><ins>+#import &quot;WebKitLogging.h&quot;
+#import &quot;WebTypesInternal.h&quot;
+
+#import &lt;mach-o/arch.h&gt;
+#import &lt;mach-o/fat.h&gt;
+#import &lt;mach-o/loader.h&gt;
+
</ins><span class="cx"> #define JavaCocoaPluginIdentifier   &quot;com.apple.JavaPluginCocoa&quot;
</span><span class="cx"> #define JavaCarbonPluginIdentifier  &quot;com.apple.JavaAppletPlugin&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -88,6 +90,11 @@
</span><span class="cx">     return [pluginPackage autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>++ (NSString *)preferredLocalizationName
+{
+    return CFBridgingRelease(WKCopyCFLocalizationPreferredName(NULL));
+}
+
</ins><span class="cx"> #if COMPILER(CLANG)
</span><span class="cx"> #pragma clang diagnostic push
</span><span class="cx"> #pragma clang diagnostic ignored &quot;-Wdeprecated-declarations&quot;
</span><span class="lines">@@ -189,7 +196,7 @@
</span><span class="cx">         if (pList) {
</span><span class="cx">             // If the plist isn't localized, have the plug-in recreate it in the preferred language.
</span><span class="cx">             NSString *localizationName = [pList objectForKey:WebPluginLocalizationNameKey];
</span><del>-            if (![localizationName isEqualToString:preferredBundleLocalizationName()])
</del><ins>+            if (![localizationName isEqualToString:[[self class] preferredLocalizationName]])
</ins><span class="cx">                 pList = [self pListForPath:pListPath createFile:YES];
</span><span class="cx">             MIMETypes = [pList objectForKey:WebPluginMIMETypesKey];
</span><span class="cx">         } else
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</span><span class="cx">     INIT(CTFontTransformGlyphs);
</span><span class="cx"> #endif
</span><ins>+    INIT(CopyCFLocalizationPreferredName);
</ins><span class="cx">     INIT(CopyCONNECTProxyResponse);
</span><span class="cx">     INIT(CopyNSURLResponseStatusLine);
</span><span class="cx">     INIT(CopyNSURLResponseCertificateChain);
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebKitorder"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebKit.order (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebKit.order        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit/mac/WebKit.order        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> +[WebView _shouldAutomaticDashSubstitutionBeEnabled]
</span><span class="cx"> +[WebView _shouldAutomaticTextReplacementBeEnabled]
</span><span class="cx"> +[WebView _shouldAutomaticSpellingCorrectionBeEnabled]
</span><ins>+_WKCopyCFLocalizationPreferredName
</ins><span class="cx"> +[WebView(WebPrivate) _setDomainRelaxationForbidden:forURLScheme:]
</span><span class="cx"> +[WebView(WebPrivate) _registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing:]
</span><span class="cx"> +[WebView(WebPrivate) _registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:]
</span><span class="lines">@@ -848,6 +849,7 @@
</span><span class="cx"> __ZN7WebCore13MimeClassInfoD2Ev
</span><span class="cx"> -[WebBasePluginPackage isNativeLibraryData:]
</span><span class="cx"> -[WebBasePluginPackage pListForPath:createFile:]
</span><ins>++[WebBasePluginPackage preferredLocalizationName]
</ins><span class="cx"> -[WebPluginDatabase(Internal) _addPlugin:]
</span><span class="cx"> -[WebBasePluginPackage path]
</span><span class="cx"> -[WebBasePluginPackage wasAddedToPluginDatabase:]
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit2/ChangeLog        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-08-22  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r172866.
+        https://bugs.webkit.org/show_bug.cgi?id=136177
+
+        Broke iOS build (Requested by othermaciej on #webkit).
+
+        Reverted changeset:
+
+        &quot;Replace use of WKCopyCFLocalizationPreferredName with
+        NSLocale public API&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=136082
+        http://trac.webkit.org/changeset/172866
+
</ins><span class="cx"> 2014-08-19  Maciej Stachowiak  &lt;mjs@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchermacProcessLauncherMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;DynamicLinkerEnvironmentExtractor.h&quot;
</span><span class="cx"> #import &quot;EnvironmentVariables.h&quot;
</span><ins>+#import &quot;WebKitSystemInterface.h&quot;
</ins><span class="cx"> #import &lt;WebCore/SoftLinking.h&gt;
</span><del>-#import &lt;WebCore/WebCoreNSStringExtras.h&gt;
</del><span class="cx"> #import &lt;crt_externs.h&gt;
</span><span class="cx"> #import &lt;mach-o/dyld.h&gt;
</span><span class="cx"> #import &lt;mach/machine.h&gt;
</span><span class="lines">@@ -210,7 +210,8 @@
</span><span class="cx">     // 1. When the application and system frameworks simply have different localized resources available, we should match the application.
</span><span class="cx">     // 1.1. An important case is WebKitTestRunner, where we should use English localizations for all system frameworks.
</span><span class="cx">     // 2. When AppleLanguages is passed as command line argument for UI process, or set in its preferences, we should respect it in child processes.
</span><del>-    if (_CFBundleSetupXPCBootstrapPtr()) {
</del><ins>+    RetainPtr&lt;CFStringRef&gt; localization = adoptCF(WKCopyCFLocalizationPreferredName(0));
+    if (localization &amp;&amp; _CFBundleSetupXPCBootstrapPtr()) {
</ins><span class="cx">         auto initializationMessage = IPC::adoptXPC(xpc_dictionary_create(nullptr, nullptr, 0));
</span><span class="cx">         _CFBundleSetupXPCBootstrapPtr()(initializationMessage.get());
</span><span class="cx">         xpc_connection_set_bootstrap(connection.get(), initializationMessage.get());
</span><span class="lines">@@ -456,7 +457,7 @@
</span><span class="cx">     // 1. When the application and system frameworks simply have different localized resources available, we should match the application.
</span><span class="cx">     // 1.1. An important case is WebKitTestRunner, where we should use English localizations for all system frameworks.
</span><span class="cx">     // 2. When AppleLanguages is passed as command line argument for UI process, or set in its preferences, we should respect it in child processes.
</span><del>-    CString appleLanguagesArgument = String(&quot;('&quot; + String(preferredBundleLocalizationName()) + &quot;')&quot;).utf8();
</del><ins>+    CString appleLanguagesArgument = String(&quot;('&quot; + String(adoptCF(WKCopyCFLocalizationPreferredName(0)).get()) + &quot;')&quot;).utf8();
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;const char*&gt; args;
</span><span class="cx">     args.append([processAppExecutablePath fileSystemRepresentation]);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx">         INIT(AdvanceDefaultButtonPulseAnimation);
</span><span class="cx"> #endif
</span><span class="cx">         INIT(CALayerEnumerateRectsBeingDrawnWithBlock);
</span><ins>+        INIT(CopyCFLocalizationPreferredName);
</ins><span class="cx">         INIT(CGContextGetShouldSmoothFonts);
</span><span class="cx">         INIT(CGPatternCreateWithImageAndTransform);
</span><span class="cx">         INIT(CGContextResetClip);
</span></span></pre></div>
<a id="trunkSourceWebKit2macWebKit2order"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/mac/WebKit2.order (172874 => 172875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/mac/WebKit2.order        2014-08-22 22:30:35 UTC (rev 172874)
+++ trunk/Source/WebKit2/mac/WebKit2.order        2014-08-22 23:04:04 UTC (rev 172875)
</span><span class="lines">@@ -3423,6 +3423,7 @@
</span><span class="cx"> __ZN6WebKit20EnvironmentVariables11appendValueEPKcS2_c
</span><span class="cx"> __ZN3WTF6VectorINSt3__14pairINS_7CStringES3_EELm0ENS_15CrashOnOverflowEED2Ev
</span><span class="cx"> __ZN3WTF6VectorINSt3__14pairINS_7CStringES3_EELm0ENS_15CrashOnOverflowEE6shrinkEm
</span><ins>+_WKCopyCFLocalizationPreferredName
</ins><span class="cx"> __ZN6WebKit15ProcessLauncher19processTypeAsStringENS0_11ProcessTypeE
</span><span class="cx"> __ZNK3WTF12StringAppendIPKcNS_6StringEEcvS3_Ev
</span><span class="cx"> __ZN3WTF6VectorINS_7CStringELm0ENS_15CrashOnOverflowEE14appendSlowCaseIS1_EEvRKT_
</span></span></pre>
</div>
</div>

</body>
</html>