Title: [201763] trunk/Source/WebKit/mac
- Revision
- 201763
- Author
- [email protected]
- Date
- 2016-06-07 11:56:01 -0700 (Tue, 07 Jun 2016)
Log Message
[iOS WK1] Remove unused -_webkit_unescapedQueryValue and -_webkit_queryKeysAndValues NSString category methods
<https://webkit.org/b/158485>
<rdar://problem/16960445>
Reviewed by Dan Bernstein.
* Misc/WebNSURLExtras.h:
(-[NSString _webkit_unescapedQueryValue]): Deleted declaration.
(-[NSString _webkit_queryKeysAndValues]): Deleted declaration.
* Misc/WebNSURLExtras.mm:
(-[NSString _webkit_unescapedQueryValue]): Deleted.
(-[NSString _webkit_queryKeysAndValues]): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (201762 => 201763)
--- trunk/Source/WebKit/mac/ChangeLog 2016-06-07 18:55:08 UTC (rev 201762)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-06-07 18:56:01 UTC (rev 201763)
@@ -1,3 +1,18 @@
+2016-06-07 David Kilzer <[email protected]>
+
+ [iOS WK1] Remove unused -_webkit_unescapedQueryValue and -_webkit_queryKeysAndValues NSString category methods
+ <https://webkit.org/b/158485>
+ <rdar://problem/16960445>
+
+ Reviewed by Dan Bernstein.
+
+ * Misc/WebNSURLExtras.h:
+ (-[NSString _webkit_unescapedQueryValue]): Deleted declaration.
+ (-[NSString _webkit_queryKeysAndValues]): Deleted declaration.
+ * Misc/WebNSURLExtras.mm:
+ (-[NSString _webkit_unescapedQueryValue]): Deleted.
+ (-[NSString _webkit_queryKeysAndValues]): Deleted.
+
2016-06-07 Alex Christensen <[email protected]>
Adopt [PDFView documentScrollView]
Modified: trunk/Source/WebKit/mac/Misc/WebNSURLExtras.h (201762 => 201763)
--- trunk/Source/WebKit/mac/Misc/WebNSURLExtras.h 2016-06-07 18:55:08 UTC (rev 201762)
+++ trunk/Source/WebKit/mac/Misc/WebNSURLExtras.h 2016-06-07 18:56:01 UTC (rev 201763)
@@ -100,9 +100,4 @@
- (NSRange)_webkit_rangeOfURLScheme;
- (NSString *)_webkit_scriptIfJavaScriptURL;
-#if TARGET_OS_IPHONE
-- (NSString *)_webkit_unescapedQueryValue;
-- (NSDictionary *)_webkit_queryKeysAndValues;
-#endif
-
@end
Modified: trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm (201762 => 201763)
--- trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm 2016-06-07 18:55:08 UTC (rev 201762)
+++ trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm 2016-06-07 18:56:01 UTC (rev 201763)
@@ -313,76 +313,4 @@
return [[self _webkit_stringByTrimmingWhitespace] _webkit_rangeOfURLScheme].location != NSNotFound;
}
-#if PLATFORM(IOS)
-
-- (NSString *)_webkit_unescapedQueryValue
-{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- NSMutableString *string = [[[self stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] mutableCopy] autorelease];
- if (!string) // If we failed to decode the URL as UTF8, fall back to Latin1
- string = [[[self stringByReplacingPercentEscapesUsingEncoding:NSISOLatin1StringEncoding] mutableCopy] autorelease];
-#pragma clang diagnostic pop
- [string replaceOccurrencesOfString:@"+" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [string length])];
- return string;
-}
-
-- (NSDictionary *)_webkit_queryKeysAndValues
-{
- unsigned queryLength = [self length];
- if (!queryLength)
- return nil;
-
- NSMutableDictionary *queryKeysAndValues = nil;
- NSRange equalSearchRange = NSMakeRange(0, queryLength);
-
- while (equalSearchRange.location < queryLength - 1 && equalSearchRange.length) {
-
- // Search for "=".
- NSRange equalRange = [self rangeOfString:@"=" options:NSLiteralSearch range:equalSearchRange];
- if (equalRange.location == NSNotFound)
- break;
-
- unsigned indexAfterEqual = equalRange.location + 1;
- if (indexAfterEqual > queryLength - 1)
- break;
-
- // Get the key before the "=".
- NSRange keyRange = NSMakeRange(equalSearchRange.location, equalRange.location - equalSearchRange.location);
-
- // Seach for the ampersand.
- NSRange ampersandSearchRange = NSMakeRange(indexAfterEqual, queryLength - indexAfterEqual);
- NSRange ampersandRange = [self rangeOfString:@"&" options:NSLiteralSearch range:ampersandSearchRange];
-
- // Get the value after the "=", before the ampersand.
- NSRange valueRange;
- if (ampersandRange.location != NSNotFound)
- valueRange = NSMakeRange(indexAfterEqual, ampersandRange.location - indexAfterEqual);
- else
- valueRange = NSMakeRange(indexAfterEqual, queryLength - indexAfterEqual);
-
- // Save the key and the value.
- if (keyRange.length && valueRange.length) {
- if (queryKeysAndValues == nil)
- queryKeysAndValues = [NSMutableDictionary dictionary];
- NSString *key = [[self substringWithRange:keyRange] lowercaseString];
- NSString *value = [[self substringWithRange:valueRange] _webkit_unescapedQueryValue];
- if ([key length] && [value length])
- [queryKeysAndValues setObject:value forKey:key];
- }
-
- // At the end.
- if (ampersandRange.location == NSNotFound)
- break;
-
- // Continue searching after the ampersand.
- unsigned indexAfterAmpersand = ampersandRange.location + 1;
- equalSearchRange = NSMakeRange(indexAfterAmpersand, queryLength - indexAfterAmpersand);
- }
-
- return queryKeysAndValues;
-}
-
-#endif // PLATFORM(IOS)
-
@end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes