When I run the clang static analyzer against ToT (152721), it points out some places where WebKit and WebKit2 are misusing NSDictionary. We should fix that.
Created attachment 206791 [details] Patch
Comment on attachment 206791 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206791&action=review > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:380 > NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute, Seems like this can just use dictionaryWithObject:forKey: > Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:114 > - NSExcludedElementsDocumentAttribute, nil, @"WebResourceHandler", nil]; > + NSExcludedElementsDocumentAttribute, nil]; Ditto.
(In reply to comment #2) > (From update of attachment 206791 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=206791&action=review > > > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:380 > > NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute, > > Seems like this can just use dictionaryWithObject:forKey: Heh, yes. Done. > > > Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:114 > > - NSExcludedElementsDocumentAttribute, nil, @"WebResourceHandler", nil]; > > + NSExcludedElementsDocumentAttribute, nil]; > > Ditto. Done. Thanks for the review!
Comment on attachment 206791 [details] Patch Committed in http://trac.webkit.org/changeset/152730