diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
| commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
| tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebKit/mac/Misc/WebNSDictionaryExtras.m | |
| parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
| download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 | |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebKit/mac/Misc/WebNSDictionaryExtras.m')
| -rw-r--r-- | WebKit/mac/Misc/WebNSDictionaryExtras.m | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/WebKit/mac/Misc/WebNSDictionaryExtras.m b/WebKit/mac/Misc/WebNSDictionaryExtras.m index 665db22..a47fd0b 100644 --- a/WebKit/mac/Misc/WebNSDictionaryExtras.m +++ b/WebKit/mac/Misc/WebNSDictionaryExtras.m @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -49,6 +49,12 @@ return [object isKindOfClass:[NSString class]] ? object : nil; } +-(NSArray *)_webkit_arrayForKey:(id)key +{ + id object = [self objectForKey:key]; + return [object isKindOfClass:[NSArray class]] ? object : nil; +} + -(id)_webkit_objectForMIMEType:(NSString *)MIMEType { id result; @@ -67,6 +73,12 @@ return [self objectForKey:[MIMEType substringToIndex:slashRange.location + 1]]; } +- (BOOL)_webkit_boolForKey:(id)key +{ + NSNumber *number = [self _webkit_numberForKey:key]; + return number && [number boolValue]; +} + @end @implementation NSMutableDictionary (WebNSDictionaryExtras) |
