<!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>[213319] trunk</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/213319">213319</a></dd>
<dt>Author</dt> <dd>aakash_jain@apple.com</dd>
<dt>Date</dt> <dd>2017-03-02 15:56:03 -0800 (Thu, 02 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move stringMatchesWildcardString from WebKit2 to WebCore
https://bugs.webkit.org/show_bug.cgi?id=169065

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Added StringUtilities.h and StringUtilities.mm
* PlatformMac.cmake: Added StringUtilities.mm
* platform/mac/StringUtilities.h: Added.
* platform/mac/StringUtilities.mm: Added.
(WebCore::wildcardRegexPatternString): Added.
(WebCore::stringMatchesWildcardString): Added.

Source/WebKit2:

* Platform/mac/StringUtilities.h: Moved stringMatchesWildcardString to WebCore.
* WebKit2.xcodeproj/project.pbxproj: Make StringUtilities.h a project header.
* Platform/mac/StringUtilities.mm:
(WebKit::wildcardRegexPatternString): Moved to WebCore.
(WebKit::stringMatchesWildcardString): Ditto.
* WebProcess/Plugins/WebPluginInfoProvider.cpp: Using stringMatchesWildcardString from WebCore.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Moved StringUtilities.mm
* TestWebKitAPI/Tests/WebCore/StringUtilities.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm: Removed.</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="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformmacStringUtilitiesh">trunk/Source/WebKit2/Platform/mac/StringUtilities.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformmacStringUtilitiesmm">trunk/Source/WebKit2/Platform/mac/StringUtilities.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsWebPluginInfoProvidercpp">trunk/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformmacStringUtilitiesh">trunk/Source/WebCore/platform/mac/StringUtilities.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacStringUtilitiesmm">trunk/Source/WebCore/platform/mac/StringUtilities.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreStringUtilitiesmm">trunk/Tools/TestWebKitAPI/Tests/WebCore/StringUtilities.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2macStringUtilitiesmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebCore/ChangeLog        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-03-02  Aakash Jain  &lt;aakash_jain@apple.com&gt;
+
+        Move stringMatchesWildcardString from WebKit2 to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=169065
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebCore.xcodeproj/project.pbxproj: Added StringUtilities.h and StringUtilities.mm
+        * PlatformMac.cmake: Added StringUtilities.mm
+        * platform/mac/StringUtilities.h: Added.
+        * platform/mac/StringUtilities.mm: Added.
+        (WebCore::wildcardRegexPatternString): Added.
+        (WebCore::stringMatchesWildcardString): Added.
+
</ins><span class="cx"> 2017-02-28  Matt Rajca  &lt;mrajca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Media: send &quot;did interfere with playback&quot; events when the user pauses an autoplaying element
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebCore/PlatformMac.cmake        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -486,6 +486,7 @@
</span><span class="cx">     platform/mac/ScrollbarThemeMac.mm
</span><span class="cx">     platform/mac/SerializedPlatformRepresentationMac.mm
</span><span class="cx">     platform/mac/SoundMac.mm
</span><ins>+    platform/mac/StringUtilities.mm
</ins><span class="cx">     platform/mac/SuddenTermination.mm
</span><span class="cx">     platform/mac/SystemSleepListenerMac.mm
</span><span class="cx">     platform/mac/ThemeMac.mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -6592,6 +6592,8 @@
</span><span class="cx">                 E5BA7D63151437CA00FE1E3F /* LengthFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */; };
</span><span class="cx">                 EBF5121D1696496C0056BD25 /* JSTypeConversions.h in Headers */ = {isa = PBXBuildFile; fileRef = EBF5121B1696496C0056BD25 /* JSTypeConversions.h */; };
</span><ins>+                ECA680C71E67724500731D20 /* StringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ECA680C61E67724500731D20 /* StringUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                ECA680C91E67730B00731D20 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = ECA680C81E67730B00731D20 /* StringUtilities.mm */; };
</ins><span class="cx">                 ECCDB8811E4B8C5900A1AEA6 /* WKContentObservationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */; };
</span><span class="cx">                 ECCDB8871E4BB63F00A1AEA6 /* WKGraphicsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */; };
</span><span class="cx">                 ED2BA83C09A24B91006C0AC4 /* DocumentMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -14814,6 +14816,8 @@
</span><span class="cx">                 EB081CD91696084400553730 /* TypeConversions.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TypeConversions.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 EBF5121A1696496C0056BD25 /* JSTypeConversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypeConversions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 EBF5121B1696496C0056BD25 /* JSTypeConversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypeConversions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                ECA680C61E67724500731D20 /* StringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringUtilities.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                ECA680C81E67730B00731D20 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 ECCDB8801E4B8C5900A1AEA6 /* WKContentObservationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContentObservationInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 ECCDB8861E4BB63F00A1AEA6 /* WKGraphicsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKGraphicsInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 ED2BA83B09A24B91006C0AC4 /* DocumentMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18239,6 +18243,8 @@
</span><span class="cx">                                 077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */,
</span><span class="cx">                                 4B3043C80AE0371D00A82647 /* SoundMac.mm */,
</span><span class="cx">                                 84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */,
</span><ins>+                                ECA680C61E67724500731D20 /* StringUtilities.h */,
+                                ECA680C81E67730B00731D20 /* StringUtilities.mm */,
</ins><span class="cx">                                 93B2D8170F9920EE006AE6B2 /* SuddenTermination.mm */,
</span><span class="cx">                                 CDA07FC018E0A22B004699FA /* SystemSleepListenerMac.h */,
</span><span class="cx">                                 CDA07FBF18E0A22B004699FA /* SystemSleepListenerMac.mm */,
</span><span class="lines">@@ -27711,6 +27717,7 @@
</span><span class="cx">                                 371E65CC13661EDC00BEEDB0 /* PageSerializer.h in Headers */,
</span><span class="cx">                                 E1284AE110447D4500EAEB52 /* PageTransitionEvent.h in Headers */,
</span><span class="cx">                                 51E1ECC30C91C90400DC255B /* PageURLRecord.h in Headers */,
</span><ins>+                                ECA680C71E67724500731D20 /* StringUtilities.h in Headers */,
</ins><span class="cx">                                 FFD5B97B135CC97800D5E92A /* PageVisibilityState.h in Headers */,
</span><span class="cx">                                 9377ABA015DEFEEF0031FD04 /* Pagination.h in Headers */,
</span><span class="cx">                                 0885067F11DA045B00182B98 /* PaintInfo.h in Headers */,
</span><span class="lines">@@ -29580,6 +29587,7 @@
</span><span class="cx">                                 7A45032F18DB717200377B34 /* BufferedLineReader.cpp in Sources */,
</span><span class="cx">                                 F55B3DAF1251F12D003EF269 /* ButtonInputType.cpp in Sources */,
</span><span class="cx">                                 1A569CF70D7E2B82007C3983 /* c_class.cpp in Sources */,
</span><ins>+                                ECA680C91E67730B00731D20 /* StringUtilities.mm in Sources */,
</ins><span class="cx">                                 1A569CF90D7E2B82007C3983 /* c_instance.cpp in Sources */,
</span><span class="cx">                                 1A569CFB0D7E2B82007C3983 /* c_runtime.cpp in Sources */,
</span><span class="cx">                                 1A569CFD0D7E2B82007C3983 /* c_utility.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacStringUtilitieshfromrev213317trunkSourceWebKit2PlatformmacStringUtilitiesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/StringUtilities.h (from rev 213317, trunk/Source/WebKit2/Platform/mac/StringUtilities.h) (0 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/StringUtilities.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/StringUtilities.h        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 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.
+ */
+
+#pragma once
+
+#import &quot;PlatformExportMacros.h&quot;
+#import &lt;wtf/Forward.h&gt;
+
+namespace WebCore {
+WEBCORE_EXPORT bool stringMatchesWildcardString(const String&amp; stringToBeMatched, const String&amp; wildcardString);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacStringUtilitiesmmfromrev213317trunkSourceWebKit2PlatformmacStringUtilitiesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/mac/StringUtilities.mm (from rev 213317, trunk/Source/WebKit2/Platform/mac/StringUtilities.h) (0 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/StringUtilities.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/StringUtilities.mm        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 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.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;StringUtilities.h&quot;
+
+#import &lt;wtf/text/StringBuilder.h&gt;
+#import &lt;yarr/RegularExpression.h&gt;
+
+namespace WebCore {
+    
+static String wildcardRegexPatternString(const String&amp; string)
+{
+    String metaCharacters = &quot;.|+?()[]{}^$&quot;;
+    UChar escapeCharacter = '\\';
+    UChar wildcardCharacter = '*';
+    
+    StringBuilder stringBuilder;
+    
+    stringBuilder.append('^');
+    for (unsigned i = 0; i &lt; string.length(); i++) {
+        auto character = string[i];
+        if (metaCharacters.contains(character) || character == escapeCharacter)
+            stringBuilder.append(escapeCharacter);
+        else if (character == wildcardCharacter)
+            stringBuilder.append('.');
+        
+        stringBuilder.append(character);
+    }
+    stringBuilder.append('$');
+        
+    return stringBuilder.toString();
+}
+    
+bool stringMatchesWildcardString(const String&amp; string, const String&amp; wildcardString)
+{
+    return JSC::Yarr::RegularExpression(wildcardRegexPatternString(wildcardString), TextCaseInsensitive).match(string) != -1;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2017-03-02  Aakash Jain  &lt;aakash_jain@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Move stringMatchesWildcardString from WebKit2 to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=169065
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Platform/mac/StringUtilities.h: Moved stringMatchesWildcardString to WebCore.
+        * WebKit2.xcodeproj/project.pbxproj: Make StringUtilities.h a project header.
+        * Platform/mac/StringUtilities.mm:
+        (WebKit::wildcardRegexPatternString): Moved to WebCore.
+        (WebKit::stringMatchesWildcardString): Ditto.
+        * WebProcess/Plugins/WebPluginInfoProvider.cpp: Using stringMatchesWildcardString from WebCore.
+
+2017-03-02  Aakash Jain  &lt;aakash_jain@apple.com&gt;
+
</ins><span class="cx">         IsSmartPtr&lt;WKRetainPtr&lt;T&gt;&gt;::value should not be exported
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=169047
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformmacStringUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/mac/StringUtilities.h (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/mac/StringUtilities.h        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebKit2/Platform/mac/StringUtilities.h        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef StringUtilities_h
-#define StringUtilities_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #import &lt;WebKit/WKDeclarationSpecifiers.h&gt;
</span><span class="cx"> #import &lt;wtf/Forward.h&gt;
</span><span class="lines">@@ -40,8 +39,4 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // defined(__OBJC__)
</span><span class="cx"> 
</span><del>-WK_EXPORT bool stringMatchesWildcardString(const String&amp; stringToBeMatched, const String&amp; wildcardString);
-
</del><span class="cx"> }
</span><del>-
-#endif // StringUtilities_h
</del></span></pre></div>
<a id="trunkSourceWebKit2PlatformmacStringUtilitiesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/mac/StringUtilities.mm (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/mac/StringUtilities.mm        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebKit2/Platform/mac/StringUtilities.mm        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -40,34 +40,6 @@
</span><span class="cx">     return string.isEmpty() ? @&quot;&quot; : CFBridgingRelease(WKStringCopyCFString(0, toAPI(string.impl())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static String wildcardRegexPatternString(const String&amp; string)
-{
-    String metaCharacters = &quot;.|+?()[]{}^$&quot;;
-    UChar escapeCharacter = '\\';
-    UChar wildcardCharacter = '*';
-
-    StringBuilder stringBuilder;
-
-    stringBuilder.append('^');
-    for (unsigned i = 0; i &lt; string.length(); i++) {
-        auto character = string[i];
-        if (metaCharacters.contains(character) || character == escapeCharacter)
-            stringBuilder.append(escapeCharacter);
-        else if (character == wildcardCharacter)
-            stringBuilder.append('.');
-
-        stringBuilder.append(character);
-    }
-    stringBuilder.append('$');
-
-    return stringBuilder.toString();
-}
-
-bool stringMatchesWildcardString(const String&amp; string, const String&amp; wildcardString)
-{
-    return JSC::Yarr::RegularExpression(wildcardRegexPatternString(wildcardString), TextCaseInsensitive).match(string) != -1;
-}
-
</del><span class="cx"> #if ENABLE(TELEPHONE_NUMBER_DETECTION) &amp;&amp; PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> SOFT_LINK_PRIVATE_FRAMEWORK(PhoneNumbers);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -592,7 +592,7 @@
</span><span class="cx">                 293EBEAB1627D9C9005F89F1 /* WKDOMText.h in Headers */ = {isa = PBXBuildFile; fileRef = 293EBEA91627D9C9005F89F1 /* WKDOMText.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 293EBEAC1627D9C9005F89F1 /* WKDOMText.mm in Sources */ = {isa = PBXBuildFile; fileRef = 293EBEAA1627D9C9005F89F1 /* WKDOMText.mm */; };
</span><span class="cx">                 29501724162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 29501723162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                296BD85D15019BC30071F424 /* StringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 296BD85B15019BC30071F424 /* StringUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                296BD85D15019BC30071F424 /* StringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 296BD85B15019BC30071F424 /* StringUtilities.h */; };
</ins><span class="cx">                 296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 296BD85C15019BC30071F424 /* StringUtilities.mm */; };
</span><span class="cx">                 2984F57C164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F57A164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp */; };
</span><span class="cx">                 2984F57D164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */; };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsWebPluginInfoProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.cpp (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.cpp        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Source/WebKit2/WebProcess/Plugins/WebPluginInfoProvider.cpp        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -39,7 +39,9 @@
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-#include &quot;StringUtilities.h&quot;
</del><ins>+#include &lt;WebCore/StringUtilities.h&gt;
+
+using namespace WebCore;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Tools/ChangeLog        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-03-02  Aakash Jain  &lt;aakash_jain@apple.com&gt;
+
+        Move stringMatchesWildcardString from WebKit2 to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=169065
+
+        Reviewed by Alexey Proskuryakov.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Moved StringUtilities.mm
+        * TestWebKitAPI/Tests/WebCore/StringUtilities.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm.
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm: Removed.
+
</ins><span class="cx"> 2017-02-28  Matt Rajca  &lt;mrajca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Media: send &quot;did interfere with playback&quot; events when the user pauses an autoplaying element
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -441,7 +441,6 @@
</span><span class="cx">                 835CF9671D25FCD6001A65D4 /* RestoreSessionStateWithoutNavigation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 835CF9661D25FCD6001A65D4 /* RestoreSessionStateWithoutNavigation.cpp */; };
</span><span class="cx">                 8361F1781E610B4E00759B25 /* link-with-download-attribute-with-slashes.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 8361F1771E610B2100759B25 /* link-with-download-attribute-with-slashes.html */; };
</span><span class="cx">                 837A35F11D9A1E7D00663C57 /* DownloadRequestBlobURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 837A35F01D9A1E6400663C57 /* DownloadRequestBlobURL.html */; };
</span><del>-                83CF1C301C4F1B8B00688447 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83CF1C2C1C4F19AE00688447 /* StringUtilities.mm */; };
</del><span class="cx">                 8E4A85371E1D1AB200F53B0F /* GridPosition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */; };
</span><span class="cx">                 930AD402150698D00067970F /* lots-of-text.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 930AD401150698B30067970F /* lots-of-text.html */; };
</span><span class="cx">                 9329AA291DE3F81E003ABD07 /* TextBreakIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9329AA281DE3F81E003ABD07 /* TextBreakIterator.cpp */; };
</span><span class="lines">@@ -560,6 +559,7 @@
</span><span class="cx">                 D34E08761E4E42E1005FF14A /* WKWebViewGetContents.mm in Sources */ = {isa = PBXBuildFile; fileRef = D3BE5E341E4CE85E00FD563A /* WKWebViewGetContents.mm */; };
</span><span class="cx">                 E1220DCA155B28AA0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = E1220DC9155B287D0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html */; };
</span><span class="cx">                 E194E1BD177E53C7009C4D4E /* StopLoadingFromDidReceiveResponse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = E194E1BC177E534A009C4D4E /* StopLoadingFromDidReceiveResponse.html */; };
</span><ins>+                ECA680CE1E68CC0900731D20 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = ECA680CD1E68CC0900731D20 /* StringUtilities.mm */; };
</ins><span class="cx">                 F415086D1DA040C50044BE9B /* play-audio-on-click.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F415086C1DA040C10044BE9B /* play-audio-on-click.html */; };
</span><span class="cx">                 F42DA5161D8CEFE400336F40 /* large-input-field-focus-onload.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F42DA5151D8CEFDB00336F40 /* large-input-field-focus-onload.html */; };
</span><span class="cx">                 F47728991E4AE3C1007ABF6A /* full-page-contenteditable.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F47728981E4AE3AD007ABF6A /* full-page-contenteditable.html */; };
</span><span class="lines">@@ -1156,7 +1156,6 @@
</span><span class="cx">                 8361F1771E610B2100759B25 /* link-with-download-attribute-with-slashes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;link-with-download-attribute-with-slashes.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 837A35F01D9A1E6400663C57 /* DownloadRequestBlobURL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DownloadRequestBlobURL.html; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83B88A331C80056D00BB2418 /* HTMLParserIdioms.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLParserIdioms.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                83CF1C2C1C4F19AE00688447 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 86BD19971A2DB05B006DCF0A /* RefCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefCounter.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8A2C750D16CED9550024F352 /* ResizeWindowAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResizeWindowAfterCrash.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8A3AF93A16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReloadPageAfterCrash.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1398,6 +1397,7 @@
</span><span class="cx">                 E490296714E2E3A4002BEDD1 /* TypingStyleCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TypingStyleCrash.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Deque.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 E4C9ABC71B3DB1710040A987 /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                ECA680CD1E68CC0900731D20 /* StringUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringUtilities.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 F3FC3EE213678B7300126A65 /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgtest.a; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">                 F415086C1DA040C10044BE9B /* play-audio-on-click.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;play-audio-on-click.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F42DA5151D8CEFDB00336F40 /* large-input-field-focus-onload.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = &quot;large-input-field-focus-onload.html&quot;; path = &quot;Tests/WebKit2Cocoa/large-input-field-focus-onload.html&quot;; sourceTree = SOURCE_ROOT; };
</span><span class="lines">@@ -1690,6 +1690,7 @@
</span><span class="cx">                                 41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */,
</span><span class="cx">                                 A17991891E1CA24100A505ED /* SharedBufferTest.cpp */,
</span><span class="cx">                                 A179918A1E1CA24100A505ED /* SharedBufferTest.h */,
</span><ins>+                                ECA680CD1E68CC0900731D20 /* StringUtilities.mm */,
</ins><span class="cx">                                 CDC2C7141797089D00E627FB /* TimeRanges.cpp */,
</span><span class="cx">                                 7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */,
</span><span class="cx">                                 440A1D3814A0103A008A66F2 /* URL.cpp */,
</span><span class="lines">@@ -2305,7 +2306,6 @@
</span><span class="cx">                                 C0C5D3BC14598B6F00A802A6 /* GetBackingScaleFactor.mm */,
</span><span class="cx">                                 C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */,
</span><span class="cx">                                 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */,
</span><del>-                                83CF1C2C1C4F19AE00688447 /* StringUtilities.mm */,
</del><span class="cx">                         );
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -2819,7 +2819,6 @@
</span><span class="cx">                                 515BE1711D428E4B00DD7C68 /* StoreBlobThenDelete.mm in Sources */,
</span><span class="cx">                                 7CCE7ED01A411A7E00447C4C /* StringByEvaluatingJavaScriptFromString.mm in Sources */,
</span><span class="cx">                                 7CCE7ED11A411A7E00447C4C /* StringTruncator.mm in Sources */,
</span><del>-                                83CF1C301C4F1B8B00688447 /* StringUtilities.mm in Sources */,
</del><span class="cx">                                 7CCE7ED21A411A7E00447C4C /* SubresourceErrorCrash.mm in Sources */,
</span><span class="cx">                                 7CCE7EA81A411A1900447C4C /* SyntheticBackingScaleFactorWindow.m in Sources */,
</span><span class="cx">                                 7CCE7F161A411AE600447C4C /* TerminateTwice.cpp in Sources */,
</span><span class="lines">@@ -2853,6 +2852,7 @@
</span><span class="cx">                                 2D4CF8BD1D8360CC0001CE8D /* WKThumbnailView.mm in Sources */,
</span><span class="cx">                                 7C83E04C1D0A641800FEBCF3 /* WebCoreNSURLSession.mm in Sources */,
</span><span class="cx">                                 CDCFA7AA1E45183200C2433D /* SampleMap.cpp in Sources */,
</span><ins>+                                ECA680CE1E68CC0900731D20 /* StringUtilities.mm in Sources */,
</ins><span class="cx">                                 7CCE7F1A1A411AE600447C4C /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */,
</span><span class="cx">                                 7CCE7EAB1A411A2400447C4C /* WebKitAgnosticTest.mm in Sources */,
</span><span class="cx">                                 5120C83D1E6751290025B250 /* WebsiteDataStoreCustomPaths.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreStringUtilitiesmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebCore/StringUtilities.mm (0 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/StringUtilities.mm                                (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/StringUtilities.mm        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+/*
+ * Copyright (C) 2016 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.
+ */
+
+#import &quot;config.h&quot;
+
+#import &lt;WebCore/StringUtilities.h&gt;
+#import &lt;wtf/text/WTFString.h&gt;
+
+using namespace WebCore;
+
+namespace TestWebKitAPI {
+
+TEST(WebCore, WildcardStringMatching)
+{
+    String wildcardString = &quot;a*b&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;aaaabb&quot;, &quot;a*b&quot;));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;ab&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;ba&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;a&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;b&quot;, wildcardString));
+
+    wildcardString = &quot;aabb&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;aabb&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;a*b&quot;, wildcardString));
+
+    wildcardString = &quot;*apple*&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;freshapple&quot;, wildcardString));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;applefresh&quot;, wildcardString));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;freshapplefresh&quot;, wildcardString));
+
+    wildcardString = &quot;a*b*c&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;aabbcc&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;bca&quot;, wildcardString));
+
+    wildcardString = &quot;*.example*.com/*&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;food.examplehello.com/&quot;, wildcardString));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;food.example.com/bar.html&quot;, wildcardString));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;foo.bar.example.com/hello?query#fragment.html&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;food.example.com&quot;, wildcardString));
+
+    wildcardString = &quot;a*b.b*c&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;aabb.bbcc&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;aabbcbbcc&quot;, wildcardString));
+
+    wildcardString = &quot;a+b&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;a+b&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;ab&quot;, wildcardString));
+
+    wildcardString = &quot;(a*)b aa&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;(aaa)b aa&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;aab aa&quot;, wildcardString));
+
+    wildcardString = &quot;a|c&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;a|c&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;abc&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;a&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;c&quot;, wildcardString));
+
+    wildcardString = &quot;(a+|b)*&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;(a+|b)acca&quot;, &quot;(a+|b)*&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;ab&quot;, &quot;(a+|b)*&quot;));
+
+    wildcardString = &quot;a[-]?c&quot;;
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;a[-]?c&quot;, wildcardString));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;ac&quot;, wildcardString));
+
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;hello&quot;, &quot;^hello$&quot;));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot; &quot;, &quot; &quot;));
+    EXPECT_TRUE(stringMatchesWildcardString(&quot;^$&quot;, &quot;^$&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;a&quot;, &quot;a{1}&quot;));
+
+    // stringMatchesWildcardString should only match the entire string.
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;aabbaabb&quot;, &quot;aabb&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;aabb\naabb&quot;, &quot;aabb&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;bab&quot;, &quot;a*&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;bab&quot;, &quot;*a&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;bab&quot;, &quot;a*b&quot;));
+    EXPECT_FALSE(stringMatchesWildcardString(&quot;abcd&quot;, &quot;b*c&quot;));
+}
+
+}
</ins></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2macStringUtilitiesmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm (213318 => 213319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm        2017-03-02 23:55:54 UTC (rev 213318)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/mac/StringUtilities.mm        2017-03-02 23:56:03 UTC (rev 213319)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 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.
- */
-
-#import &quot;config.h&quot;
-
-#import &lt;WebKit/StringUtilities.h&gt;
-#import &lt;wtf/text/WTFString.h&gt;
-
-namespace TestWebKitAPI {
-
-TEST(WebKit2, WildcardStringMatching)
-{
-    String wildcardString = &quot;a*b&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;aaaabb&quot;, &quot;a*b&quot;));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;ab&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;ba&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;a&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;b&quot;, wildcardString));
-
-    wildcardString = &quot;aabb&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;aabb&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;a*b&quot;, wildcardString));
-
-    wildcardString = &quot;*apple*&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;freshapple&quot;, wildcardString));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;applefresh&quot;, wildcardString));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;freshapplefresh&quot;, wildcardString));
-
-    wildcardString = &quot;a*b*c&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;aabbcc&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;bca&quot;, wildcardString));
-
-    wildcardString = &quot;*.example*.com/*&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;food.examplehello.com/&quot;, wildcardString));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;food.example.com/bar.html&quot;, wildcardString));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;foo.bar.example.com/hello?query#fragment.html&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;food.example.com&quot;, wildcardString));
-
-    wildcardString = &quot;a*b.b*c&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;aabb.bbcc&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;aabbcbbcc&quot;, wildcardString));
-
-    wildcardString = &quot;a+b&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;a+b&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;ab&quot;, wildcardString));
-
-    wildcardString = &quot;(a*)b aa&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;(aaa)b aa&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;aab aa&quot;, wildcardString));
-
-    wildcardString = &quot;a|c&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;a|c&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;abc&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;a&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;c&quot;, wildcardString));
-
-    wildcardString = &quot;(a+|b)*&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;(a+|b)acca&quot;, &quot;(a+|b)*&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;ab&quot;, &quot;(a+|b)*&quot;));
-
-    wildcardString = &quot;a[-]?c&quot;;
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;a[-]?c&quot;, wildcardString));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;ac&quot;, wildcardString));
-
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;hello&quot;, &quot;^hello$&quot;));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot; &quot;, &quot; &quot;));
-    EXPECT_TRUE(WebKit::stringMatchesWildcardString(&quot;^$&quot;, &quot;^$&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;a&quot;, &quot;a{1}&quot;));
-
-    // stringMatchesWildcardString should only match the entire string.
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;aabbaabb&quot;, &quot;aabb&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;aabb\naabb&quot;, &quot;aabb&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;bab&quot;, &quot;a*&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;bab&quot;, &quot;*a&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;bab&quot;, &quot;a*b&quot;));
-    EXPECT_FALSE(WebKit::stringMatchesWildcardString(&quot;abcd&quot;, &quot;b*c&quot;));
-}
-
-}
</del></span></pre>
</div>
</div>

</body>
</html>