<!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>[225087] 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/225087">225087</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-11-21 15:14:58 -0800 (Tue, 21 Nov 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
https://bugs.webkit.org/show_bug.cgi?id=179504

Patch by Christopher Reid <chris.reid@sony.com> on 2017-11-21
Reviewed by Darin Adler.

Source/WebCore:

No new tests no change in behavior.

Removed WebCoreNSStringExtras.
Replaced calls to string helpers in WebCoreNSStringExtras with calls to WTF::String.
Moved filenameByFixingIllegalCharacters into LoaderNSURLExtras.
Moved preferredBundleLocalizationName into WebKitLegacy.

* PlatformMac.cmake: Removed WebCoreNSStringExtras.mm
* SourcesCocoa.txt: Removed WebCoreNSStringExtras.mm
* WebCore.xcodeproj/project.pbxproj: Removed WebCoreNSStringExtras
* loader/mac/LoaderNSURLExtras.h:
* loader/mac/LoaderNSURLExtras.mm:
* platform/graphics/mac/FontCacheMac.mm:
* platform/mac/PasteboardMac.mm:
* platform/mac/WebCoreNSURLExtras.mm:

Source/WebKit:

* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

Source/WebKitLegacy/mac:

* Misc/WebKitNSStringExtras.mm:
* Plugins/Hosted/NetscapePluginHostManager.mm:
* Plugins/WebBasePluginPackage.mm:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreSourcesCocoatxt">trunk/Source/WebCore/SourcesCocoa.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloadermacLoaderNSURLExtrash">trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.h</a></li>
<li><a href="#trunkSourceWebCoreloadermacLoaderNSURLExtrasmm">trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacFontCacheMacmm">trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPasteboardMacmm">trunk/Source/WebCore/platform/mac/PasteboardMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreNSURLExtrasmm">trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebViewImplmm">trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessLaunchermacProcessLauncherMacmm">trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessPluginsmacPluginInfoStoreMacmm">trunk/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacChangeLog">trunk/Source/WebKitLegacy/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacymacMiscWebKitNSStringExtrasmm">trunk/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacPluginsHostedNetscapePluginHostManagermm">trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacPluginsWebBasePluginPackagemm">trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/ChangeLog      2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2017-11-21  Christopher Reid  <chris.reid@sony.com>
+
+        [PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
+        https://bugs.webkit.org/show_bug.cgi?id=179504
+
+        Reviewed by Darin Adler.
+
+        No new tests no change in behavior.
+
+        Removed WebCoreNSStringExtras.
+        Replaced calls to string helpers in WebCoreNSStringExtras with calls to WTF::String.
+        Moved filenameByFixingIllegalCharacters into LoaderNSURLExtras.
+        Moved preferredBundleLocalizationName into WebKitLegacy.
+
+        * PlatformMac.cmake: Removed WebCoreNSStringExtras.mm
+        * SourcesCocoa.txt: Removed WebCoreNSStringExtras.mm
+        * WebCore.xcodeproj/project.pbxproj: Removed WebCoreNSStringExtras
+        * loader/mac/LoaderNSURLExtras.h:
+        * loader/mac/LoaderNSURLExtras.mm:
+        * platform/graphics/mac/FontCacheMac.mm:
+        * platform/mac/PasteboardMac.mm:
+        * platform/mac/WebCoreNSURLExtras.mm:
+
</ins><span class="cx"> 2017-11-21  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Use vImage to do alpha premultiplication/unpremultiplication in FilterEffect
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake   2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/PlatformMac.cmake      2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -416,7 +416,6 @@
</span><span class="cx">     platform/mac/WebCoreFullScreenPlaceholderView.mm
</span><span class="cx">     platform/mac/WebCoreFullScreenWarningView.mm
</span><span class="cx">     platform/mac/WebCoreFullScreenWindow.mm
</span><del>-    platform/mac/WebCoreNSStringExtras.mm
</del><span class="cx">     platform/mac/WebCoreNSURLExtras.mm
</span><span class="cx">     platform/mac/WebCoreObjCExtras.mm
</span><span class="cx">     platform/mac/WebGLBlacklist.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcesCocoatxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/SourcesCocoa.txt (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/SourcesCocoa.txt    2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/SourcesCocoa.txt       2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -303,7 +303,6 @@
</span><span class="cx"> platform/mac/SerializedPlatformRepresentationMac.mm
</span><span class="cx"> platform/mac/StringUtilities.mm
</span><span class="cx"> platform/mac/URLMac.mm
</span><del>-platform/mac/WebCoreNSStringExtras.mm
</del><span class="cx"> platform/mac/WebCoreNSURLExtras.mm
</span><span class="cx"> platform/mac/WebCoreObjCExtras.mm
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -2396,7 +2396,6 @@
</span><span class="cx">          93442C9E0D2B335C00338FF9 /* HTMLTableRowsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93442C9D0D2B335C00338FF9 /* HTMLTableRowsCollection.h */; };
</span><span class="cx">          934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */ = {isa = PBXBuildFile; fileRef = 934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          934CC10A0EDB223900A658F2 /* ScriptSourceCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 934CC1090EDB223900A658F2 /* ScriptSourceCode.h */; };
</span><del>-               934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">           934F713A0D5A6F1000018D69 /* AuthenticationChallengeBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F71390D5A6F1000018D69 /* AuthenticationChallengeBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          934F713C0D5A6F1900018D69 /* ResourceErrorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F713B0D5A6F1900018D69 /* ResourceErrorBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          93500F3213FDE3BE0099EC24 /* NSScrollerImpDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */; };
</span><span class="lines">@@ -9868,8 +9867,6 @@
</span><span class="cx">          93442C9F0D2B336000338FF9 /* HTMLTableRowsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTableRowsCollection.cpp; sourceTree = "<group>"; };
</span><span class="cx">          934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextCG.h; sourceTree = "<group>"; };
</span><span class="cx">          934CC1090EDB223900A658F2 /* ScriptSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptSourceCode.h; sourceTree = "<group>"; };
</span><del>-               934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSStringExtras.mm; sourceTree = "<group>"; };
-               934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreNSStringExtras.h; sourceTree = "<group>"; };
</del><span class="cx">           934F71370D5A6EFF00018D69 /* AuthenticationChallengeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationChallengeBase.cpp; sourceTree = "<group>"; };
</span><span class="cx">          934F71390D5A6F1000018D69 /* AuthenticationChallengeBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeBase.h; sourceTree = "<group>"; };
</span><span class="cx">          934F713B0D5A6F1900018D69 /* ResourceErrorBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ResourceErrorBase.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -18320,8 +18317,6 @@
</span><span class="cx">                          CDC69DD51632026C007C38DF /* WebCoreFullScreenWarningView.mm */,
</span><span class="cx">                          CD127DEA14F3097900E84779 /* WebCoreFullScreenWindow.h */,
</span><span class="cx">                          CD127DEB14F3097900E84779 /* WebCoreFullScreenWindow.mm */,
</span><del>-                               934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */,
-                               934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */,
</del><span class="cx">                           C5B4C24B1509236C00A6EF37 /* WebCoreNSURLExtras.h */,
</span><span class="cx">                          C5B4C24C1509236C00A6EF37 /* WebCoreNSURLExtras.mm */,
</span><span class="cx">                          DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */,
</span><span class="lines">@@ -29618,7 +29613,6 @@
</span><span class="cx">                          93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */,
</span><span class="cx">                          3140379B124BEA7F00AF40E4 /* WebCoreMotionManager.h in Headers */,
</span><span class="cx">                          CDC979F51C498C0900DB50D4 /* WebCoreNSErrorExtras.h in Headers */,
</span><del>-                               934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */,
</del><span class="cx">                           C5B4C24D1509236C00A6EF37 /* WebCoreNSURLExtras.h in Headers */,
</span><span class="cx">                          CD225C0C1C46FBF400140761 /* WebCoreNSURLSession.h in Headers */,
</span><span class="cx">                          DD05FE0D0B8BA3C6009ACDFE /* WebCoreObjCExtras.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreloadermacLoaderNSURLExtrash"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.h (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.h      2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.h 2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -27,11 +27,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #import <Foundation/Foundation.h>
</span><ins>+#import <wtf/Forward.h>
</ins><span class="cx"> 
</span><del>-namespace WTF {
-class String;
-}
-
-extern "C" {
</del><span class="cx"> WEBCORE_EXPORT NSString *suggestedFilenameWithMIMEType(NSURL *, const WTF::String& MIMEType);
</span><del>-}
</del><ins>+WEBCORE_EXPORT NSString *filenameByFixingIllegalCharacters(NSString *);
</ins></span></pre></div>
<a id="trunkSourceWebCoreloadermacLoaderNSURLExtrasmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.mm     2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/loader/mac/LoaderNSURLExtras.mm        2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #import "URL.h"
</span><span class="cx"> #import "LocalizedStrings.h"
</span><span class="cx"> #import "MIMETypeRegistry.h"
</span><del>-#import "WebCoreNSStringExtras.h"
</del><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -64,8 +63,8 @@
</span><span class="cx">     // Do not correct filenames that are reported with a mime type of tar, and 
</span><span class="cx">     // have a filename which has .tar in it or ends in .tgz
</span><span class="cx">     if ((mimeType == "application/tar" || mimeType == "application/x-tar")
</span><del>-        && (hasCaseInsensitiveSubstring(filename, @".tar")
-        || hasCaseInsensitiveSuffix(filename, @".tgz"))) {
</del><ins>+        && (String(filename).containsIgnoringASCIICase(".tar")
+        || String(filename).endsWithIgnoringASCIICase(".tgz"))) {
</ins><span class="cx">         return filename;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -86,3 +85,24 @@
</span><span class="cx"> 
</span><span class="cx">     return filename;
</span><span class="cx"> }
</span><ins>+
+NSString *filenameByFixingIllegalCharacters(NSString *string)
+{
+    NSMutableString *filename = [[string mutableCopy] autorelease];
+
+    // Strip null characters.
+    unichar nullChar = 0;
+    [filename replaceOccurrencesOfString:[NSString stringWithCharacters:&nullChar length:0] withString:@"" options:0 range:NSMakeRange(0, [filename length])];
+
+    // Replace "/" with "-".
+    [filename replaceOccurrencesOfString:@"/" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
+
+    // Replace ":" with "-".
+    [filename replaceOccurrencesOfString:@":" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
+
+    // Strip leading dots.
+    while ([filename hasPrefix:@"."])
+        [filename deleteCharactersInRange:NSMakeRange(0, 1)];
+
+    return filename;
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacFontCacheMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm       2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm  2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #import <pal/spi/cocoa/CoreTextSPI.h>
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-#import "WebCoreNSStringExtras.h"
</del><span class="cx"> #import <AppKit/AppKit.h>
</span><span class="cx"> #import <pal/spi/mac/NSFontSPI.h>
</span><span class="cx"> #import <wtf/MainThread.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPasteboardMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm       2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm  2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #import "SharedBuffer.h"
</span><span class="cx"> #import "URL.h"
</span><span class="cx"> #import "UTIUtilities.h"
</span><del>-#import "WebCoreNSStringExtras.h"
</del><span class="cx"> #import "WebNSAttributedStringExtras.h"
</span><span class="cx"> #import <pal/spi/cg/CoreGraphicsSPI.h>
</span><span class="cx"> #import <pal/spi/mac/HIServicesSPI.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreNSStringExtrash"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h        2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h   2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * Copyright (C) 2005, 2007 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. 
- * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 <objc/objc.h>
-
-#ifdef __OBJC__
-#include <Foundation/Foundation.h>
-@class NSString;
-#else
-typedef struct NSString NSString;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WEBCORE_EXPORT BOOL stringIsCaseInsensitiveEqualToString(NSString *first, NSString *second);
-WEBCORE_EXPORT BOOL hasCaseInsensitiveSuffix(NSString *, NSString *suffix);
-WEBCORE_EXPORT BOOL hasCaseInsensitivePrefix(NSString *, NSString *prefix);
-WEBCORE_EXPORT BOOL hasCaseInsensitiveSubstring(NSString *, NSString *substring);
-WEBCORE_EXPORT NSString *filenameByFixingIllegalCharacters(NSString *);
-
-WEBCORE_EXPORT NSString *preferredBundleLocalizationName();
-NSString *canonicalLocaleName(NSString *);
-
-#ifdef __cplusplus
-}
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreNSStringExtrasmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm       2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm  2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-/*
- * Copyright (C) 2005, 2007 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. 
- * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
- */
-
-#import "config.h"
-#import "WebCoreNSStringExtras.h"
-
-#import <pal/spi/cf/CFLocaleSPI.h>
-#import <wtf/RetainPtr.h>
-
-BOOL stringIsCaseInsensitiveEqualToString(NSString *first, NSString *second)
-{
-    return [first compare:second options:(NSCaseInsensitiveSearch|NSLiteralSearch)] == NSOrderedSame;
-}
-
-BOOL hasCaseInsensitiveSuffix(NSString *string, NSString *suffix)
-{
-    return [string rangeOfString:suffix options:(NSCaseInsensitiveSearch | NSBackwardsSearch | NSAnchoredSearch)].location != NSNotFound;
-}
-
-BOOL hasCaseInsensitivePrefix(NSString *string, NSString *prefix)
-{
-    return [string rangeOfString:prefix options:(NSCaseInsensitiveSearch | NSAnchoredSearch)].location != NSNotFound;
-}
-
-BOOL hasCaseInsensitiveSubstring(NSString *string, NSString *substring)
-{
-    return [string rangeOfString:substring options:NSCaseInsensitiveSearch].location != NSNotFound;
-}
-
-NSString *filenameByFixingIllegalCharacters(NSString *string)
-{
-    NSMutableString *filename = [[string mutableCopy] autorelease];
-
-    // Strip null characters.
-    unichar nullChar = 0;
-    [filename replaceOccurrencesOfString:[NSString stringWithCharacters:&nullChar length:0] withString:@"" options:0 range:NSMakeRange(0, [filename length])];
-
-    // Replace "/" with "-".
-    [filename replaceOccurrencesOfString:@"/" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
-
-    // Replace ":" with "-".
-    [filename replaceOccurrencesOfString:@":" withString:@"-" options:0 range:NSMakeRange(0, [filename length])];
-    
-    // Strip leading dots.
-    while ([filename hasPrefix:@"."]) {
-        [filename deleteCharactersInRange:NSMakeRange(0,1)];
-    }
-    
-    return filename;
-}
-
-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, &regionCode, nullptr, nullptr);
-    if (!success)
-        return @"en_US";
-
-    RetainPtr<CFStringRef> code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode));
-    return (NSString *)code.autorelease();
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreNSURLExtrasmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm  2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm     2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "URLParser.h"
</span><span class="cx"> #import "WebCoreObjCExtras.h"
</span><del>-#import "WebCoreNSStringExtras.h"
</del><span class="cx"> #import "WebCoreNSURLExtras.h"
</span><span class="cx"> #import <wtf/Function.h>
</span><span class="cx"> #import <wtf/HexNumber.h>
</span><span class="lines">@@ -721,7 +720,7 @@
</span><span class="cx">     
</span><span class="cx">     // Maybe we should implement this using a character buffer instead?
</span><span class="cx">     
</span><del>-    if (hasCaseInsensitivePrefix(string, @"mailto:")) {
</del><ins>+    if (protocolIs(string, "mailto")) {
</ins><span class="cx">         applyHostNameFunctionToMailToURLString(string, f, context);
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKit/ChangeLog       2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-11-21  Christopher Reid  <chris.reid@sony.com>
+
+        [PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
+        https://bugs.webkit.org/show_bug.cgi?id=179504
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
+
</ins><span class="cx"> 2017-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [WPE] WPEWebProcess: Couldn't find current GLX or EGL context
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm       2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm  2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx"> #import <WebCore/DragData.h>
</span><span class="cx"> #import <WebCore/Editor.h>
</span><span class="cx"> #import <WebCore/KeypressCommand.h>
</span><ins>+#import <WebCore/LoaderNSURLExtras.h>
</ins><span class="cx"> #import <WebCore/LocalizedStrings.h>
</span><span class="cx"> #import <WebCore/PlatformEventFactoryMac.h>
</span><span class="cx"> #import <WebCore/TextAlternativeWithRange.h>
</span><span class="lines">@@ -83,7 +84,6 @@
</span><span class="cx"> #import <WebCore/WebCoreCALayerExtras.h>
</span><span class="cx"> #import <WebCore/WebCoreFullScreenPlaceholderView.h>
</span><span class="cx"> #import <WebCore/WebCoreFullScreenWindow.h>
</span><del>-#import <WebCore/WebCoreNSStringExtras.h>
</del><span class="cx"> #import <WebCore/WebPlaybackControlsManager.h>
</span><span class="cx"> #import <pal/spi/cg/CoreGraphicsSPI.h>
</span><span class="cx"> #import <pal/spi/cocoa/AVKitSPI.h>
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="cx"> #import <wtf/SetForScope.h>
</span><span class="cx"> #import <wtf/SoftLinking.h>
</span><ins>+#import <wtf/text/StringConcatenate.h>
</ins><span class="cx"> 
</span><span class="cx"> #if HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
</span><span class="cx"> SOFT_LINK_FRAMEWORK(AVKit)
</span><span class="lines">@@ -3797,11 +3798,10 @@
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension)
</del><ins>+static bool matchesExtensionOrEquivalent(const String& filename, const String& extension)
</ins><span class="cx"> {
</span><del>-    NSString *extensionAsSuffix = [@"." stringByAppendingString:extension];
-    return hasCaseInsensitiveSuffix(filename, extensionAsSuffix) || (stringIsCaseInsensitiveEqualToString(extension, @"jpeg")
-        && hasCaseInsensitiveSuffix(filename, @".jpg"));
</del><ins>+    return filename.endsWithIgnoringASCIICase("." + extension)
+        || (equalLettersIgnoringASCIICase(extension, "jpeg") && filename.endsWithIgnoringASCIICase(".jpg"));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebViewImpl::setFileAndURLTypes(NSString *filename, NSString *extension, NSString *title, NSString *url, NSString *visibleURL, NSPasteboard *pasteboard)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessLaunchermacProcessLauncherMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm    2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "ProcessLauncher.h"
</span><span class="cx"> 
</span><del>-#import <WebCore/WebCoreNSStringExtras.h>
</del><span class="cx"> #import <crt_externs.h>
</span><span class="cx"> #import <mach-o/dyld.h>
</span><span class="cx"> #import <mach/machine.h>
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessPluginsmacPluginInfoStoreMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm  2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKit/UIProcess/Plugins/mac/PluginInfoStoreMac.mm     2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import "NetscapePluginModule.h"
</span><span class="cx"> #import "SandboxUtilities.h"
</span><span class="cx"> #import <WebCore/PluginBlacklist.h>
</span><del>-#import <WebCore/WebCoreNSStringExtras.h>
</del><span class="cx"> #import <wtf/HashSet.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx"> #import <wtf/text/CString.h>
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/ChangeLog  2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog     2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-11-21  Christopher Reid  <chris.reid@sony.com>
+
+        [PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
+        https://bugs.webkit.org/show_bug.cgi?id=179504
+
+        Reviewed by Darin Adler.
+
+        * Misc/WebKitNSStringExtras.mm:
+        * Plugins/Hosted/NetscapePluginHostManager.mm:
+        * Plugins/WebBasePluginPackage.mm:
+
</ins><span class="cx"> 2017-11-19  Tim Horton  <timothy_horton@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Remove unused TOUCH_ICON_LOADING feature flag
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacMiscWebKitNSStringExtrasmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm       2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm  2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> #import <WebCore/FontCascade.h>
</span><span class="cx"> #import <WebCore/GraphicsContext.h>
</span><ins>+#import <WebCore/LoaderNSURLExtras.h>
</ins><span class="cx"> #import <WebCore/TextRun.h>
</span><del>-#import <WebCore/WebCoreNSStringExtras.h>
</del><span class="cx"> #import <WebKitLegacy/WebNSFileManagerExtras.h>
</span><span class="cx"> #import <WebKitLegacy/WebNSObjectExtras.h>
</span><span class="cx"> #import <pal/spi/cg/CoreGraphicsSPI.h>
</span><span class="lines">@@ -174,22 +174,22 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)_webkit_isCaseInsensitiveEqualToString:(NSString *)string
</span><span class="cx"> {
</span><del>-    return stringIsCaseInsensitiveEqualToString(self, string);
</del><ins>+    return [self compare:string options:(NSCaseInsensitiveSearch | NSLiteralSearch)] == NSOrderedSame;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> -(BOOL)_webkit_hasCaseInsensitivePrefix:(NSString *)prefix
</span><span class="cx"> {
</span><del>-    return hasCaseInsensitivePrefix(self, prefix);
</del><ins>+    return [self rangeOfString:prefix options:(NSCaseInsensitiveSearch | NSAnchoredSearch)].location != NSNotFound;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> -(BOOL)_webkit_hasCaseInsensitiveSuffix:(NSString *)suffix
</span><span class="cx"> {
</span><del>-    return hasCaseInsensitiveSuffix(self, suffix);
</del><ins>+    return [self rangeOfString:suffix options:(NSCaseInsensitiveSearch | NSBackwardsSearch | NSAnchoredSearch)].location != NSNotFound;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> -(BOOL)_webkit_hasCaseInsensitiveSubstring:(NSString *)substring
</span><span class="cx"> {
</span><del>-    return hasCaseInsensitiveSubstring(self, substring);
</del><ins>+    return [self rangeOfString:substring options:NSCaseInsensitiveSearch].location != NSNotFound;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> -(NSString *)_webkit_filenameByFixingIllegalCharacters
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacPluginsHostedNetscapePluginHostManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm        2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm   2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> #import "NetscapePluginInstanceProxy.h"
</span><span class="cx"> #import "WebLocalizableStringsInternal.h"
</span><span class="cx"> #import "WebNetscapePluginPackage.h"
</span><del>-#import <WebCore/WebCoreNSStringExtras.h>
</del><span class="cx"> #import <mach/mach_port.h>
</span><ins>+#import <pal/spi/cf/CFLocaleSPI.h>
</ins><span class="cx"> #import <pal/spi/cocoa/QuartzCoreSPI.h>
</span><span class="cx"> #import <pal/spi/cocoa/ServersSPI.h>
</span><span class="cx"> #import <spawn.h>
</span><span class="lines">@@ -100,6 +100,30 @@
</span><span class="cx">     return hostProxy;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static 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";
+
+    NSString *language = [preferredLocalizations objectAtIndex:0];
+
+    // 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, &regionCode, nullptr, nullptr);
+    if (!success)
+        return @"en_US";
+
+    auto code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode));
+    return (NSString *)code.autorelease();
+}
+
</ins><span class="cx"> bool NetscapePluginHostManager::spawnPluginHost(const String& pluginPath, cpu_type_t pluginArchitecture, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN)
</span><span class="cx"> {
</span><span class="cx">     if (m_pluginVendorPort == MACH_PORT_NULL) {
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacPluginsWebBasePluginPackagemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm (225086 => 225087)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm    2017-11-21 22:32:49 UTC (rev 225086)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm       2017-11-21 23:14:58 UTC (rev 225087)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #import "WebNetscapePluginPackage.h"
</span><span class="cx"> #import "WebPluginPackage.h"
</span><span class="cx"> #import "WebTypesInternal.h"
</span><del>-#import <WebCore/WebCoreNSStringExtras.h> 
</del><span class="cx"> #import <WebCore/WebCoreObjCExtras.h>
</span><span class="cx"> #import <algorithm>
</span><span class="cx"> #import <mach-o/arch.h>
</span></span></pre>
</div>
</div>

</body>
</html>