<!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>[180297] trunk/Source/WebCore</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/180297">180297</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-02-18 14:25:50 -0800 (Wed, 18 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=141767

Reviewed by Tim Horton.

Also, move it to platform/cocoa instead of platform/mac.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformcocoaLocalizedStringsCocoamm">trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacLocalizedStringsMaccpp">trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180296 => 180297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-18 22:25:22 UTC (rev 180296)
+++ trunk/Source/WebCore/ChangeLog        2015-02-18 22:25:50 UTC (rev 180297)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-02-18  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
+        https://bugs.webkit.org/show_bug.cgi?id=141767
+
+        Reviewed by Tim Horton.
+
+        Also, move it to platform/cocoa instead of platform/mac.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
+
</ins><span class="cx"> 2015-02-18  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename FontGlyphs to FontCascadeFonts
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (180296 => 180297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-18 22:25:22 UTC (rev 180296)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-02-18 22:25:50 UTC (rev 180297)
</span><span class="lines">@@ -688,6 +688,7 @@
</span><span class="cx">                 1A37636B1A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */; };
</span><span class="cx">                 1A37636C1A2E68BB009A7EE2 /* StorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC85F23E1519187300BC17BE /* RenderNamedFlowThread.cpp */; };
</span><ins>+                1A4832B31A953BA6008B4DFE /* LocalizedStringsCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4832B21A953BA6008B4DFE /* LocalizedStringsCocoa.mm */; };
</ins><span class="cx">                 1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; };
</span><span class="cx">                 1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1A494E340A12358B00FDAFC1 /* JSHTMLDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494E320A12358A00FDAFC1 /* JSHTMLDocument.cpp */; };
</span><span class="lines">@@ -5096,7 +5097,6 @@
</span><span class="cx">                 BC23EE920DAED2BC009FDC91 /* CSSImageGeneratorValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC23EE910DAED2BC009FDC91 /* CSSImageGeneratorValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BC23F0DB0DAFF4A4009FDC91 /* GeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */; };
</span><span class="cx">                 BC2441C40E8B65D00055320F /* ScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2441C30E8B65D00055320F /* ScrollView.cpp */; };
</span><del>-                BC25B52A131C6D3900180E10 /* LocalizedStringsMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC25B528131C6D3900180E10 /* LocalizedStringsMac.cpp */; };
</del><span class="cx">                 BC274B2F140EBEB200EADFA6 /* CSSBorderImageSliceValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC274B2E140EBEB200EADFA6 /* CSSBorderImageSliceValue.h */; };
</span><span class="cx">                 BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC274B30140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp */; };
</span><span class="cx">                 BC275B7911C5D1C300C9206C /* JSWebKitPointCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */; };
</span><span class="lines">@@ -7682,6 +7682,7 @@
</span><span class="cx">                 1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMultiColumnFlowThread.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespaceProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageNamespaceProvider.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A4832B21A953BA6008B4DFE /* LocalizedStringsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalizedStringsCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLElement.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12500,7 +12501,6 @@
</span><span class="cx">                 BC23EE910DAED2BC009FDC91 /* CSSImageGeneratorValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSImageGeneratorValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedImage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC2441C30E8B65D00055320F /* ScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollView.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                BC25B528131C6D3900180E10 /* LocalizedStringsMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalizedStringsMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 BC274B2E140EBEB200EADFA6 /* CSSBorderImageSliceValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSBorderImageSliceValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC274B30140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBorderImageSliceValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPointCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16529,7 +16529,6 @@
</span><span class="cx">                                 9352084409BD43B900F2038D /* Language.mm */,
</span><span class="cx">                                 06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
</span><span class="cx">                                 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
</span><del>-                                BC25B528131C6D3900180E10 /* LocalizedStringsMac.cpp */,
</del><span class="cx">                                 1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
</span><span class="cx">                                 BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */,
</span><span class="cx">                                 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */,
</span><span class="lines">@@ -18648,6 +18647,7 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 5D8C4DBD1428222C0026CE72 /* DisplaySleepDisablerCocoa.cpp */,
</span><span class="cx">                                 5D8C4DBE1428222C0026CE72 /* DisplaySleepDisablerCocoa.h */,
</span><ins>+                                1A4832B21A953BA6008B4DFE /* LocalizedStringsCocoa.mm */,
</ins><span class="cx">                                 A5C974CF11485FF10066F2AB /* KeyEventCocoa.h */,
</span><span class="cx">                                 A5C974D011485FF10066F2AB /* KeyEventCocoa.mm */,
</span><span class="cx">                                 1A0409F21A43675C009E47F3 /* MachSendRight.cpp */,
</span><span class="lines">@@ -28958,7 +28958,6 @@
</span><span class="cx">                                 7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */,
</span><span class="cx">                                 A516E8B8136E04DB0076C3C0 /* LocalizedDateCache.mm in Sources */,
</span><span class="cx">                                 C046E1AC1208A9FE00BA2CF7 /* LocalizedStrings.cpp in Sources */,
</span><del>-                                BC25B52A131C6D3900180E10 /* LocalizedStringsMac.cpp in Sources */,
</del><span class="cx">                                 BCE1C41C0D982981003B02F2 /* Location.cpp in Sources */,
</span><span class="cx">                                 A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */,
</span><span class="cx">                                 1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */,
</span><span class="lines">@@ -28973,6 +28972,7 @@
</span><span class="cx">                                 05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */,
</span><span class="cx">                                 FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */,
</span><span class="cx">                                 FED48390CED66C3255F72C59 /* MathMLSelectElement.cpp in Sources */,
</span><ins>+                                1A4832B31A953BA6008B4DFE /* LocalizedStringsCocoa.mm in Sources */,
</ins><span class="cx">                                 FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */,
</span><span class="cx">                                 49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */,
</span><span class="cx">                                 49E911C60EF86D47009D0CAF /* MatrixTransformOperation.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaLocalizedStringsCocoammfromrev180294trunkSourceWebCoreplatformmacLocalizedStringsMaccpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm (from rev 180294, trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp) (0 => 180297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/LocalizedStringsCocoa.mm        2015-02-18 22:25:50 UTC (rev 180297)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2011, 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;LocalizedStrings.h&quot;
+
+#include &lt;CoreFoundation/CFBundle.h&gt;
+#include &lt;wtf/Assertions.h&gt;
+#include &lt;wtf/MainThread.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+String localizedString(const char* key)
+{
+    static CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(&quot;com.apple.WebCore&quot;));
+
+#if !PLATFORM(IOS)
+    // Can be called on a dispatch queue when initializing strings on iOS.
+    // See LoadWebLocalizedStrings and &lt;rdar://problem/7902473&gt;.
+    ASSERT(isMainThread());
+#endif
+
+    RetainPtr&lt;CFStringRef&gt; keyString = adoptCF(CFStringCreateWithCStringNoCopy(0, key, kCFStringEncodingUTF8, kCFAllocatorNull));
+    CFStringRef notFound = CFSTR(&quot;localized string not found&quot;);
+    RetainPtr&lt;CFStringRef&gt; result;
+    if (bundle) {
+        result = adoptCF(CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0));
+        ASSERT_WITH_MESSAGE(result.get() != notFound, &quot;could not find localizable string %s in bundle&quot;, key);
+    } else
+        result = notFound;
+
+    return String(result.get());
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacLocalizedStringsMaccpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp (180296 => 180297)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp        2015-02-18 22:25:22 UTC (rev 180296)
+++ trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp        2015-02-18 22:25:50 UTC (rev 180297)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011, 2012 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#include &quot;config.h&quot;
-#include &quot;LocalizedStrings.h&quot;
-
-#include &lt;CoreFoundation/CFBundle.h&gt;
-#include &lt;wtf/Assertions.h&gt;
-#include &lt;wtf/MainThread.h&gt;
-#include &lt;wtf/RetainPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-String localizedString(const char* key)
-{
-    static CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(&quot;com.apple.WebCore&quot;));
-
-#if !PLATFORM(IOS)
-    // Can be called on a dispatch queue when initializing strings on iOS.
-    // See LoadWebLocalizedStrings and &lt;rdar://problem/7902473&gt;.
-    ASSERT(isMainThread());
-#endif
-
-    RetainPtr&lt;CFStringRef&gt; keyString = adoptCF(CFStringCreateWithCStringNoCopy(0, key, kCFStringEncodingUTF8, kCFAllocatorNull));
-    CFStringRef notFound = CFSTR(&quot;localized string not found&quot;);
-    RetainPtr&lt;CFStringRef&gt; result;
-    if (bundle) {
-        result = adoptCF(CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0));
-        ASSERT_WITH_MESSAGE(result.get() != notFound, &quot;could not find localizable string %s in bundle&quot;, key);
-    } else
-        result = notFound;
-
-    return String(result.get());
-}
-
-} // namespace WebCore
</del></span></pre>
</div>
</div>

</body>
</html>