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