<!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>[185319] trunk/Source/WebKit</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/185319">185319</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-06-08 09:16:08 -0700 (Mon, 08 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove WebNSArrayExtras
https://bugs.webkit.org/show_bug.cgi?id=145747

Reviewed by Darin Adler.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
* Misc/WebNSArrayExtras.h: Removed.
* Misc/WebNSArrayExtras.m: Removed.
(-[NSArray _webkit_numberAtIndex:]): Deleted.
(-[NSArray _webkit_stringAtIndex:]): Deleted.
(-[NSMutableArray _webkit_removeUselessMenuItemSeparators]): Deleted.
* WebView/WebPDFView.mm:
(removeUselessMenuItemSeparators):
(-[WebPDFView _menuItemsFromPDFKitForEvent:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistoryItemmm">trunk/Source/WebKit/mac/History/WebHistoryItem.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPDFViewmm">trunk/Source/WebKit/mac/WebView/WebPDFView.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacMiscWebNSArrayExtrash">trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.h</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebNSArrayExtrasm">trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.m</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/ChangeLog        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -1,5 +1,14 @@
</span><span class="cx"> 2015-06-07  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Remove WebNSArrayExtras
+        https://bugs.webkit.org/show_bug.cgi?id=145747
+
+        Reviewed by Darin Adler.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
+2015-06-07  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         Remove WebKitSystemBits
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=145746
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -458,8 +458,6 @@
</span><span class="cx">                 E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169836B11346D5600894115 /* ProxyRuntimeObject.mm */; };
</span><span class="cx">                 ED5B9524111B725A00472298 /* WebLocalizableStrings.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */; };
</span><span class="cx">                 ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE9837E0BCDF5FE00FDAE28 /* WebNSArrayExtras.h */; };
-                EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */; };
</del><span class="cx">                 F834AAD70E64B1C700E2737C /* WebTextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = F834AAD50E64B1C700E2737C /* WebTextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F834AAD60E64B1C700E2737C /* WebTextIterator.mm */; };
</span><span class="cx"> /* End PBXBuildFile section */
</span><span class="lines">@@ -880,8 +878,6 @@
</span><span class="cx">                 EDD1A5C605C83987008E3150 /* WebNSPrintOperationExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSPrintOperationExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 EDD1A5C705C83987008E3150 /* WebNSPrintOperationExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSPrintOperationExtras.m; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 EDE850CD06ECC79E005FAB05 /* WebPreferenceKeysPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferenceKeysPrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><del>-                EDE9837E0BCDF5FE00FDAE28 /* WebNSArrayExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNSArrayExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSArrayExtras.m; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 F508946902B71D59018A9CD4 /* WebNSViewExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSViewExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 F508946A02B71D59018A9CD4 /* WebNSViewExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSViewExtras.m; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 F5143A370221DCCE01A80181 /* WebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFrame.mm; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="lines">@@ -1129,8 +1125,6 @@
</span><span class="cx">                                 ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */,
</span><span class="cx">                                 BC42D322131ED1E00075FA4B /* WebLocalizableStringsInternal.h */,
</span><span class="cx">                                 BC42D34C131ED3880075FA4B /* WebLocalizableStringsInternal.mm */,
</span><del>-                                EDE9837E0BCDF5FE00FDAE28 /* WebNSArrayExtras.h */,
-                                EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */,
</del><span class="cx">                                 9345DDB20365FFD0008635CE /* WebNSControlExtras.h */,
</span><span class="cx">                                 9345DDB30365FFD0008635CE /* WebNSControlExtras.m */,
</span><span class="cx">                                 BECD14290565830A005BB09C /* WebNSDataExtras.h */,
</span><span class="lines">@@ -1884,7 +1878,6 @@
</span><span class="cx">                                 31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
</span><span class="cx">                                 312E2FE914E48215007CCA18 /* WebNotificationInternal.h in Headers */,
</span><span class="cx">                                 A10C1D781820300E0036883A /* WebVisiblePositionInternal.h in Headers */,
</span><del>-                                EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */,
</del><span class="cx">                                 939810210824BF01008DF038 /* WebNSControlExtras.h in Headers */,
</span><span class="cx">                                 939810820824BF01008DF038 /* WebNSDataExtras.h in Headers */,
</span><span class="cx">                                 ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */,
</span><span class="lines">@@ -2290,7 +2283,6 @@
</span><span class="cx">                                 A10C1D6C1820300E0036883A /* WebFrameIOS.mm in Sources */,
</span><span class="cx">                                 312E2FE614E48182007CCA18 /* WebNotification.mm in Sources */,
</span><span class="cx">                                 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
</span><del>-                                EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */,
</del><span class="cx">                                 1A6B31391A51F3A900422975 /* StorageThread.cpp in Sources */,
</span><span class="cx">                                 A560946714D8AD2600799A8A /* WebIndicateLayer.mm in Sources */,
</span><span class="cx">                                 939810C60824BF01008DF038 /* WebNSControlExtras.m in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-06-07  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Remove WebNSArrayExtras
+        https://bugs.webkit.org/show_bug.cgi?id=145747
+
+        Reviewed by Darin Adler.
+
+        * History/WebHistoryItem.mm:
+        (-[WebHistoryItem initFromDictionaryRepresentation:]):
+        * Misc/WebNSArrayExtras.h: Removed.
+        * Misc/WebNSArrayExtras.m: Removed.
+        (-[NSArray _webkit_numberAtIndex:]): Deleted.
+        (-[NSArray _webkit_stringAtIndex:]): Deleted.
+        (-[NSMutableArray _webkit_removeUselessMenuItemSeparators]): Deleted.
+        * WebView/WebPDFView.mm:
+        (removeUselessMenuItemSeparators):
+        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
+
</ins><span class="cx"> 2015-06-08  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fixed the build.
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistoryItemmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistoryItem.mm (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/mac/History/WebHistoryItem.mm        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #import &quot;WebIconDatabase.h&quot;
</span><span class="cx"> #import &quot;WebKitLogging.h&quot;
</span><span class="cx"> #import &quot;WebKitNSStringExtras.h&quot;
</span><del>-#import &quot;WebNSArrayExtras.h&quot;
</del><span class="cx"> #import &quot;WebNSDictionaryExtras.h&quot;
</span><span class="cx"> #import &quot;WebNSObjectExtras.h&quot;
</span><span class="cx"> #import &quot;WebNSURLExtras.h&quot;
</span><span class="lines">@@ -362,9 +361,16 @@
</span><span class="cx">     
</span><span class="cx">     if (NSArray *redirectURLs = [dict _webkit_arrayForKey:redirectURLsKey]) {
</span><span class="cx">         NSUInteger size = [redirectURLs count];
</span><del>-        auto redirectURLsVector = std::make_unique&lt;Vector&lt;String&gt;&gt;(size);
-        for (NSUInteger i = 0; i &lt; size; ++i)
-            (*redirectURLsVector)[i] = String([redirectURLs _webkit_stringAtIndex:i]);
</del><ins>+        auto redirectURLsVector = std::make_unique&lt;Vector&lt;String&gt;&gt;();
+
+        for (NSUInteger i = 0; i &lt; size; ++i) {
+            id redirectURL = [redirectURLs objectAtIndex:i];
+            if (![redirectURL isKindOfClass:[NSString class]])
+                continue;
+
+            (*redirectURLsVector)[i] = (NSString *)redirectURL;
+        }
+
</ins><span class="cx">         core(_private)-&gt;setRedirectURLs(WTF::move(redirectURLsVector));
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebNSArrayExtrash"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.h (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.h        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.h        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) 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. (&quot;Apple&quot;) 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 &quot;AS IS&quot; 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 &quot;WebTypesInternal.h&quot;
-
-@interface NSArray (WebNSArrayExtras)
-
--(NSNumber *)_webkit_numberAtIndex:(NSUInteger)index;
--(NSString *)_webkit_stringAtIndex:(NSUInteger)index;
-
-@end
-
-#if !PLATFORM(IOS)
-@interface NSMutableArray (WebNSArrayExtras)
-
-- (void)_webkit_removeUselessMenuItemSeparators;
-
-@end
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebNSArrayExtrasm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.m (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.m        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/mac/Misc/WebNSArrayExtras.m        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-/*
- * Copyright (C) 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. (&quot;Apple&quot;) 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 &quot;AS IS&quot; 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 &quot;WebNSArrayExtras.h&quot;
-
-#import &lt;wtf/Assertions.h&gt;
-
-@implementation NSArray (WebNSArrayExtras)
-
--(NSNumber *)_webkit_numberAtIndex:(NSUInteger)index
-{
-    id object = [self objectAtIndex:index];
-    return [object isKindOfClass:[NSNumber class]] ? object : nil;
-}
-
--(NSString *)_webkit_stringAtIndex:(NSUInteger)index
-{
-    id object = [self objectAtIndex:index];
-    return [object isKindOfClass:[NSString class]] ? object : nil;
-}
-
-@end
-
-#if !PLATFORM(IOS)
-@implementation NSMutableArray (WebNSArrayExtras)
-
-- (void)_webkit_removeUselessMenuItemSeparators
-{
-    // Starting with a mutable array of NSMenuItems, removes any separators at the start,
-    // removes any separators at the end, and collapses any other adjacent separators to
-    // a single separator.
-
-    int index;
-    // Start this with YES so very last item will be removed if it's a separator.
-    BOOL removePreviousItemIfSeparator = YES;
-    for (index = [self count] - 1; index &gt;= 0; --index) {
-        NSMenuItem *item = [self objectAtIndex:index];
-        ASSERT([item isKindOfClass:[NSMenuItem class]]);
-        BOOL itemIsSeparator = [item isSeparatorItem];
-        if (itemIsSeparator &amp;&amp; (removePreviousItemIfSeparator || index == 0))
-            [self removeObjectAtIndex:index];
-        removePreviousItemIfSeparator = itemIsSeparator;
-    }
-    
-    // This could leave us with one initial separator; kill it off too
-    if ([self count] &amp;&amp; [[self objectAtIndex:0] isSeparatorItem])
-        [self removeObjectAtIndex:0];
-}
-
-@end
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPDFViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPDFView.mm (185318 => 185319)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPDFView.mm        2015-06-08 16:13:42 UTC (rev 185318)
+++ trunk/Source/WebKit/mac/WebView/WebPDFView.mm        2015-06-08 16:16:08 UTC (rev 185319)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> #import &quot;WebFrameInternal.h&quot;
</span><span class="cx"> #import &quot;WebFrameView.h&quot;
</span><span class="cx"> #import &quot;WebLocalizableStringsInternal.h&quot;
</span><del>-#import &quot;WebNSArrayExtras.h&quot;
</del><span class="cx"> #import &quot;WebNSPasteboardExtras.h&quot;
</span><span class="cx"> #import &quot;WebNSViewExtras.h&quot;
</span><span class="cx"> #import &quot;WebPDFRepresentation.h&quot;
</span><span class="lines">@@ -1145,6 +1144,31 @@
</span><span class="cx">         [PDFSubview performSelector:@selector(_searchInDictionary:) withObject:sender];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void removeUselessMenuItemSeparators(NSMutableArray *menuItems)
+{
+    // Starting with a mutable array of NSMenuItems, removes any separators at the start,
+    // removes any separators at the end, and collapses any other adjacent separators to
+    // a single separator.
+
+    // Start this with YES so very last item will be removed if it's a separator.
+    BOOL removePreviousItemIfSeparator = YES;
+
+    for (NSInteger index = menuItems.count - 1; index &gt;= 0; --index) {
+        NSMenuItem *item = menuItems[index];
+        ASSERT([item isKindOfClass:[NSMenuItem class]]);
+
+        BOOL itemIsSeparator = [item isSeparatorItem];
+        if (itemIsSeparator &amp;&amp; (removePreviousItemIfSeparator || !index))
+            [menuItems removeObjectAtIndex:index];
+
+        removePreviousItemIfSeparator = itemIsSeparator;
+    }
+
+    // This could leave us with one initial separator; kill it off too
+    if (menuItems.count &amp;&amp; [menuItems[0] isSeparatorItem])
+        [menuItems removeObjectAtIndex:0];
+}
+
</ins><span class="cx"> - (NSMutableArray *)_menuItemsFromPDFKitForEvent:(NSEvent *)theEvent
</span><span class="cx"> {
</span><span class="cx">     NSMutableArray *copiedItems = [NSMutableArray array];
</span><span class="lines">@@ -1221,7 +1245,7 @@
</span><span class="cx">     // Since we might have removed elements supplied by PDFKit, and we want to minimize our hardwired
</span><span class="cx">     // knowledge of the order and arrangement of PDFKit's menu items, we need to remove any bogus
</span><span class="cx">     // separators that were left behind.
</span><del>-    [copiedItems _webkit_removeUselessMenuItemSeparators];
</del><ins>+    removeUselessMenuItemSeparators(copiedItems);
</ins><span class="cx">     
</span><span class="cx">     return copiedItems;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>