Changeset 61558 in webkit
- Timestamp:
- Jun 21, 2010 11:02:37 AM (14 years ago)
- Location:
- trunk/WebKit/mac
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/mac/ChangeLog
r61556 r61558 1 2010-06-21 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Remove unused dictionary ivars from WebBasePluginPackage 6 https://bugs.webkit.org/show_bug.cgi?id=40928 7 8 * Plugins/WebBasePluginPackage.h: 9 * Plugins/WebBasePluginPackage.mm: 10 (-[WebBasePluginPackage getPluginInfoFromPLists]): 11 (-[WebBasePluginPackage dealloc]): 12 * Plugins/WebNetscapePluginPackage.mm: 13 (-[WebNetscapePluginPackage getPluginInfoFromResources]): 14 1 15 2010-06-21 Dan Bernstein <mitz@apple.com> 2 16 -
trunk/WebKit/mac/Plugins/WebBasePluginPackage.h
r61525 r61558 65 65 CFBundleRef cfBundle; 66 66 67 NSDictionary *MIMEToDescription;68 NSDictionary *MIMEToExtensions;69 70 67 BP_CreatePluginMIMETypesPreferencesFuncPtr BP_CreatePluginMIMETypesPreferences; 71 68 } … … 91 88 - (BOOL)supportsMIMEType:(const WebCore::String&)MIMEType; 92 89 93 - (NSString *)descriptionForMIMEType:(NSString *)MIMEType;94 90 - (NSString *)MIMETypeForExtension:(const WebCore::String&)extension; 95 96 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary;97 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary;98 91 99 92 - (BOOL)isQuickTimePlugIn; -
trunk/WebKit/mac/Plugins/WebBasePluginPackage.mm
r61525 r61558 207 207 } 208 208 209 NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];210 NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];211 209 NSEnumerator *keyEnumerator = [MIMETypes keyEnumerator]; 212 210 NSDictionary *MIMEDictionary; … … 232 230 233 231 mimeClassInfo.type = String(MIME).lower(); 234 MIME = [MIME lowercaseString];235 236 [MIMEToExtensionsDictionary setObject:extensions forKey:MIME];237 232 238 233 description = [MIMEDictionary objectForKey:WebPluginTypeDescriptionKey]; … … 242 237 if (!description) 243 238 description = @""; 244 245 [MIMEToDescriptionDictionary setObject:description forKey:MIME]; 246 } 247 248 [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary]; 249 [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary]; 239 } 250 240 251 241 NSString *filename = [self filename]; … … 277 267 [pluginDatabases release]; 278 268 279 [MIMEToDescription release];280 [MIMEToExtensions release];281 282 269 if (cfBundle) 283 270 CFRelease(cfBundle); … … 323 310 } 324 311 325 - (NSArray *)MIMETypes326 {327 return [MIMEToExtensions allKeys];328 }329 330 312 - (BOOL)supportsExtension:(const String&)extension 331 313 { … … 354 336 } 355 337 356 - (NSString *)descriptionForMIMEType:(NSString *)MIMEType357 {358 return [MIMEToDescription objectForKey:MIMEType];359 }360 361 338 - (NSString *)MIMETypeForExtension:(const String&)extension 362 339 { … … 372 349 373 350 return nil; 374 }375 376 - (NSArray *)extensionsForMIMEType:(NSString *)MIMEType377 {378 return [MIMEToExtensions objectForKey:MIMEType];379 }380 381 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary382 {383 [MIMEToDescription release];384 MIMEToDescription = [MIMEToDescriptionDictionary retain];385 }386 387 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary388 {389 [MIMEToExtensions release];390 MIMEToExtensions = [MIMEToExtensionsDictionary retain];391 }392 393 - (NSString *)description394 {395 return [NSString stringWithFormat:@"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@",396 (NSString *)name, (NSString *)path, [MIMEToExtensions description], [MIMEToDescription description], (NSString *)pluginDescription];397 351 } 398 352 -
trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
r61526 r61558 161 161 unsigned i; 162 162 163 NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];164 NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];165 166 163 for (i=1; 1; i+=2) { 167 164 MIME = [[self stringForStringListID:MIMEListStringStringNumber … … 178 175 for (NSUInteger j = 0; j < [extensions count]; ++j) 179 176 mimeClassInfo.extensions.append((NSString *)[extensions objectAtIndex:j]); 180 181 [MIMEToExtensionsDictionary setObject:extensions forKey:MIME]; 182 } else 183 // DRM and WMP claim MIMEs without extensions. Use a @"" extension in this case. 184 [MIMEToExtensionsDictionary setObject:[NSArray arrayWithObject:@""] forKey:MIME]; 177 } 185 178 186 179 description = [self stringForStringListID:MIMEDescriptionStringNumber 187 andIndex: [MIMEToExtensionsDictionary count]];180 andIndex:mimeTypes.size()]; 188 181 mimeClassInfo.desc = description; 189 182 190 if (description)191 [MIMEToDescriptionDictionary setObject:description forKey:MIME];192 else193 [MIMEToDescriptionDictionary setObject:@"" forKey:MIME];194 195 183 mimeTypes.append(mimeClassInfo); 196 184 } 197 198 [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];199 [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];200 185 201 186 NSString *filename = [self filename];
Note: See TracChangeset
for help on using the changeset viewer.